all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Open Hypspec with w3m
@ 2011-01-28 19:29 Jason Earl
  2011-01-28 23:00 ` Tim X
                   ` (2 more replies)
  0 siblings, 3 replies; 27+ messages in thread
From: Jason Earl @ 2011-01-28 19:29 UTC (permalink / raw)
  To: help-gnu-emacs


I have been spending a bit of my free time learning Common Lisp (and
enjoying it).  Part of learning Common Lisp is getting to know the
HyperSpec.  The fact that Emacs includes a function 'hyperspec-lookup
that makes this a matter of a few keystrokes is very helpful.  However,
by default this opens up the page in Firefox, and I would pretty much
always like to open the HyperSpec in w3m.  I would change the default
browse-url-browser-function, but I generally want to open URLs with
Firefox.

For Common Lisp buffers I make 'browse-url-browser-function a local
variable and set it to 'w3m-browse-url.

--8<---------------cut here---------------start------------->8---
(add-hook 'lisp-mode-hook 'jadoea-lispstuff)

;; my python configuration
(defun jadoea-lispstuff ()
  "Custom Lisp Configurator.

Turn on flyspell-prog-mode.  Clean up whitespace on save (leave
tabs).  Make browse-url-browser-function buffer-local and set it
to browse-url-w3m."
  (flyspell-prog-mode)
  (add-hook 'before-save-hook
            (lambda ()
	      (jadoea-clean-whitespace t nil)) nil t)
  (make-local-variable 'browse-url-browser-function)
  (setq browse-url-browser-function 'w3m-browse-url))
--8<---------------cut here---------------end--------------->8---

This works great as long as I am in a Common Lisp buffer, but I find
myself constant wanting to look up stuff from the HyperSpec while in a
Slime REPL, or some other type of buffer.

So is there a way to override 'hyperspec-lookup so that it always
behaves as if browse-url-browser-function was 'w3m-browse-url?

I build Emacs from source, and I maintain my own branch so that I can
easily deploy Emacs on various machines.  So I considered simply hacking
common-lisp-hyperspec to do what I wanted.  However, that hardly seems
like the cleanest way to do this sort of thing.

Any suggestions?

Thanks,
Jason


^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2011-02-04 23:33 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-28 19:29 Open Hypspec with w3m Jason Earl
2011-01-28 23:00 ` Tim X
2011-01-28 23:33   ` Jason Earl
2011-01-28 23:58     ` [SOLUTION] " Jason Earl
2011-01-29  2:36       ` Stefan Monnier
2011-01-29 17:04         ` Jason Earl
2011-01-28 23:05 ` Stefan Monnier
2011-01-29  0:29   ` Jason Earl
2011-01-29  2:37     ` Stefan Monnier
2011-01-29 17:06       ` Jason Earl
2011-01-29 22:53         ` Tim X
2011-01-30  4:05           ` rusi
2011-01-30 14:47             ` Perry Smith
     [not found]             ` <mailman.10.1296398854.11759.help-gnu-emacs@gnu.org>
2011-01-30 15:11               ` Krzysztof Bieniasz
2011-01-30 15:45                 ` Open Hypspec with w3m (morphed into keyboards, etc) Perry Smith
     [not found]                 ` <mailman.15.1296402359.11759.help-gnu-emacs@gnu.org>
2011-01-30 16:34                   ` Krzysztof Bieniasz
2011-01-30 16:35                   ` Krzysztof Bieniasz
2011-01-30 16:38                   ` Krzysztof Bieniasz
2011-01-30  5:06           ` Open Hypspec with w3m Jason Earl
2011-01-30  8:44             ` Tim X
2011-02-01  4:15               ` Jason Earl
2011-02-01 12:33                 ` rusi
2011-02-01 21:15                   ` Tim X
2011-02-01 22:44                     ` Current Emacs Development (was: Open Hypspec with w3m) Jason Earl
2011-02-02  4:25                       ` Current Emacs Development Stefan Monnier
2011-02-02  5:58                         ` Jason Earl
2011-02-04 23:33 ` Open Hypspec with w3m Andy Moreton

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.