[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: `dired-man-locally' for XEmacs.



Karl M. Hegbloom wrote:

> 
>  If you put the following in your "~/.emacs" (or your
>  "~/.xemacs/init.el if you prefer) you'll be able to put the cursor
>  over a man page filename in `dired', and push `l' to display it in
>  the emacs manual viewer.  This works for XEmacs.  Anyone know a way
>  to make it work with GNU Emacs?  If so, please post it.

(defun dired-man-locally ()
  (interactive)
  (manual-entry (concat (dired-get-filename) " -l")))

(require 'dired)
(define-key dired-mode-map [(?l)] 'dired-man-locally)

>  This is really helpful while you are writing a man page.
> 
> (defun dired-man-locally ()
>   (interactive)
>   (if (= 1 (function-max-args #'manual-entry))
>       (manual-entry (concat (dired-get-filename) " -l"))
>     (manual-entry (dired-get-filename) "-l")))
> 
> (add-hook 'dired-setup-keys-hook
> 	  #'(lambda ()
> 	      (define-key dired-mode-map [(?l)] #'dired-man-locally)))

-- 
Peter Galbraith, research scientist          <GalbraithP@dfo-mpo.gc.ca>
Maurice Lamontagne Institute, Department of Fisheries and Oceans Canada
P.O. Box 1000, Mont-Joli Qc, G5H 3Z4 Canada. 418-775-0852 FAX: 775-0546
    6623'rd GNU/Linux user at the Counter - http://counter.li.org/ 



Reply to: