Mercurial > emacs
comparison lisp/bookmark.el @ 92789:61c661dac856
(Info-current-node): Remove.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Thu, 13 Mar 2008 01:57:05 +0000 |
parents | ae00481eacc1 |
children | 442e2ad714cd |
comparison
equal
deleted
inserted
replaced
92788:503ca3b32075 | 92789:61c661dac856 |
---|---|
295 | 295 |
296 (defvar bookmark-current-point 0) | 296 (defvar bookmark-current-point 0) |
297 (defvar bookmark-yank-point 0) | 297 (defvar bookmark-yank-point 0) |
298 (defvar bookmark-current-buffer nil) | 298 (defvar bookmark-current-buffer nil) |
299 | 299 |
300 (defvar Info-current-node) | |
301 (defvar Info-suffix-list) | 300 (defvar Info-suffix-list) |
302 | 301 |
303 ;; Helper functions. | 302 ;; Helper functions. |
304 | 303 |
305 ;; Only functions on this page and the next one (file formats) need to | 304 ;; Only functions on this page and the next one (file formats) need to |
848 (bookmark-buffer-name))))) | 847 (bookmark-buffer-name))))) |
849 (insert str))) | 848 (insert str))) |
850 | 849 |
851 | 850 |
852 (defun bookmark-buffer-name () | 851 (defun bookmark-buffer-name () |
853 "Return the name of the current buffer's file, non-directory. | 852 "Return the name of the current buffer's file, non-directory." |
854 In Info, return the current node." | |
855 (cond | 853 (cond |
856 ;; Or are we a file? | 854 ;; Or are we a file? |
857 (buffer-file-name (file-name-nondirectory buffer-file-name)) | 855 (buffer-file-name (file-name-nondirectory buffer-file-name)) |
858 ;; Or are we a directory? | 856 ;; Or are we a directory? |
859 ((and (boundp 'dired-directory) dired-directory) | 857 ((and (boundp 'dired-directory) dired-directory) |
883 (progn | 881 (progn |
884 (forward-word 1) | 882 (forward-word 1) |
885 (setq bookmark-yank-point (point))))))) | 883 (setq bookmark-yank-point (point))))))) |
886 (insert string))) | 884 (insert string))) |
887 | 885 |
888 | |
889 (defvar Info-current-file) | |
890 | |
891 (defun bookmark-buffer-file-name () | 886 (defun bookmark-buffer-file-name () |
892 "Return the current buffer's file in a way useful for bookmarks. | 887 "Return the current buffer's file in a way useful for bookmarks." |
893 For example, if this is a Info buffer, return the Info file's name." | |
894 (cond | 888 (cond |
895 (buffer-file-name | 889 (buffer-file-name |
896 ;; Abbreviate the path, both so it's shorter and so it's more | 890 ;; Abbreviate the path, both so it's shorter and so it's more |
897 ;; portable. E.g., the user's home dir might be a different | 891 ;; portable. E.g., the user's home dir might be a different |
898 ;; path on different machines, but "~/" will still reach it. | 892 ;; path on different machines, but "~/" will still reach it. |