* lisp/emacs-lisp/ert.el (ert-results-mode): Set revert-buffer-function
to re-run the same test selection. It is a good fit and permits use of
the standard "g" key binding.
Stephen Berman [Tue, 16 Jul 2019 09:04:56 +0000 (11:04 +0200)]
Prevent infinite loop on entering wdired-mode
* lisp/wdired.el (wdired-preprocess-symlinks): Remove unneeded use
of beginning-of-line, which also triggers an infinite loop in a
find-dired buffer that doesn't end with a newline (see discussion
in bug#35609).
Stefan Monnier [Mon, 15 Jul 2019 19:28:07 +0000 (15:28 -0400)]
* lisp/gnus/nntp.el: Use lexical-binding
(nntp-server-action-alist): Expose the code to the compiler.
(nntp-with-open-group-function): No need to obfuscate identifiers any more.
(nntp-authinfo-rejected): Use `define-error`.
Fix INITIAL-INPUT cons handling in ido-read-internal
* lisp/ido.el (ido-read-internal): Is INITIAL-INPUT is a cons that
specifies cursor position, adjust the number to be palatable for
`read-for-minibuffer' (bug#27807).
Fix saving certificates in the NSM on high security levels
* lisp/net/nsm.el (nsm-check-certificate): `nsm-fingerprint-ok-p'
will save the fingerprint in the correct temporary/permanent
storage, so saving it once more (in the permanent storage) if the
security level is high or greater is a mistake (bug#27823).
Michael Albinus [Mon, 15 Jul 2019 09:11:59 +0000 (11:11 +0200)]
Fix edge cases in Tramp's copy
* lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band):
Special handling for "rsync".
(tramp-find-inline-compress): Make check more robust on MS Windows.
* lisp/ffap.el (ffap-prompter, ffap-other-window)
(ffap-other-frame, ffap-read-only)
(ffap-read-only-other-window, ffap-read-only-other-frame)
(ffap-alternate-file, ffap-alternate-file-other-window)
(ffap-literally): Rework to be able to specify different prompts
for different actions (bug#30284) and don't use
`call-interactively' all over the place.
Stefan Monnier [Fri, 5 Jul 2019 18:00:22 +0000 (14:00 -0400)]
; Add comment to hash_table_rehash (Bug#36447)
* src/fns.c (hash_table_rehash): Add a comment to explain that
hash_table_rehash is not used in "normal" rehashing, but only in the
rare case of rehashing on the first access to a preloaded hash-table.
* lisp/vc/vc-dir.el (vc-dir-clean-files): Rename from
vc-dir-delete-files-no-vc, and work on unregistered files only
(bug#31732).
(vc-dir-menu-map): Adjust command name.
Stefan Kangas [Tue, 2 Jul 2019 01:06:37 +0000 (03:06 +0200)]
Restore focus to Bookmark List after editing annotation
There are two entry points to bookmark-edit-annotation-mode: the first
when we add a bookmark and bookmark-use-annotations is non-nil; the
second when bookmark-bmenu-edit-annotation is run from the bookmark
list. When editing is concluded, in the first case, we should just
quit window. In the second case, we should instead return to the
bookmark list.
* lisp/bookmark.el (text-property-search): Require.
(bookmark-annotation-name): Make buffer-local and improve doc string.
(bookmark--annotation-from-bookmark-list): New buffer-local variable.
(bookmark-edit-annotation): New argument from-bookmark-list sets
bookmark--annotation-from-bookmark-list.
(bookmark-bmenu-edit-annotation): Call bookmark-edit-annotation with
argument from-bookmark-list set to t.
(bookmark-send-edited-annotation): When editing originated in the
bookmark list, restore focus to bookmark list and move point back to
edited bookmark. (Bug#20150)
(bookmark-edit-annotation-mode): Fix typo.
(bookmark-bmenu-buffer): New variable.
(bookmark-bmenu-surreptitiously-rebuild-list)
(bookmark-bmenu-list): Use it.
* test/lisp/bookmark-tests.el (with-bookmark-bmenu-test): New macro.
(bookmark-tests-set/bookmark-use-annotations-t)
(bookmark-bmenu-edit-annotation/show-annotation)
(bookmark-bmenu-send-edited-annotation)
(bookmark-bmenu-send-edited-annotation/restore-focus): New test cases.
Marco Wahl [Thu, 4 Jul 2019 20:32:44 +0000 (22:32 +0200)]
New function for scroll-lock-mode to almost always scroll
* lisp/scroll-lock.el (scroll-lock-next-line-always-scroll): New
function. Opposed to scroll-lock-next-line it does not switch to
forward-line at eob. S-down is the default key binding for this
function. (Bug#36494)
* test/lisp/scroll-lock-tests.el: A few tests for
scroll-lock-next-line-always-scroll.
* etc/NEWS: Announce the new command.
Paul Eggert [Sat, 13 Jul 2019 23:42:18 +0000 (16:42 -0700)]
Avoid interleaving stderr lines when shutting down
* src/emacs.c (shut_down_emacs) [!DOS_NT]: Avoid interleaving
to stderr in the usual case, by using a single write and by
appending a newline.
* src/sysdep.c (emacs_backtrace) [HAVE_BACKTRACE_SYMBOLS_FD]:
Omit newline since shut_down_emacs now does that.
Paul Eggert [Sat, 13 Jul 2019 19:31:41 +0000 (12:31 -0700)]
Use a better buffer size in emacs_perror
* src/sysdep.c (emacs_perror): Since the buffer is for avoiding
interleaving, size it via PIPE_BUF not BUFSIZ.
* src/sysstdio.h (PIPE_BUF): Provide a default.
Paul Eggert [Sat, 13 Jul 2019 17:41:46 +0000 (10:41 -0700)]
Avoid interleaving stderr in dump_fingerprint
* src/fns.c (hexbuf_digest): New function, containing most of
the old make_digest_string.
(make_digest_string): Use it.
* src/pdumper.c (dump_fingerprint): Rewrite to use a single
fprintf call, to avoid interleaving on GNU/Linux.
Paul Eggert [Sat, 13 Jul 2019 16:39:09 +0000 (09:39 -0700)]
Avoid interleaving stderr in a few cases
* src/sysdep.c (buferr): New static var.
(init_standard_fds) [_PC_PIPE_BUF]: Initialize it.
(errstream, errputc, verrprintf, errwrite): New functions.
(close_output_streams): Check buferr status too.
* src/xdisp.c: Include sysstdio.h instead of stdio.h.
(message_to_stderr, vmessage): Use the new functions
to avoid interleaving stderr.
* lisp/emacs-lisp/nadvice.el (advice--make-docstring): Make the
bit about the function/macro having an advice into a complete
sentence (bug#31063) and make it less dramatic.
* src/callint.c (Finteractive): Any other format spec than %s will
bug out with "Format specifier doesn’t match argument type", so
say explicitly that only %s is supported (bug#31314).
Phil Sainty [Sat, 13 Jul 2019 11:20:40 +0000 (23:20 +1200)]
* lisp/so-long.el (so-long-variable-overrides): Use correct bidi option
Set 'bidi-paragraph-direction' to 'left-to-right', rather than setting
'bidi-display-reordering' to nil, as the latter is only intended for
use when debugging the display code.
Michael Albinus [Sat, 13 Jul 2019 11:33:10 +0000 (13:33 +0200)]
Make check for compression programs more robust in Tramp
* lisp/net/tramp-sh.el (tramp-inline-compress-start-size):
Revert change of init value. We fix this differently.
(tramp-find-inline-compress): Check also the output of the
processes, not only the return code.
Eli Zaretskii [Sat, 13 Jul 2019 09:47:02 +0000 (12:47 +0300)]
Fix TTY menus in GUD and GDB-MI modes
* lisp/menu-bar.el (menu-bar-open): Accept a numerical
argument interactively, and drop down menu at that X
coordinate.
(popup-menu): Detect when MENU is not a list. (Bug#36613)
Eli Zaretskii [Sat, 13 Jul 2019 08:32:18 +0000 (11:32 +0300)]
Avoid loading mule-util at startup
* lisp/international/mule-util.el (char-displayable-p): Move
from here...
* lisp/international/mule.el (char-displayable-p): ...to
here. This avoids always loading mule-util at startup due
to a call to 'char-displayable-p' in
'startup--setup-quote-display'.
Dima Kogan [Sun, 30 Jun 2019 17:37:53 +0000 (10:37 -0700)]
Add ability to highlight-lines-matching-regexp directly from Isearch
* lisp/isearch.el: Implement the new functionality.
(isearch-highlight-lines-matching-regexp): New function bound
to 'M-s h l' in isearch.
(isearch--highlight-regexp-or-lines): New internal function.
* etc/NEWS (Search and Replace): Mention this change.
* doc/emacs/search.texi (Special Isearch): Document 'M-s h l'.
(Bug#18241)
Phil Sainty [Fri, 2 Nov 2018 01:51:21 +0000 (14:51 +1300)]
Add so-long library
* lisp/so-long.el: New library.
* doc/emacs/trouble.texi (Long Lines): New node covering so-long.el.
* doc/emacs/emacs.texi (Top): Add menu entry for the Long Lines node.
* etc/NEWS: Include under "New Modes and Packages in Emacs 27.1"
Paul Eggert [Sat, 13 Jul 2019 05:29:02 +0000 (22:29 -0700)]
Replace Vdead with tagged pointer
This speeds up ‘make compile-always’ by 0.1% on my platform.
Suggested by Pip Cet in:
https://lists.gnu.org/r/emacs-devel/2019-07/msg00257.html
* src/.gdbinit (pwinx, pgx, xbuffer, xprintstr):
Output dead_object () as "DEAD".
* src/alloc.c (Vdead, DEADP): Remove.
All uses replaced by dead_object () / deadp.
(deadp): New function.
(init_alloc_once_for_pdumper): Remove no-longer-needed
initialization.
* src/lisp.h (dead_object): New function.