From: Juri Linkov <juri@jurta.org>
To: Stefan Monnier <monnier@IRO.UMontreal.CA>
Cc: 12107@debbugs.gnu.org
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 [thread overview]
Message-ID: <87obmqb40s.fsf@mail.jurta.org> (raw)
In-Reply-To: <jwvzk6e17fy.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Wed, 01 Aug 2012 20:10:04 -0400")
> 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."
next prev parent reply other threads:[~2012-08-05 0:01 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-31 20:22 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 0:12 ` Juri Linkov
2012-08-01 1:09 ` Dani Moncayo
2012-08-01 8:19 ` Juri Linkov
2012-08-01 9:16 ` Dani Moncayo
2012-08-01 20:35 ` Stefan Monnier
2012-08-01 23:04 ` Juri Linkov
2012-08-02 0:10 ` Stefan Monnier
2012-08-02 8:03 ` Juri Linkov
2012-08-05 0:01 ` Juri Linkov [this message]
2012-08-08 8:49 ` Juri Linkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87obmqb40s.fsf@mail.jurta.org \
--to=juri@jurta.org \
--cc=12107@debbugs.gnu.org \
--cc=monnier@IRO.UMontreal.CA \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.