Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
7d688336
Commit
7d688336
authored
Apr 19, 2013
by
Thierry Volpiatto
Committed by
Stefan Monnier
Apr 19, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* lisp/bookmark.el (bookmark-completing-read): Improve handling of empty
string. Fixes: debbugs:14176
parent
31dcede0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
16 deletions
+16
-16
lisp/ChangeLog
lisp/ChangeLog
+5
-0
lisp/bookmark.el
lisp/bookmark.el
+11
-16
No files found.
lisp/ChangeLog
View file @
7d688336
2013-04-19 Thierry Volpiatto <thierry.volpiatto@gmail.com>
* bookmark.el (bookmark-completing-read): Improve handling of empty
string (bug#14176).
2013-04-19 Stefan Monnier <monnier@iro.umontreal.ca>
* vc/vc-dispatcher.el (vc-do-command): Get rid of default sentinel msg.
...
...
lisp/bookmark.el
View file @
7d688336
...
...
@@ -427,8 +427,8 @@ just return it."
"Prompting with PROMPT, read a bookmark name in completion.
PROMPT will get a \": \" stuck on the end no matter what, so you
probably don't want to include one yourself.
Optional
second
arg DEFAULT is a string to return if the user
enters
the empty string
."
Optional arg DEFAULT is a string to return if the user
input is empty.
If DEFAULT is nil then return empty string for empty input
."
(
bookmark-maybe-load-default-file
)
; paranoia
(
if
(
listp
last-nonmenu-event
)
(
bookmark-menu-popup-paned-menu
t
prompt
...
...
@@ -437,22 +437,17 @@ the empty string."
'string-lessp
)
(
bookmark-all-names
)))
(
let*
((
completion-ignore-case
bookmark-completion-ignore-case
)
(
default
default
)
(
default
(
unless
(
equal
""
default
)
default
)
)
(
prompt
(
concat
prompt
(
if
default
(
format
" (%s): "
default
)
": "
)))
(
str
(
completing-read
prompt
(
lambda
(
string
pred
action
)
(
if
(
eq
action
'metadata
)
'
(
metadata
(
category
.
bookmark
))
(
complete-with-action
action
bookmark-alist
string
pred
)))
nil
0
nil
'bookmark-history
)))
(
if
(
string-equal
""
str
)
default
str
))))
": "
))))
(
completing-read
prompt
(
lambda
(
string
pred
action
)
(
if
(
eq
action
'metadata
)
'
(
metadata
(
category
.
bookmark
))
(
complete-with-action
action
bookmark-alist
string
pred
)))
nil
0
nil
'bookmark-history
default
))))
(
defmacro
bookmark-maybe-historicize-string
(
string
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment