Eli Zaretskii [Sat, 23 Nov 2019 11:37:28 +0000 (13:37 +0200)]
Improve indexing of modifier keys
* doc/emacs/commands.texi (User Input): Add index entry for
the Alt key serving as Meta.
* doc/emacs/custom.texi (Modifier Keys): Add index entries for
Alt, Super, and Hyper modifier keys. (Bug#38315)
Eli Zaretskii [Sat, 23 Nov 2019 10:43:49 +0000 (12:43 +0200)]
Fix cursor display at EOL before extended face
* src/xdisp.c (extend_face_to_end_of_line): Make sure the
character position of the stretch glyph inserted to extend the
face is zero, as various other parts of the display code rely
on that. (Bug#38330)
Eli Zaretskii [Sat, 23 Nov 2019 09:27:43 +0000 (11:27 +0200)]
Fix and speed up en/decoding of UTF-8 strings
* src/coding.c (get_char_bytes, encode_string_utf_8)
(decode_string_utf_8): Fix commentary.
(encode_string_utf_8): Return the original ASCII string only
if NOCOPY is non-zero.
(decode_string_utf_8): Accept 2 additional arguments STR and
STR_LEN, which allow to pass the input text as a C string.
(make_string_from_utf8): Delegate the job to decode_string_utf_8.
* src/coding.h: Update the prototype of decode_string_utf_8.
* src/json.c (json_encode): Call encode_string_utf_8.
Eli Zaretskii [Fri, 22 Nov 2019 14:36:25 +0000 (16:36 +0200)]
Fix uses of inhibit-message in package.el
* lisp/emacs-lisp/package.el (package-generate-autoloads)
(package--compile, package--save-selected-packages): Don't use
'inhibit-message' to bind 'noninteractive' and 'save-silently',
since 'inhibit-message' already disables all messages.
(Bug#38264)
João Távora [Wed, 20 Nov 2019 00:11:00 +0000 (00:11 +0000)]
Make auth-source-pass-search understand port lists
For cases such as a typical IMAP Gnus setup, auto-source-pass-search
is passed a list of "port aliases" like (993 "imaps" "imap" "993"
"143") in hopes of finding a matching ~/.password-store entry.
This modification makes this library understand and unroll the port
list so that, i.e. "domain:993", "domain:imaps"", "domain:imap",
etc. are computed as potential suffixes. Previously a nonsensical
string "domain:(993 imaps imap ...)" was returned.
* lisp/auth-source-pass.el
(auth-source-pass--generate-entry-suffixes): Allow PORT to be a list
of ports.
Handle the case where the token is not in `smie-grammar`, either because
the caller is making an error, or because it's a paren-like token that's
not handled in the grammar but directly via the syntax tables.
Eric Abrahamsen [Thu, 21 Nov 2019 18:08:41 +0000 (10:08 -0800)]
Fix Gnus summary backtab keybindings to use button-based functions
* lisp/gnus/gnus-sum.el (gnus-summary-mode-map,
gnus-summary-article-map): Backtab should call
gnus-summary-button-backward, not gnus-summary-widget-backward.
Eli Zaretskii [Thu, 21 Nov 2019 14:07:19 +0000 (16:07 +0200)]
Support 'vc-region-history' for Mercurial
* lisp/vc/vc-hg.el (vc-hg-region-history)
(vc-hg-region-history-font-lock, vc-hg-region-history-mode):
New functions.
(vc-hg-region-history-mode-map)
(vc-hg--log-view-long-font-lock-keywords)
(vc-hg-region-history-font-lock-keywords): New variables.
* lisp/vc/vc-git.el (vc-git-region-history): Update commentary.
* doc/emacs/maintaining.texi (VC Change Log): Add
'vc-region-history' to the table at beginning of node. Update
the VCSes that support 'vc-region-history'.
* lisp/auth-source.el (auth-source-netrc-looking-at-one): New
function, extracted from auth-source-netrc-parse-one.
(auth-source-netrc-parse-one, authinfo--hide-passwords): Use
auth-source-netrc-looking-at-one (bug#38311).
Juri Linkov [Wed, 20 Nov 2019 22:59:49 +0000 (00:59 +0200)]
* lisp/image.el: Mouse-wheel scaling on images (bug#38187)
* lisp/image.el (image-mouse-increase-size)
(image-mouse-decrease-size): New commands.
(image-map): Bind C-wheel-down and C-mouse-5 to
image-mouse-decrease-size, C-wheel-up and C-mouse-4 to
image-mouse-increase-size.
Michael Albinus [Wed, 20 Nov 2019 12:45:30 +0000 (13:45 +0100)]
Add renaming of remote buffer file names to Tramp
* doc/misc/tramp.texi (Default User): Fix typo.
(Cleanup remote connections): Adapt arguments of
`tramp-cleanup-connection'.
(Renaming remote files): New node.
(Frequently Asked Questions): New item "How to save files when a
remote host isn't reachable anymore?".
* etc/NEWS: Add `tramp-rename-files' and `tramp-rename-these-files'.
* lisp/net/tramp-cmds.el (tramp-default-rename-alist)
(tramp-confirm-rename-file-names): New defcustoms.
(tramp-rename-read-file-name-dir)
(tramp-rename-read-file-name-init): New defsubsts.
(tramp-default-rename-file, tramp-rename-files)
(tramp-rename-these-files): New defuns.
* lisp/net/tramp-integration.el (ido, ivy): Integrate with them.
Make with-suppressed-warnings work for macros, too
* lisp/emacs-lisp/macroexp.el (macroexp-macroexpand): Pass the
macro/alias symbol on to byte-compile-warning-enabled-p so that
with-suppressed-warnings works for macros, too.
Robert Pluim [Wed, 20 Nov 2019 10:55:42 +0000 (11:55 +0100)]
Remove info references to gmane web search
* doc/misc/gnus.texi (Foreign Groups, Web Searches, What is nnir?):
(Setting up nnir, Associating Engines, The imap Engine):
(Customizations): Remove references to gmane web search.
Stephen Gildea [Wed, 20 Nov 2019 05:26:09 +0000 (21:26 -0800)]
Expand coverage of unit tests for time-stamp
* test/lisp/time-stamp-tests.el: Remove redundant word "test"
from the names of all the tests.
(time-stamp-custom-time-zone, time-stamp-custom-pattern,
time-stamp-custom-inserts-lines, time-stamp-custom-count,
time-stamp-helper-safe-locals): New tests
Paul Eggert [Wed, 20 Nov 2019 02:23:01 +0000 (18:23 -0800)]
Make .pdmp file more reproducible
Problem reported by Ulrich Müller
<https://lists.gnu.org/r/emacs-devel/2019-11/msg00757.html>
and diagnosed by Andreas Schwab
<https://lists.gnu.org/r/emacs-devel/2019-11/msg00774.html>.
* src/sysdep.c (maybe_disable_address_randomization):
Disable ASLR if any kind of dumping, instead of merely if
unexec dumping. Omit first arg for simplicity; all uses changed.
Eli Zaretskii [Tue, 19 Nov 2019 15:48:55 +0000 (17:48 +0200)]
Fix updating members of zip archives
* lisp/arc-mode.el (archive-zip-case-fiddle): Change the
default to nil except on MS-DOS. Update the doc string to
make clear that a non-nil value also affects updating the
archive. (Bug#38260)
Robert Pluim [Mon, 18 Nov 2019 09:57:55 +0000 (10:57 +0100)]
Don't error when comparing IPv4 and IPv6 addresses
* lisp/net/nsm.el (nsm-network-same-subnet): Compare lengths of
local-ip and ip; different lengths can never match.
(nsm-should-check): Chop port off end of address.
* lisp/image.el (image-type): Allow passing in the image type.
(create-image): Make conversion work with data in addition to files.
* lisp/image/image-converter.el (image-convert-p): Allow taking
working on data in addition to files (bug#38036).
(image-convert): Ditto.
(image-converter--convert): Extend signature to say whether we're
getting a file or data.
(image-converter--convert-magick): Convert data.
(image-converter--convert): Ditto.
Juri Linkov [Mon, 18 Nov 2019 21:53:11 +0000 (23:53 +0200)]
* lisp/vc/ediff-util.el: Set this-command to ediff-quit (bug#38219)
* lisp/vc/ediff-util.el (ediff-toggle-read-only, ediff-quit):
Set this-command to the same command after using y-or-n-p
that doesn't guarantee to keep this-command unchanged
to check it later for some contrived logic.
* lisp/emacs-lisp/cl-extra.el (cl-prettyexpand): This function has
apparently not worked for at least a couple of decades
(bug#38206) unless supplied with a FULL parameter. Make the FULL
parameter obsolete and make the function always work as it did
with a non-nil FULL.
Phil Sainty [Sat, 16 Nov 2019 02:48:44 +0000 (15:48 +1300)]
lisp/so-long.el: Refactor menu action commands
* lisp/so-long.el (so-long-menu): Call `so-long' with an ACTION
argument instead of using `so-long-menu-item-replace-action'.
(so-long-menu-item-replace-action): Remove the deprecated function.
* test/lisp/so-long-tests/so-long-tests.el
(so-long-tests-so-long-menu-item-replace-action): Update the test.
Phil Sainty [Sat, 16 Nov 2019 13:11:20 +0000 (02:11 +1300)]
* lisp/so-long.el (so-long): Firstly revert the existing action, if any
This makes `so-long' consistent with the action commands in the menu.
If multiple actions were to be layered on top of one another, we would
lose the ability to revert to the normal state. Custom actions
combining multiple other actions can be defined if necessary.
Stefan Monnier [Sat, 16 Nov 2019 01:39:00 +0000 (14:39 +1300)]
lisp/so-long.el: Use (interactive "@") for menu commands
* lisp/so-long.el (so-long-menu, so-long-menu-item-replace-action)
(so-long-revert): Use interactive code "@", replacing all uses of
`so-long-menu-click-window'. This approach leaves the window selected
afterwards, whereas the old code did not; but that is not a problem.
(so-long-menu-click-window, so-long-menu-item-revert): Remove the
deprecated functions.
* test/lisp/so-long-tests/so-long-tests.el
(so-long-tests-so-long-menu-item-replace-action): Update the test.
Co-authored-by: Phil Sainty <psainty@orcon.net.nz>
* configure.ac (HAVE_HARFBUZZ): Remove the check for explicit
harfbuzz -- have_harfbuzz defaults to "yes", so we have no way of
checking whether the user really asked for it, apparently.
(do-after-load-evaluation): Replace run-with-timer with run-with-idle-timer
to give a chance for the minibuffer to handle initial events before sit-for.
https://lists.gnu.org/archive/html/emacs-devel/2019-11/msg00581.html
* src/xftfont.c (xftfont_open): FC_CHARCELL is apparently an alias
for FC_DUAL used in some east Asian fonts (bug#35079). Modelled
after a patch suggested by Kenichi Handa.
Eli Zaretskii [Sun, 17 Nov 2019 16:19:18 +0000 (18:19 +0200)]
Support more font weight values on MS-Windows
* src/w32font.c (w32_to_fc_weight): Support a few more weight
values, for compatibility with the GTK font selection widget
(see gtkutil.c:XG_WEIGHT_TO_SYMBOL). (Bug#24226)
Alan Mackenzie [Sun, 17 Nov 2019 14:59:42 +0000 (14:59 +0000)]
Compilation Mode: Fix arrow handling when compilation-context-lines is t
In particular, fix some exception occurrences, fix handling of a Compilation
Mode buffer being displayed in several windows, and fix the margin when
temporarily displaying a different buffer in a window, then returning to the
compilation mode buffer. The fix is relevant for frames without fringes,
e.g. tty frames.
* lisp/progmodes/compile.el: (compilation-set-window): Always set point to
(parameter) MK.
(compilation--set-up-margin, compilation--tear-down-margin): New functions.
(compilation--set-up-arrow-spec-in-margins)
(compilation--tear-down-arrow-spec-in-margins): Renamed by introducing -- and
pluralising margin to margins. Handle the margins in _all_ windows displaying
the pertinent buffer by using get-buffer-window-list. In ...--set-up-... add
compilation--set-up-margin to window-buffer-change-functions. In
...--tear-down-... remove the hook functions added in ...--set-up-....
* lisp/textmodes/table.el (table--put-cell-face-property)
(table--remove-cell-properties): Ensure that we don't lose the
table face when switching from buffers with font locking to ones
without (or vice versa) (bug#35481).
* lisp/gnus/gnus-icalendar.el (gnus-icalendar-insert-button):
* lisp/gnus/gnus-art.el (gnus-insert-mime-button)
(gnus-mime-display-alternative, gnus-insert-prev-page-button)
(gnus-insert-next-page-button)
(gnus-insert-mime-security-button): Make button-1 work on all the
Gnus buttons (bug#38144).
João Távora [Fri, 15 Nov 2019 20:27:18 +0000 (20:27 +0000)]
Make icomplete-tidy-shadowed-file-names less aggressive
When using this option and editing input, some transient situations
may arise that lead to file-name shadowing, but that shouldn't
necessarily lead to auto-delete behaviour, which will be suprising.
In '/foo/x/bar', if the user deletes the 'x', shadowing occurs, but
probably shouldn't. So, somewhat like ido-mode, only auto-tidy
shadowed file names if the user is inserting text at end of input.
Robert Pluim [Fri, 15 Nov 2019 10:23:20 +0000 (11:23 +0100)]
Used magic-fallback-mode-alist to detect .doc files (Bug#20891)
This avoids running doc-view-mode on files that are actually text
files.
* lisp/files.el (auto-mode-alist): Don't use doc-view-mode-maybe
for .doc (but continue to do so for .docx).
(magic-fallback-mode-alist): Add signature for .doc files.
Paul Eggert [Fri, 15 Nov 2019 09:28:33 +0000 (01:28 -0800)]
Port hexdigit init to non-GCC + pdumper
The old code assumed that hexdigit initialization (needed by
non-GCC) could be done in syms_of_character, but that is no longer
true with pdumper. Instead, simplify hexdigit init so that it can
be done statically on all C99 platforms. Problem discovered on
Solaris 10 sparc + Oracle Solaris Studio 12.6.
* src/character.c (hexdigit): Add 1 to every value; all uses
changed. This simplifies the initialization so that it can be
done statically on any C99 compiler. hexdigit is now always const.
(syms_of_character): Omit no-longer-necessary initialization.
* src/character.h (HEXDIGIT_CONST, HEXDIGIT_IS_CONST):
Remove. All uses removed.
Martin Rudalics [Fri, 15 Nov 2019 08:43:02 +0000 (09:43 +0100)]
In 'dframe-frame-mode' avoid 'switch-to-buffer' (Bug#37840)
* lisp/dframe.el (dframe-frame-mode): Use 'set-window-buffer'
instead of 'switch-to-buffer’ to avoid that
'switch-to-buffer-obey-display-actions' butts in (Bug#37840).