[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#12107: 24.1.50; In Info mode, add the name of the manual as completi
From: |
Juri Linkov |
Subject: |
bug#12107: 24.1.50; In Info mode, add the name of the manual as completion candidate for "bookmark-set" |
Date: |
Sun, 05 Aug 2012 03:01:39 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (x86_64-pc-linux-gnu) |
> Is there a good reason why we can't use a list in (car record) and avoid
> using a new `defaults' field?
> If so, please add a comment explaining it.
BTW, I noticed your comment about removing
`bookmark-insert-current-bookmark', so it could be
replaced with a list of the same default values for M-n
(this patch is an addition to the previous patch):
=== modified file 'lisp/bookmark.el'
--- lisp/bookmark.el 2012-08-04 23:12:29 +0000
+++ lisp/bookmark.el 2012-08-04 23:54:51 +0000
@@ -473,6 +473,12 @@ (defvar bookmark-make-record-function 'b
(defun bookmark-make-record ()
"Return a new bookmark record (NAME . ALIST) for the current location."
(let ((record (funcall bookmark-make-record-function)))
+ ;; Set up defaults.
+ (bookmark-prop-set
+ record 'defaults
+ (delq nil (delete-dups (append (bookmark-prop-get record 'defaults)
+ (list bookmark-current-bookmark
+ (bookmark-buffer-name))))))
;; Set up default name.
(if (stringp (car record))
;; The function already provided a default name.
@@ -738,10 +744,6 @@ (defvar bookmark-minibuffer-read-name-ma
(let ((map (make-sparse-keymap)))
(set-keymap-parent map minibuffer-local-map)
(define-key map "\C-w" 'bookmark-yank-word)
- ;; This C-u binding might not be very useful any more now that we
- ;; provide access to the default via the standard M-n binding.
- ;; Maybe we should just remove it? --Stef-08
- (define-key map "\C-u" 'bookmark-insert-current-bookmark)
map))
;;;###autoload
@@ -900,19 +902,6 @@ (defun bookmark-edit-annotation (bookmar
(bookmark-edit-annotation-mode bookmark-name-or-record))
-(defun bookmark-insert-current-bookmark ()
- "Insert into the bookmark name currently being set the value of
-`bookmark-current-bookmark' in `bookmark-current-buffer', defaulting
-to the buffer's file name if `bookmark-current-bookmark' is nil."
- (interactive)
- (let ((str
- (with-current-buffer bookmark-current-buffer
- (or bookmark-current-bookmark
- (bookmark-buffer-name)))))
- (insert str)))
-
-
(defun bookmark-buffer-name ()
"Return the name of the current buffer in a form usable as a bookmark name.
If the buffer is associated with a file or directory, use that name."
- bug#12107: 24.1.50; In Info mode, add the name of the manual as completion candidate for "bookmark-set", Juri Linkov, 2012/08/01
- bug#12107: 24.1.50; In Info mode, add the name of the manual as completion candidate for "bookmark-set", Dani Moncayo, 2012/08/01
- bug#12107: 24.1.50; In Info mode, add the name of the manual as completion candidate for "bookmark-set", Stefan Monnier, 2012/08/01
- bug#12107: 24.1.50; In Info mode, add the name of the manual as completion candidate for "bookmark-set", Juri Linkov, 2012/08/01
- bug#12107: 24.1.50; In Info mode, add the name of the manual as completion candidate for "bookmark-set", Stefan Monnier, 2012/08/01
- bug#12107: 24.1.50; In Info mode, add the name of the manual as completion candidate for "bookmark-set", Juri Linkov, 2012/08/02
- bug#12107: 24.1.50; In Info mode, add the name of the manual as completion candidate for "bookmark-set",
Juri Linkov <=
- bug#12107: 24.1.50; In Info mode, add the name of the manual as completion candidate for "bookmark-set", Juri Linkov, 2012/08/08