/[emacs]/emacs/lisp/bookmark.el
ViewVC logotype

Diff of /emacs/lisp/bookmark.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.59 by pj, Thu Dec 20 18:32:12 2001 UTC revision 1.60 by kfogel, Sat Jun 8 03:33:09 2002 UTC
# Line 1072  of the old one in the permanent bookmark Line 1072  of the old one in the permanent bookmark
1072    
1073    
1074  (defun bookmark-file-or-variation-thereof (file)  (defun bookmark-file-or-variation-thereof (file)
1075    "Return FILE (a string) if it exists in any reasonable variation, else nil.    "Return FILE if it exists, or return the first variation based on
1076  Reasonable variations are FILE.gz, FILE.Z, FILE.info, FILE.info.gz, etc."  `Info-suffix-list' that exists, else return nil."
1077    (cond    (if (file-exists-p file)
1078     ((file-exists-p file)                       file)        file
1079     ((file-exists-p (concat file ".Z"))         (concat file ".Z"))      (require 'info)  ; ensure Info-suffix-list is bound
1080     ((file-exists-p (concat file ".gz"))        (concat file ".gz"))      (catch 'found
1081     ((file-exists-p (concat file ".z"))         (concat file ".z"))        (mapc (lambda (elt)
1082     ((file-exists-p (concat file ".info"))      (concat file ".info"))                (let ((suffixed-file (concat file (car elt))))
1083     ((file-exists-p (concat file ".info.gz"))   (concat file ".info.gz"))                  (if (file-exists-p suffixed-file)
1084     ((file-exists-p (concat file ".info.Z"))    (concat file ".info.Z"))                      (throw 'found suffixed-file))))
1085     ((file-exists-p (concat file ".info.z"))    (concat file ".info.z"))              Info-suffix-list)
1086     ((vc-backend file)                          file) ; maybe VC has it?        nil)))
    (t                                          nil)))  
1087    
1088    
1089  (defun bookmark-jump-noselect (str)  (defun bookmark-jump-noselect (str)

Legend:
Removed from v.1.59  
changed lines
  Added in v.1.60

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26