[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: info,bookmark and bzip2
From: |
Karl Fogel |
Subject: |
Re: info,bookmark and bzip2 |
Date: |
07 Jun 2002 19:49:43 -0500 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.2.50 |
Okay, Robert, I applied a fix to bookmark.el. Please let me know how
it works for you.
The new revision of bookmark.el is 1.60; here is the diff from 1.59 to
1.60:
2002-06-07 Karl Fogel <address@hidden>
* bookmark.el (bookmark-file-or-variation-thereof): Just use
Info-suffix-list, as suggested by Stefan Monnier.
$ cvs diff -c -r 1.59 -r 1.60 bookmark.el
Index: bookmark.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/bookmark.el,v
retrieving revision 1.59
retrieving revision 1.60
diff -c -r1.59 -r1.60
*** bookmark.el 20 Dec 2001 18:32:12 -0000 1.59
--- bookmark.el 8 Jun 2002 03:33:09 -0000 1.60
***************
*** 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)
- Re: info,bookmark and bzip2, Richard Stallman, 2002/06/06
- Re: info,bookmark and bzip2, Karl Fogel, 2002/06/06
- Re: info,bookmark and bzip2, Stefan Monnier, 2002/06/07
- Re: info,bookmark and bzip2, Karl Fogel, 2002/06/07
- Re: info,bookmark and bzip2,
Karl Fogel <=
- Re: info,bookmark and bzip2, Robert Thorpe, 2002/06/10
- Re: info,bookmark and bzip2, Karl Fogel, 2002/06/10
- Re: info,bookmark and bzip2, Karl Fogel, 2002/06/12