aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--etc/NEWS2
-rw-r--r--lisp/ChangeLog4
-rw-r--r--lisp/eshell/em-unix.el29
3 files changed, 35 insertions, 0 deletions
diff --git a/etc/NEWS b/etc/NEWS
index 4f9204c7b75..175a908a9db 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -191,6 +191,8 @@ on the corresponding remote system.
191and C-x C-q in wdired-mode exits it with asking a question about 191and C-x C-q in wdired-mode exits it with asking a question about
192saving changes. 192saving changes.
193 193
194*** The new command `eshell/info' runs info in an eshell buffer.
195
194 196
195* Changes in Emacs 23.1 on non-free operating systems 197* Changes in Emacs 23.1 on non-free operating systems
196 198
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 390fd60555a..21084348139 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,7 @@
12007-08-31 James Wright <james@chumsley.org>
2
3 * eshell/em-unix.el (eshell/info): New function.
4
12007-08-31 Stefan Monnier <monnier@iro.umontreal.ca> 52007-08-31 Stefan Monnier <monnier@iro.umontreal.ca>
2 6
3 * frame.el (frame-initialize, make-frame): 7 * frame.el (frame-initialize, make-frame):
diff --git a/lisp/eshell/em-unix.el b/lisp/eshell/em-unix.el
index 6dc02517ec1..ae65c7205b1 100644
--- a/lisp/eshell/em-unix.el
+++ b/lisp/eshell/em-unix.el
@@ -168,6 +168,35 @@ Otherwise, Emacs will attempt to use rsh to invoke du on the remote machine."
168 168
169(put 'eshell/man 'eshell-no-numeric-conversions t) 169(put 'eshell/man 'eshell-no-numeric-conversions t)
170 170
171(defun eshell/info (&rest args)
172 "Runs the info command in-frame with the same behaviour as command-line `info', ie:
173 'info' => goes to top info window
174 'info arg1' => IF arg1 is a file, then visits arg1
175 'info arg1' => OTHERWISE goes to top info window and then menu item arg1
176 'info arg1 arg2' => does action for arg1 (either visit-file or menu-item) and then menu item arg2
177 etc."
178 (require 'info)
179 (let ((file (cond
180 ((not (stringp (car args)))
181 nil)
182 ((file-exists-p (expand-file-name (car args)))
183 (expand-file-name (car args)))
184 ((file-exists-p (concat (expand-file-name (car args)) ".info"))
185 (concat (expand-file-name (car args)) ".info")))))
186
187 ;; If the first arg is a file, then go to that file's Top node
188 ;; Otherwise, go to the global directory
189 (if file
190 (progn
191 (setq args (cdr args))
192 (Info-find-node file "Top"))
193 (Info-directory))
194
195 ;; Treat all remaining args as menu references
196 (while args
197 (Info-menu (car args))
198 (setq args (cdr args)))))
199
171(defun eshell-remove-entries (path files &optional top-level) 200(defun eshell-remove-entries (path files &optional top-level)
172 "From PATH, remove all of the given FILES, perhaps interactively." 201 "From PATH, remove all of the given FILES, perhaps interactively."
173 (while files 202 (while files