To specify the file in which to save them, modify the variable
`bookmark-default-file', which is `~/.emacs.bmk' by default."
- :type '(choice (const nil) (const t) integer)
+ :type '(choice (const nil) integer (other t))
:group 'bookmark)
The first three have the same meaning that they do for the
variable `version-control', and the final value `nospecial' means just
use the value of `version-control'."
- :type '(choice (const t) (const nil) (const never) (const nospecial))
+ :type '(choice (const nil) (const never) (const nospecial)
+ (other t))
:group 'bookmark)
;; some random value higher than 9600
(setq baud-rate 19200))
-;; XEmacs apparently call this `buffer-substring-without-properties',
-;; sigh.
-(or (fboundp 'buffer-substring-no-properties)
- (if (fboundp 'buffer-substring-without-properties)
- (fset 'buffer-substring-no-properties
- 'buffer-substring-without-properties)
- (fset 'buffer-substring-no-properties 'buffer-substring)))
\f
;;; Keymap stuff:
(bookmark-show-annotation bookmark)))))
+(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)
;; a leetle helper for bookmark-jump :-)
;; returns (BUFFER . POINT)
(info-node (bookmark-get-info-node str))
(orig-file file)
)
- (if (or
- (file-exists-p file)
- ;; else try some common compression extensions
- ;; and Emacs better handle it right!
- ;; Sigh: I think it may *not* be handled at the moment. What
- ;; to do about this?
- (setq file
- (or
- (let ((altname (concat file ".Z")))
- (and (file-exists-p altname)
- altname))
- (let ((altname (concat file ".gz")))
- (and (file-exists-p altname)
- altname))
- (let ((altname (concat file ".z")))
- (and (file-exists-p altname)
- altname)))))
+ (if (setq file (bookmark-file-or-variation-thereof file))
(save-excursion
(save-window-excursion
(if info-node
(let ((start (point)))
(prog1
(insert (bookmark-location bookmark)) ; *Return this line*
- (if window-system
+ (if (and (display-color-p) (display-mouse-p))
(put-text-property start
(save-excursion (re-search-backward
"[^ \t]")
(define-key bookmark-bmenu-mode-map "j" 'bookmark-bmenu-this-window)
(define-key bookmark-bmenu-mode-map "\C-c\C-c" 'bookmark-bmenu-this-window)
(define-key bookmark-bmenu-mode-map "f" 'bookmark-bmenu-this-window)
+ (define-key bookmark-bmenu-mode-map "\C-m" 'bookmark-bmenu-this-window)
(define-key bookmark-bmenu-mode-map "o" 'bookmark-bmenu-other-window)
(define-key bookmark-bmenu-mode-map "\C-o"
'bookmark-bmenu-switch-other-window)
(insert " "))
(let ((start (point)))
(insert (bookmark-name-from-full-record full-record))
- (if window-system
+ (if (and (display-color-p) (display-mouse-p))
(put-text-property start
(save-excursion (re-search-backward
"[^ \t]")
(let ((start (save-excursion (end-of-line) (point))))
(move-to-column bookmark-bmenu-file-column t)
;; Strip off `mouse-face' from the white spaces region.
- (if window-system
+ (if (and (display-color-p) (display-mouse-p))
(remove-text-properties start (point)
'(mouse-face))))
(delete-region (point) (progn (end-of-line) (point)))
(bookmark-kill-line)
(let ((start (point)))
(insert (car bookmark-bmenu-hidden-bookmarks))
- (if window-system
+ (if (and (display-color-p) (display-mouse-p))
(put-text-property start
(save-excursion (re-search-backward
"[^ \t]")