emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/bookmark.el


From: Karl Fogel
Subject: [Emacs-diffs] Changes to emacs/lisp/bookmark.el
Date: Fri, 07 Jun 2002 23:33:09 -0400

Index: emacs/lisp/bookmark.el
diff -c emacs/lisp/bookmark.el:1.59 emacs/lisp/bookmark.el:1.60
*** emacs/lisp/bookmark.el:1.59 Thu Dec 20 13:32:12 2001
--- emacs/lisp/bookmark.el      Fri Jun  7 23:33:09 2002
***************
*** 1072,1090 ****
  
  
  (defun bookmark-file-or-variation-thereof (file)
!   "Return FILE (a string) if it exists in any reasonable variation, else nil.
! Reasonable variations are FILE.gz, FILE.Z, FILE.info, FILE.info.gz, etc."
!   (cond
!    ((file-exists-p file)                       file)
!    ((file-exists-p (concat file ".Z"))         (concat file ".Z"))
!    ((file-exists-p (concat file ".gz"))        (concat file ".gz"))
!    ((file-exists-p (concat file ".z"))         (concat file ".z"))
!    ((file-exists-p (concat file ".info"))      (concat file ".info"))
!    ((file-exists-p (concat file ".info.gz"))   (concat file ".info.gz"))
!    ((file-exists-p (concat file ".info.Z"))    (concat file ".info.Z"))
!    ((file-exists-p (concat file ".info.z"))    (concat file ".info.z"))
!    ((vc-backend file)                          file) ; maybe VC has it?
!    (t                                          nil)))
  
  
  (defun bookmark-jump-noselect (str)
--- 1072,1089 ----
  
  
  (defun bookmark-file-or-variation-thereof (file)
!   "Return FILE if it exists, or return the first variation based on
! `Info-suffix-list' that exists, else return nil."
!   (if (file-exists-p file)
!       file
!     (require 'info)  ; ensure Info-suffix-list is bound
!     (catch 'found
!       (mapc (lambda (elt)
!               (let ((suffixed-file (concat file (car elt))))
!                 (if (file-exists-p suffixed-file)
!                     (throw 'found suffixed-file))))
!             Info-suffix-list)
!       nil)))
  
  
  (defun bookmark-jump-noselect (str)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]