[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/eshell/em-unix.el,v
From: |
Glenn Morris |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/eshell/em-unix.el,v |
Date: |
Fri, 31 Aug 2007 08:08:38 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Glenn Morris <gm> 07/08/31 08:08:38
Index: em-unix.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/eshell/em-unix.el,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -b -r1.30 -r1.31
--- em-unix.el 26 Jul 2007 05:26:54 -0000 1.30
+++ em-unix.el 31 Aug 2007 08:08:37 -0000 1.31
@@ -168,6 +168,35 @@
(put 'eshell/man 'eshell-no-numeric-conversions t)
+(defun eshell/info (&rest args)
+ "Runs the info command in-frame with the same behaviour as command-line
`info', ie:
+ 'info' => goes to top info window
+ 'info arg1' => IF arg1 is a file, then visits arg1
+ 'info arg1' => OTHERWISE goes to top info window and then menu item arg1
+ 'info arg1 arg2' => does action for arg1 (either visit-file or menu-item)
and then menu item arg2
+ etc."
+ (require 'info)
+ (let ((file (cond
+ ((not (stringp (car args)))
+ nil)
+ ((file-exists-p (expand-file-name (car args)))
+ (expand-file-name (car args)))
+ ((file-exists-p (concat (expand-file-name (car args)) ".info"))
+ (concat (expand-file-name (car args)) ".info")))))
+
+ ;; If the first arg is a file, then go to that file's Top node
+ ;; Otherwise, go to the global directory
+ (if file
+ (progn
+ (setq args (cdr args))
+ (Info-find-node file "Top"))
+ (Info-directory))
+
+ ;; Treat all remaining args as menu references
+ (while args
+ (Info-menu (car args))
+ (setq args (cdr args)))))
+
(defun eshell-remove-entries (path files &optional top-level)
"From PATH, remove all of the given FILES, perhaps interactively."
(while files
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/lisp/eshell/em-unix.el,v,
Glenn Morris <=