aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarl Fogel2002-06-12 21:44:33 +0000
committerKarl Fogel2002-06-12 21:44:33 +0000
commit76bc6ee3862e35bb4ea9e6c5c8d3359b7a5e7611 (patch)
treed2b445d2103b18ce7804ccc5f60ab88d910aabe1
parentb3e8cc4dfb1d02a69b6d59e944a1a935909bf853 (diff)
downloademacs-76bc6ee3862e35bb4ea9e6c5c8d3359b7a5e7611.tar.gz
emacs-76bc6ee3862e35bb4ea9e6c5c8d3359b7a5e7611.zip
* bookmark.el (bookmark-file-or-variation-thereof): Restore vc-backend
check, thanks to Robert Thorpe <robert.thorpe@antenova.com> for noticing. Redocument.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/bookmark.el28
2 files changed, 22 insertions, 11 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 6b40fd1505e..eacc3f1ab48 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12002-06-12 Karl Fogel <kfogel@red-bean.com>
2
3 * bookmark.el (bookmark-file-or-variation-thereof): Restore
4 vc-backend check, thanks to Robert Thorpe for noticing.
5
12002-06-12 Eli Zaretskii <eliz@is.elta.co.il> 62002-06-12 Eli Zaretskii <eliz@is.elta.co.il>
2 7
3 * textmodes/bibtex.el: Change the maintainer to "none". 8 * textmodes/bibtex.el: Change the maintainer to "none".
diff --git a/lisp/bookmark.el b/lisp/bookmark.el
index 5d56d9ca31f..97217a10e79 100644
--- a/lisp/bookmark.el
+++ b/lisp/bookmark.el
@@ -1072,19 +1072,25 @@ of the old one in the permanent bookmark record."
1072 1072
1073 1073
1074(defun bookmark-file-or-variation-thereof (file) 1074(defun bookmark-file-or-variation-thereof (file)
1075 "Return FILE (a string) or a reasonable variation that exists, else nil. 1075 "Return FILE (a string) if it exists, or return a reasonable
1076Reasonable variations of the name are made by appending suffixes defined 1076variation of FILE if that exists. Reasonable variations are checked
1077in `Info-suffix-list'." 1077by appending suffixes defined in `Info-suffix-list'. If cannot find FILE
1078nor a reasonable variation thereof, then still return FILE if it can
1079be retrieved from a VC backend, else return nil."
1078 (if (file-exists-p file) 1080 (if (file-exists-p file)
1079 file 1081 file
1080 (require 'info) ; ensure Info-suffix-list is bound 1082 (or
1081 (catch 'found 1083 (progn (require 'info) ; ensure Info-suffix-list is bound
1082 (mapc (lambda (elt) 1084 (catch 'found
1083 (let ((suffixed-file (concat file (car elt)))) 1085 (mapc (lambda (elt)
1084 (if (file-exists-p suffixed-file) 1086 (let ((suffixed-file (concat file (car elt))))
1085 (throw 'found suffixed-file)))) 1087 (if (file-exists-p suffixed-file)
1086 Info-suffix-list) 1088 (throw 'found suffixed-file))))
1087 nil))) 1089 Info-suffix-list)
1090 nil))
1091 ;; Last possibility: try VC
1092 (if (vc-backend file) file))))
1093
1088 1094
1089(defun bookmark-jump-noselect (str) 1095(defun bookmark-jump-noselect (str)
1090 ;; a leetle helper for bookmark-jump :-) 1096 ;; a leetle helper for bookmark-jump :-)