commands.")
(make-variable-buffer-local 'Buffer-menu-files-only)
-(defvar Info-current-file) ; from info.el
-(defvar Info-current-node) ; from info.el
-
(defvar Buffer-menu-mode-map
(let ((map (make-sparse-keymap))
(menu-map (make-sparse-keymap)))
(defun Buffer-menu--pretty-file-name (file)
(cond (file
(abbreviate-file-name file))
- ((and (boundp 'list-buffers-directory)
- list-buffers-directory)
- list-buffers-directory)
- ((eq major-mode 'Info-mode)
- (Buffer-menu-info-node-description Info-current-file))
+ ((bound-and-true-p list-buffers-directory))
(t "")))
-(defun Buffer-menu-info-node-description (file)
- (cond
- ((equal file "dir") "*Info Directory*")
- ((eq file 'apropos) "*Info Apropos*")
- ((eq file 'history) "*Info History*")
- ((eq file 'toc) "*Info TOC*")
- ((not (stringp file)) "") ; Avoid errors
- (t
- (concat "(" (file-name-nondirectory file) ") " Info-current-node))))
-
;;; buff-menu.el ends here
(cl-assert (derived-mode-p 'ibuffer-mode)))
(defun ibuffer-buffer-file-name ()
- (or buffer-file-name
- (let ((dirname (or (and (boundp 'dired-directory)
- (if (stringp dired-directory)
- dired-directory
- (car dired-directory)))
- (bound-and-true-p list-buffers-directory))))
- (and dirname (expand-file-name dirname)))))
+ (cond
+ ((buffer-file-name))
+ ((bound-and-true-p list-buffers-directory))
+ ((let ((dirname (and (boundp 'dired-directory)
+ (if (stringp dired-directory)
+ dired-directory
+ (car dired-directory)))))
+ (and dirname (expand-file-name dirname))))))
(define-ibuffer-op ibuffer-do-save ()
"Save marked buffers as with `save-buffer'."
parameter-alist))
parameter-alist))
+(defun Info-node-description (file)
+ (cond
+ ((equal file "dir") "*Info Directory*")
+ ((eq file 'apropos) "*Info Apropos*")
+ ((eq file 'history) "*Info History*")
+ ((eq file 'toc) "*Info TOC*")
+ ((not (stringp file)) "") ; Avoid errors
+ (t
+ (concat "(" (file-name-nondirectory file) ") " Info-current-node))))
+
(defun Info-display-images-node ()
"Display images in current node."
(save-excursion
(setq Info-history-forward nil))
(if (not (eq Info-fontify-maximum-menu-size nil))
(Info-fontify-node))
+ (setq list-buffers-directory (Info-node-description Info-current-file))
(Info-display-images-node)
(Info-hide-cookies-node)
(run-hooks 'Info-selection-hook)))))