1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-20 18:17:20 +00:00
Commit Graph

132901 Commits

Author SHA1 Message Date
Basil L. Contovounesios
3dfec182d2 Modernise face specs and set version tags in eww/shr
* lisp/net/shr.el (shr-strike-through, shr-link, shr-selected-link):
Set :version tag (bug#31200).

* lisp/net/eww.el (eww-form-text, eww-form-textarea):
* lisp/net/shr.el (shr-strike-through, shr-link, shr-selected-link):
Use (DISPLAY . PLIST) face spec syntax as recommended in
'(elisp) Defining Faces'.
2018-04-17 21:42:04 +02:00
Lars Ingebrigtsen
c99ba23160 When undoing a mark-as-read, display the group if it isn't
* lisp/gnus/gnus-group.el (gnus-group-jump-to-group): Return
whether we found the group.
(gnus-info-clear-data): Make the group visible if it wasn't.

* lisp/gnus/gnus-sum.el (gnus-group-make-articles-read): Ditto.
(gnus-update-read-articles): Ditto.
2018-04-17 21:32:25 +02:00
Juri Linkov
0c9e3df3c2 Use next-error-found to set next-error-last-buffer.
https://lists.gnu.org/archive/html/emacs-devel/2018-04/msg00207.html

* lisp/simple.el (next-error-buffer): New buffer-local variable
instead of making buffer-local next-error-last-buffer.  (Bug#20489)
(next-error-found-function): New defcustom.
(next-error-buffer-on-selected-frame): Use t for avoid-current arg
of next-error-buffer-p.
(next-error-find-buffer): Add second rule for using the current
next-error-buffer if it's not visited by other navigation.
(next-error, next-error-internal): Call next-error-found.
(next-error-found): New function with body extracted mostly from
next-error.

* lisp/vc/add-log.el (change-log-goto-source-internal): New function
with body from change-log-goto-source.
(change-log-goto-source): Call change-log-goto-source-internal and
next-error-found.
(change-log-next-error): Call change-log-goto-source-internal
instead of change-log-goto-source.
(change-log-mode): Don't set next-error-last-buffer.  (Bug#28864)

* lisp/vc/diff-mode.el (diff-goto-source): Call next-error-found.

* lisp/progmodes/xref.el (xref-goto-xref): Call next-error-found.

* lisp/replace.el (occur-mode-goto-occurrence)
(occur-mode-goto-occurrence-other-window)
(occur-mode-display-occurrence): Call next-error-found.
(occur-next-error): Remove unnecessary with-current-buffer.
(Bug#27362, bug#30646)
2018-04-17 22:27:48 +03:00
Lars Ingebrigtsen
d12800303f Tweak shr window width computation
* lisp/net/shr.el (shr-insert-document): The computation of the
window width is apparently one pixel too wide for the shr line
folding algorithm (bug#31196).
2018-04-17 20:34:12 +02:00
Lars Ingebrigtsen
01a32a0f97 (gnus-summary-select-article-buffer): Further point placing tweak
* lisp/gnus/gnus-sum.el (gnus-summary-select-article-buffer):
Further tweak for the previous point-placing tweak.
2018-04-17 20:09:28 +02:00
Lars Ingebrigtsen
c90984250b Tweak point placement in gnus-summary-select-article-buffer
* lisp/gnus/gnus-sum.el (gnus-summary-select-article-buffer):
Ensure that point is where it's supposed to be after switching to
the article buffer.
2018-04-17 20:02:26 +02:00
Lars Ingebrigtsen
62a075b016 Make the `c' command work in a single-article Gnus view
* lisp/gnus/gnus-art.el (gnus-article-read-summary-keys): Make `c'
work from the article buffer (bug#31195) when no summary buffer is
shown.
2018-04-17 19:34:40 +02:00
Lars Ingebrigtsen
1d5d23a9f6 Place point consistently in the Gnus group buffer on exit
* lisp/gnus/gnus-sum.el (gnus-summary-exit): Place point correctly
when exiting with `q' (and the like) from the article buffer when
only the article buffer is displayed (bug#31195).  This is
apparently yet another fall-out from the "preserve-visible-point-
in-windows" patches of yesteryear...
2018-04-17 19:21:42 +02:00
Lars Ingebrigtsen
950d6cc744 Reimplement shr-next-link' and shr-previous-link'
* lisp/net/shr.el (shr-next-link): Use
`text-property-search-forward'.
(shr-previous-link): Use `text-property-search-backward'.
2018-04-17 18:53:23 +02:00
Lars Ingebrigtsen
6f572972d1 Add text-property-search-forward' and -backward'
* doc/lispref/text.texi (Property Search): Document
`text-property-search-forward' and `text-property-search-backward'.

* lisp/emacs-lisp/text-property-search.el: New file.
2018-04-17 18:53:23 +02:00
Tino Calancha
c969fbd40b * lisp/textmodes/artist.el (artist-mode): Ensure we have a font 2018-04-17 22:20:28 +09:00
Katsumi Yamaoka
003071346c * lisp/mail/sendmail.el (mail-sendmail-undelimit-header): Work for
the case where the mail header separator has already been deleted.
2018-04-17 06:22:17 +00:00
Lars Ingebrigtsen
b0d261e29e (gnus-group-goto-group): Return correct value after previous patch
* lisp/gnus/gnus-group.el (gnus-group-goto-group): Return the
correct value after the previous patch.
2018-04-17 02:11:02 +02:00
Lars Ingebrigtsen
c8be645598 Fix inconsistent point movement in the Gnus group buffer
* lisp/gnus/gnus-group.el (gnus-group-goto-group): If we can't
find the group we're looking for, then don't move point at all
(bug#23021).
2018-04-16 23:10:03 +02:00
Lars Ingebrigtsen
36e5673753 (artist-mode): Warn about proportional fonts
* lisp/textmodes/artist.el (artist-mode): Warn about proportional
fonts (bug#24175).
2018-04-16 21:20:08 +02:00
Lars Ingebrigtsen
e1a0cbbcf8 Make mail-sendmail-undelimit-header actually remove the delimiter
* lisp/mail/sendmail.el (mail-sendmail-undelimit-header): Actually
remove the mail header separator (bug#17488).  In all the cases
where this is called, the separator will probably already have
been removed, so the only thing this does is place point at the
end of the headers.
2018-04-16 13:58:39 +02:00
Lars Ingebrigtsen
6ec3ec7fbe (semantic-symref-results-mode-map): Fix typo in previous check-in
* lisp/cedet/semantic/symref/list.el
(semantic-symref-results-mode-map): Fix typo in previous check-in.
2018-04-16 13:48:44 +02:00
Philipp Stephani
9f2d21ca53 Avoid undefined behavior in 'defvar' (Bug#31072)
* src/eval.c (Fdefvar): Check that first argument is a symbol.
* test/src/eval-tests.el (defvar/bug31072): New unit test.
2018-04-15 23:50:06 -07:00
Stefan Monnier
836dce63c3 EUDC: Enable lexical binding and do some cleanups
* lisp/net/eudc.el: Enable lexical binding.
(cl-lib): Always require cl-lib, not only when byte compiling.
(eudc-mode-map): Set parent keymap within let form.
(eudc-update-local-variables): Use #' read syntax for function
argument to map function.
(eudc-select): Likewise.
(eudc-format-attribute-name-for-display): Likewise
(eudc-filter-duplicate-attributes): Likewise.
(eudc-format-query): Likewise.
(eudc-expand-inline): Likewise.
(eudc-query-form): Likewise.
(eudc-print-attribute-value): Use mapc instead of mapcar.
(eudc-filter-partial-records): Use cl-every.
(eudc-distribute-field-on-records): Use delete-dups to
simplify function.
(eudc-expand-inline): Replace while with dolist and let form.
(eudc-query-form): Set inhibit-read-only after switching
buffers.  Remove useless and call.
(eudc-load-eudc): Add a FIXME comment.
2018-04-15 19:24:15 -04:00
Rüdiger Sonderfeld
7d0fa6081e In HTML mode, don't match </ with the wrong /
* lisp/textmodes/sgml-mode.el (sgml-slash): In HTML mode, don't
match <br /><h1>...</ with the preceding / (bug#16508).
2018-04-15 23:56:24 +02:00
Lars Ingebrigtsen
99323422a5 Use quit-buffer instead of semantic-symref-hide-buffer
* lisp/cedet/semantic/symref/list.el
(semantic-symref-hide-buffer): Removed (bug#15857).
(semantic-symref-results-mode-map): Use quit-buffer instead.
2018-04-15 23:44:56 +02:00
Lars Ingebrigtsen
9e4cae7bc9 Doc string update for gnus-extract-address-components
* lisp/gnus/gnus-util.el (gnus-extract-address-components): Doc
update.
2018-04-15 23:12:26 +02:00
Lars Ingebrigtsen
003a89b6c8 Add an undo command to url-cookie-mode
* lisp/url/url-cookie.el (url-cookie-undo): New command and
keystroke (bug#16650).
2018-04-15 22:48:28 +02:00
Lars Ingebrigtsen
f262b10b46 Tweak the look of the cookie buffer after cookie deletion
* lisp/url/url-cookie.el (url-cookie--generate-buffer): Factor out
into its own function.
(url-cookie-delete): Use it to make the buffer look consistent
after deleting a cookie.
2018-04-15 22:36:16 +02:00
Lars Ingebrigtsen
a37a14e0a8 Make eww handle "http://a/../../../g"
* lisp/net/eww.el (eww): Strip leading elements off URLs on the
form "http://a/../../../g", because that's what all the other
browsers do (bug#8622).
2018-04-15 22:20:28 +02:00
Lars Ingebrigtsen
1c16fbd1b2 Make url-cookie-write-file be more permissive
* lisp/url/url-cookie.el (url-cookie-write-file): If
`url-cookie-file' isn't set (due to url.el not being used yet),
don't error out in this function (bug#23183).
2018-04-15 21:50:38 +02:00
Lars Ingebrigtsen
2e1caf3254 Don't warn the user about large files if they are unreadable
* lisp/files.el (abort-if-file-too-large): There's no point in
warning the user about a too-large file if we're not able to read
it (bug#29549).  Hopefully this doesn't introduce a race condition
between this test and the `file-readable-p' test later.
2018-04-15 21:03:34 +02:00
Lars Ingebrigtsen
b72de45eb0 Only save the mailer choice after sending the mail
* lisp/mail/sendmail.el (sendmail-query-once): Only save the
mailer choice after we've sent the mail, so that if that fails,
the user has an easy way to back out of the choice and make
another (bug#14487).
(sendmail-query-user-about-smtp): Return the choice; don't save it.
2018-04-15 20:42:44 +02:00
Lars Ingebrigtsen
54f7ec01c3 (compose-mail): Give a better error message for `mail-user-agent'
* lisp/simple.el (compose-mail): Give a better error message for
invalid values for `mail-user-agent' (bug#17979).
2018-04-15 20:06:27 +02:00
Lars Ingebrigtsen
1143906b79 Fix typo in gnus.texi
* doc/misc/gnus.texi (Summary Message Commands): Fix typo in last
change.
2018-04-15 19:53:27 +02:00
Lars Ingebrigtsen
652ce40c50 Update doc string after previous ietf-drums change
* lisp/mail/ietf-drums.el (ietf-drums-parse-address): Doc fix
after previous change.
2018-04-15 19:49:47 +02:00
Lars Ingebrigtsen
47d52c2255 mail-extr.el: Mention `mail-header-parse-address' in the doc string
* lisp/mail/mail-extr.el (mail-extract-address-components):
Mention `mail-header-parse-address' in the doc string.
2018-04-15 19:45:05 +02:00
Lars Ingebrigtsen
a38f79a8fd Allow `mail-header-parse-address' to decode encoded words
* lisp/mail/ietf-drums.el (ietf-drums-parse-address): Take an
optional parameter to decode the display name.
2018-04-15 19:42:10 +02:00
Lars Ingebrigtsen
a3a9d5434d Revert "Make mail-extract-address-components return the user name more"
This reverts commit 8b50ae8b22.

According to tests in bug#27656 by OGAWA Hirofumi, this patch
led to wrong results when binding

(dolist (addr '("Rasmus <rasmus@gmx.us>" "Rasmus <mbox@gmx.us>"))
  (dolist (ignore-single '(t nil))
    (dolist (ignore-same '(t nil))
      (let ((mail-extr-ignore-single-names ignore-single)
	    (mail-extr-ignore-realname-equals-mailbox-name ignore-same))
	(message "%s" (mail-extract-address-components addr))))))

in combination.
2018-04-15 19:28:04 +02:00
Lars Ingebrigtsen
60ec0c7960 Query the user whether to increase stack depth in shr
* lisp/net/shr.el (shr-insert-document): Bind `max-specpdl-size'
here... (bug#30675).
(shr-descend): So that we can increase it temporarily here if the
user wants to.
2018-04-15 19:01:32 +02:00
Lars Ingebrigtsen
e348910c7f Minor copy edit of etc/NEWS 2018-04-15 18:33:37 +02:00
Lars Ingebrigtsen
7cbe9628d1 * src/lread.c (openp): Add a comment before the now-obscure loop. 2018-04-15 18:14:49 +02:00
Lars Ingebrigtsen
874a724734 Clarify menu entry in previous check-in
* lisp/gnus/gnus-sum.el (gnus-summary-make-menu-bar): Menu bar
entry for it.
2018-04-15 18:13:23 +02:00
Lars Ingebrigtsen
bea6ae4e3e Add new command `gnus-summary-attach-article'
* doc/misc/gnus.texi (Summary Message Commands): Document it.

* lisp/gnus/gnus-msg.el (gnus-summary-attach-article): New command
and keystroke (bug#19788).

* lisp/gnus/gnus-sum.el (gnus-summary-make-menu-bar): Menu bar
entry for it.
2018-04-15 18:02:50 +02:00
Daiki Ueno
c3ca885f49 Divert to call `gnus-activate-group' with the SCAN argument set
* lisp/gnus/gnus-group.el (gnus-group-get-new-news-this-group):
Divert to call `gnus-activate-group' with the SCAN argument set,
if request-group-scan is not defined for the backend.  Ensure that
the server is open when calling `gnus-request-group-scan'
(bug#22649).
2018-04-15 16:11:46 +02:00
Lars Ingebrigtsen
eceb047cdb Abort Gnus exit if we have unsaved Message buffers
* lisp/gnus/gnus-group.el
(gnus--abort-on-unsaved-message-buffers): New function (bug#28843).
(gnus-group-exit): Use it to abort exit if we have unsaved Message
buffers.
2018-04-15 15:48:44 +02:00
Lars Ingebrigtsen
a5f2403cc2 Avoid an infloop in shr filling when not using fonts
* lisp/net/shr.el (shr-fill-line): If we have an indentation
that's wider than the width of what we're trying to fill, just
give up.  This avoids an infloop when `shr-use-fonts' in nil.
2018-04-15 15:17:15 +02:00
Lars Ingebrigtsen
ef599f6cac Remove calls from string-to-multibyte in nnheader/nntp
* lisp/gnus/nntp.el (nntp-copy-to-buffer): Apparently `insert' now
behaves more like string-make-multibyte, but it now behaves more
like string-to-multibyte, so remove that call here.  I'm not quite
sure I follow that logic, but apparently there are no ill effects.

* lisp/gnus/nnheader.el (nnheader-insert-buffer-substring): Ditto.
2018-04-15 01:07:38 +02:00
Lars Ingebrigtsen
1ad6184c37 Remove a string-to-multibyte from nnmh.el
* lisp/gnus/nnmh.el (nnmh-request-list-1): Remove superfluous
string-to-multibyte.
2018-04-15 00:57:40 +02:00
Lars Ingebrigtsen
3250651e9c Remove call to string-to-multibyte from nndoc.el
* lisp/gnus/nndoc.el (nndoc-oe-dbx-type-p): My testing shows that
no matter whether we're in a unibyte or a multibyte buffer, doing
the looking-at here without the string-to-multibyte, we'll get a
match.  We did not get a match with the call in and if we were in
a unibyte buffer, but we presumably never are.
2018-04-15 00:48:27 +02:00
Lars Ingebrigtsen
466693416d Fix calculation in gnus-update-group-mark-positions
* lisp/gnus/gnus-group.el (gnus-update-group-mark-positions):
Rewrite a call to string-to-multibyte that didn't even work.
After the rewrite it gives the correct result and should allow
people to customise Gnus group process mark positions (but that's
a pretty obscure feature).
2018-04-15 00:40:23 +02:00
Lars Ingebrigtsen
f0ec607d53 Removed outdated comment from nnweb.el
* lisp/gnus/nnweb.el (nnweb-insert-html): Removed ten year old
comment from Stefan about string-as-multibyte.
2018-04-15 00:32:10 +02:00
Lars Ingebrigtsen
9c5a9d4dd4 Rewrite Gnus calls to compat function mm-multibyte-p 2018-04-15 00:30:14 +02:00
Lars Ingebrigtsen
ad2c4d3c61 Rewrite string-as-unibyte/string-as-multibyte logic in nnmail
* lisp/gnus/nnmail.el (nnmail-insert-xref): Rewrite
string-as-unibyte/string-as-multibyte logic and confirm that the
result is the same in both multibyte and unibyte buffers after the
change.
2018-04-15 00:24:02 +02:00
Lars Ingebrigtsen
25487b921b Remove call to string-as-unibyte from nnmail
* lisp/gnus/nnmail.el (nnmail-parse-active): Remove call to
string-as-unibyte; the alist before and after the change are
`equal' to each other, so it should presumably have no impact.
2018-04-15 00:17:28 +02:00