[slime-devel] hyperspec tweak

vanekl vanek at acd.net
Fri Aug 7 21:16:24 UTC 2009

Helmut Eller <heller <at> common-lisp.net> writes:

> * vanekl [2009-08-02 02:18+0200] writes:
> > I had to change the "push" to a "pushnew" (and add a test) in the
> > following function in hyperspec.el to keep my browser from opening up
> > more than 1 tab for a (common-lisp-hyperspec ...) query. This is from
> > today's cvs pull.
> I think common-lisp-hyperspec is supposed to display all definitions.
> To quote the docstring:
>   If SYMBOL-NAME has more than one definition, all of them are displayed with
>   your favorite browser in sequence.  The browser should have a "back"
>   function to view the separate definitions.
> Helmut.

Yes, I read that. That's not what's happening here.

What was happening on my machine is that the first time I pressed F1 I would get
one tab to open up to a hyperspec page. The second time I pressed F1 I would get
two tabs to open up to the same hyperspec page. The third time I pressed F1 I
would get three tabs to open for the same hyperspec page. Etc., etc.

I think I know why it's happening. F1 is hooked to this:

(global-set-key [f1]
		'(lambda (arg)
		   (interactive "P")
		     (let ((common-lisp-hyperspec-root
			    (if macosx-p
				(concat "file://" common-lisp-hyperspec-root)
		       (load-library hyperspec-prog)
		       (if arg
			   (common-lisp-hyperspec-format (char-to-string (char-after (point))))
			 (common-lisp-hyperspec (thing-at-point 'symbol)))))))

And this loads hyperspec every time I hit F1. Which means that the same symbol
is pushed every time I invoke this function key, unless I change the "push" to a
"pushnew". Simple and effective change, for me at least.

Lou Vanek

More information about the slime-devel mailing list