Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
a285ce99
Commit
a285ce99
authored
Jun 26, 2013
by
Lars Magne Ingebrigtsen
Browse files
(eww-add-bookmark): Remove newlines from the title.
parent
2b4f0506
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
4 deletions
+7
-4
lisp/ChangeLog
lisp/ChangeLog
+1
-0
lisp/net/eww.el
lisp/net/eww.el
+6
-4
No files found.
lisp/ChangeLog
View file @
a285ce99
...
...
@@ -5,6 +5,7 @@
(eww-mode-map): Add a menu bar.
(eww-add-bookmark): New command.
(eww-bookmark-mode): New mode and commands.
(eww-add-bookmark): Remove newlines from the title.
2013-06-26 Glenn Morris <rgm@gnu.org>
...
...
lisp/net/eww.el
View file @
a285ce99
...
...
@@ -950,10 +950,12 @@ The browser to used is specified by the `shr-external-browser' variable."
(
when
(
equal
eww-current-url
(
plist-get
bookmark
:url
))
(
error
"Already bookmarked"
)))
(
let
((
title
(
replace-regexp-in-string
"[\n\t\r]"
" "
eww-current-title
)))
(
setq
title
(
replace-regexp-in-string
"\\` +\\| +\\'"
""
title
))
(
push
(
list
:url
eww-current-url
:title
eww-current-
title
:title
title
:time
(
current-time-string
))
eww-bookmarks
)
eww-bookmarks
)
)
(
eww-write-bookmarks
)
(
message
"Bookmarked %s (%s)"
eww-current-url
eww-current-title
))
...
...
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