]> git.eshelyaron.com Git - emacs.git/log
emacs.git
4 years agoMerge from origin/emacs-27
Glenn Morris [Fri, 13 Nov 2020 16:58:06 +0000 (08:58 -0800)]
Merge from origin/emacs-27

75384bd155 Update the doc-view header line
13ab70c80e Avoid breaking Arabic shaping in 'window-text-pixel-size'
e693d97e50 doc-view.el comment clarification
968e85a2ce Update erc documentation about C-c C-b

4 years agoFix error with fn key in NS port (bug#44533)
Alan Third [Tue, 10 Nov 2020 12:54:50 +0000 (12:54 +0000)]
Fix error with fn key in NS port (bug#44533)

* src/nsterm.m ([EmacsView keyDown:]): Move the correction for fn key
handling to before the modifiers are calculated.

4 years agoSome minor Tramp fixes, resulting from test campaign
Michael Albinus [Fri, 13 Nov 2020 15:55:08 +0000 (16:55 +0100)]
Some minor Tramp fixes, resulting from test campaign

* lisp/net/tramp.el (tramp-handle-write-region):
* lisp/net/tramp-adb.el (tramp-adb-handle-write-region):
* lisp/net/tramp-sh.el (tramp-sh-handle-write-region):
* lisp/net/tramp-smb.el (tramp-smb-handle-write-region): Use `current-time'
if needed.

* lisp/net/tramp-gvfs.el (tramp-gvfs-gio-mapping):
(tramp-gvfs-do-copy-or-rename-file): Remove "gvfs-rename", it is
not trustworthy.

* test/lisp/net/tramp-tests.el (tramp-test07-file-exists-p): Check also for
symlinked files in trash.
(tramp-test20-file-modes): Revert last change, it was a thinko.

4 years agoDon't quote lambdas in several places
Stefan Kangas [Thu, 12 Nov 2020 21:06:47 +0000 (22:06 +0100)]
Don't quote lambdas in several places

* lisp/allout-widgets.el (allout-widgets-adjusting-message)
(allout-widgets-exposure-change-processor)
(allout-widgets-count-buttons-in-region):
* lisp/ansi-color.el (ansi-color-make-color-map):
* lisp/case-table.el (describe-buffer-case-table):
* lisp/emacs-lisp/byte-opt.el (byte-decompile-bytecode-1):
* lisp/gnus/gnus-agent.el (gnus-agent-regenerate-group):
* lisp/gnus/nnir.el (nnir-run-swish++, nnir-run-swish-e)
(nnir-run-hyrex, nnir-run-namazu):
* lisp/hippie-exp.el (make-hippie-expand-function)
(try-complete-lisp-symbol, try-complete-lisp-symbol-partially)
(try-expand-all-abbrevs):
* lisp/international/mule-cmds.el (sort-coding-systems)
(select-safe-coding-system, select-message-coding-system)
(read-language-name, encoded-string-description):
* lisp/international/quail.el (quail-keyseq-translate)
(quail-get-translations, quail-build-decode-map)
(quail-insert-decode-map):
* lisp/jka-compr.el (jka-compr-uninstall):
* lisp/locate.el (locate-in-alternate-database):
* lisp/mail/mailabbrev.el (mail-resolve-all-aliases-1)
(mail-abbrev-make-syntax-table):
* lisp/mh-e/mh-seq.el (mh-read-folder-sequences):
* lisp/net/eudcb-ldap.el (eudc-ldap-simple-query-internal):
* lisp/progmodes/make-mode.el (makefile-query-targets)
(makefile-prompt-for-gmake-funargs):
* lisp/shadowfile.el (shadow-cancel, shadow-shadows-of):
* lisp/sort.el (sort-pages, sort-fields, sort-regexp-fields):
* lisp/subr.el (listify-key-sequence):
* lisp/term/wyse50.el (terminal-init-wyse50):
* lisp/textmodes/ispell.el (ispell-help)
(ispell-begin-tex-skip-regexp):
* lisp/textmodes/page-ext.el (pages-sort-region):
* lisp/textmodes/refer.el (refer-find-entry-in-file):
* lisp/url/url-expand.el (url-expand-file-name): Don't quote lambdas.

4 years agoAdd help-char to the cache key in read-char-from-minibuffer as well
Juri Linkov [Thu, 12 Nov 2020 20:33:27 +0000 (22:33 +0200)]
Add help-char to the cache key in read-char-from-minibuffer as well

It's highly unlikely that help-char will be changed from its default value 8,
but formally there is a dependence on help-char.

4 years agoEmit required version when Harfbuzz is not found but Cairo is
Robert Pluim [Thu, 12 Nov 2020 15:51:49 +0000 (16:51 +0100)]
Emit required version when Harfbuzz is not found but Cairo is

* configure.ac: Define harfbuzz_required_ver with required
harfbuzz version, and put it in the warning message emitted when
Cairo is found but not HarfBuzz.

4 years agovhdl-mode: remove minor obstacle to static checking
Mattias Engdegård [Thu, 12 Nov 2020 09:39:36 +0000 (10:39 +0100)]
vhdl-mode: remove minor obstacle to static checking

* lisp/progmodes/vhdl-mode.el (vhdl-directive-keywords-regexp):
Remove unnecessary global variable.
(vhdl-words-init): Remove assignment.
(vhdl-font-lock-init): Inline expression.  Use regexp-opt.

4 years agoRemove mention of `edebug-on-signal' from a doc string
Lars Ingebrigtsen [Thu, 12 Nov 2020 12:39:40 +0000 (13:39 +0100)]
Remove mention of `edebug-on-signal' from a doc string

* lisp/emacs-lisp/edebug.el (edebug-mode): Don't mention
non-existent user option (bug#44577).

4 years agoClarify project-find-file doc string
Lars Ingebrigtsen [Thu, 12 Nov 2020 12:36:19 +0000 (13:36 +0100)]
Clarify project-find-file doc string

* lisp/progmodes/project.el (project-find-file): Don't say
anything about recognizing file names, as that may lead the user
to think that it'll check whether the string at point is an
existing file (bug#44588).

4 years agoAdd help-form to the cache key in read-char-from-minibuffer
Juri Linkov [Thu, 12 Nov 2020 07:38:21 +0000 (09:38 +0200)]
Add help-form to the cache key in read-char-from-minibuffer

4 years ago* test/lisp/help-fns-tests.el: Silence byte-compiler.
Stefan Kangas [Thu, 12 Nov 2020 02:27:26 +0000 (03:27 +0100)]
* test/lisp/help-fns-tests.el: Silence byte-compiler.

4 years ago* test/lisp/hfy-cmap-resources/rgb.txt: Add comment line.
Stefan Kangas [Thu, 12 Nov 2020 02:20:39 +0000 (03:20 +0100)]
* test/lisp/hfy-cmap-resources/rgb.txt: Add comment line.

4 years agoRemove redundant installation instructions
Stefan Kangas [Thu, 12 Nov 2020 01:55:02 +0000 (02:55 +0100)]
Remove redundant installation instructions

* lisp/net/newsticker.el:
* lisp/net/sieve-mode.el:
* lisp/play/bubbles.el:
* lisp/play/handwrite.el:
* lisp/progmodes/python.el:
* lisp/progmodes/ruby-mode.el:
* lisp/whitespace.el: Remove redundant installation instructions.
These packages are distributed with Emacs and/or GNU ELPA.
* lisp/calendar/timeclock.el:
* lisp/ehelp.el:
* lisp/emacs-lisp/checkdoc.el:
* lisp/filesets.el:
* lisp/mail/reporter.el:
* lisp/net/rfc2104.el:
* lisp/net/webjump.el:
* lisp/pixel-scroll.el: Remove redundant recommendation to call
require before using autoloaded functions.
* lisp/tar-mode.el: Remove reference to package uncompress, removed in
Emacs 23.

4 years ago* lisp/progmodes/ruby-mode.el (auto-mode-alist): Add Brewfile.
Stefan Kangas [Thu, 12 Nov 2020 01:28:10 +0000 (02:28 +0100)]
* lisp/progmodes/ruby-mode.el (auto-mode-alist): Add Brewfile.

4 years agoFix mistake in describe-buffer-bindings
Stefan Kangas [Mon, 9 Nov 2020 21:23:04 +0000 (22:23 +0100)]
Fix mistake in describe-buffer-bindings

* src/keymap.c (Fdescribe_buffer_bindings): Fix a call in
describe-buffer-bindings.  This fixes a mistake in my previous commit
to prefer the Lisp version of describe-map-tree (8a1441310aa1), where
0 was accidentally converted to Qt in two places.

4 years agoUse cache with help-char in read-char-from-minibuffer unless help-form is nil
Juri Linkov [Thu, 12 Nov 2020 01:38:44 +0000 (03:38 +0200)]
Use cache with help-char in read-char-from-minibuffer unless help-form is nil

4 years agoIn dired-query use read-char-from-minibuffer with bound help-char (bug#42708)
Juri Linkov [Wed, 11 Nov 2020 19:18:31 +0000 (21:18 +0200)]
In dired-query use read-char-from-minibuffer with bound help-char (bug#42708)

* lisp/dired-aux.el (dired-query): Replace read-char-choice call
with read-char-from-minibuffer.

* lisp/subr.el (read-char-choice): Restore the previous version
that uses read-key.
(read-char-from-minibuffer): Bind help-char to help-form-show
when help-form is non-nil.

4 years agoRemove unused "internal" gnus-search variables
Eric Abrahamsen [Wed, 11 Nov 2020 18:36:51 +0000 (10:36 -0800)]
Remove unused "internal" gnus-search variables

* lisp/gnus/gnus-search.el (gnus-search-memo-query,
gnus-search-memo-server): No longer needed.

4 years agoFix defgeneric name of gnus-search-index(ed)-extract
Eric Abrahamsen [Wed, 11 Nov 2020 17:34:53 +0000 (09:34 -0800)]
Fix defgeneric name of gnus-search-index(ed)-extract

* lisp/gnus/gnus-search.el (gnus-search-indexed-extract): Had the
wrong name on the generic.

4 years agoFix python-font-lock-keywords-maximum-decoration performance regression
Dario Gjorgjevski [Wed, 11 Nov 2020 11:27:59 +0000 (12:27 +0100)]
Fix python-font-lock-keywords-maximum-decoration performance regression

* lisp/progmodes/python.el
(python-font-lock-keywords-maximum-decoration): `symbol-name'
should not be quantified by a `+' as it is redundant and performs
very badly (bug#44572).

4 years agoRemove mention of global-cedet-m3-minor-mode
Lars Ingebrigtsen [Wed, 11 Nov 2020 09:59:47 +0000 (10:59 +0100)]
Remove mention of global-cedet-m3-minor-mode

* lisp/cedet/semantic.el (semantic-submode-list):
(semantic-default-submodes): Remove mention of
global-cedet-m3-minor-mode, which no longer exists, apparently
(bug#44565).

4 years agoFix font lock of assignments with type hints in Python
Dario Gjorgjevski [Wed, 11 Nov 2020 09:49:04 +0000 (10:49 +0100)]
Fix font lock of assignments with type hints in Python

* lisp/progmodes/python.el
(python-font-lock-keywords-maximum-decoration): Fix regular
expressions for font lock of assignments with type hints (bug#44568).

The font lock of assignments with type hints in Python is rather bad.
Consider the following example:

    from typing import Mapping, Tuple, Sequence
    var1: int = 5
    var2: Mapping[int, int] = {10: 1024}
    var3: Mapping[Tuple[int, int], int] = {(2, 5): 32}
    var4: Sequence[Sequence[int]] = [[1], [1, 2], [1, 2, 3]]
    var5: Sequence[Mapping[str, Sequence[str]]] = [
        {
            'red': ['scarlet', 'vermilion', 'ruby'],
            'green': ['emerald green', 'aqua']
        },
        {
            'sword': ['cutlass', 'rapier']
        }
    ]

As things stand right now, only ‘var1’ would be highlighted.  To make
things worse, the ‘Mapping’ type hint of ‘var2’ would also be
highlighted, which is entirely incorrect.

This commit makes all of ‘var1’ through ‘var5’ be highlighted
correctly.

4 years agoCleanup of the test file for cperl-mode
Harald Jörg [Wed, 11 Nov 2020 09:42:44 +0000 (10:42 +0100)]
Cleanup of the test file for cperl-mode

* test/lisp/progmodes/cperl-mode-tests.el
(cperl--run-test-cases): New macro, factored out from various
indentation / rewriting tests.  Contains documentation of the
format used by the cperl-mode-resources files.
(cperl-test-bug-19709): Replace 'next-line' by 'forward-line'.
(cperl-test-indent-exp),
(cperl-test-indent-styles),
(cperl-test-bug-30393): Use the new macro.
(cperl-test-bug-19709): Make fit for Emacs 26.
(cperl-test-indent-styles): Skip for Perl mode (bug#44561).

4 years ago* lisp/server.el: Refactor frame creation functions
Stefan Monnier [Wed, 11 Nov 2020 04:26:28 +0000 (23:26 -0500)]
* lisp/server.el: Refactor frame creation functions

(server--create-frame): New function, extracted from
`server-create-dumb-terminal-frame`.
(server-create-window-system-frame, server-create-tty-frame):
(server-create-dumb-terminal-frame): Use it.

4 years ago* lisp/server.el: Fix frame creation on dumb terminals (bug#25547)
Eliza Velasquez [Wed, 11 Nov 2020 03:14:03 +0000 (22:14 -0500)]
* lisp/server.el: Fix frame creation on dumb terminals (bug#25547)

(server-create-dumb-terminal-frame): New function.
(server-process-filter): Use it.
(server-delete-client): Don't delete tty terminal when it's not
exclusive to this client.

4 years agoDon't set file name variable in org-element-parse-secondary-string (bug#44524)
Juri Linkov [Tue, 10 Nov 2020 19:27:37 +0000 (21:27 +0200)]
Don't set file name variable in org-element-parse-secondary-string (bug#44524)

* lisp/org/org-element.el (org-element-parse-secondary-string):
Don't set buffer-local variables buffer-file-name and buffer-file-truename
in temporary buffer.

4 years ago* lisp/leim/quail/compose.el ("iso-transl"): New input method.
Juri Linkov [Tue, 10 Nov 2020 19:21:18 +0000 (21:21 +0200)]
* lisp/leim/quail/compose.el ("iso-transl"): New input method.

* doc/emacs/basic.texi (Inserting Text):
Mention transient input method "iso-transl".

* lisp/leim/quail/latin-ltx.el: Use same Keywords as in other quail files.

4 years agoNew debugging command 'malloc-info'
Eli Zaretskii [Tue, 10 Nov 2020 17:41:04 +0000 (19:41 +0200)]
New debugging command 'malloc-info'

* src/alloc.c (Fmalloc_info) [GNU_LINUX]: New command.
(syms_of_alloc): Defsubr it.  (Bug#43389)

4 years agoClear the vc-state cache when returning nil
Dmitry Gutov [Tue, 10 Nov 2020 16:08:13 +0000 (18:08 +0200)]
Clear the vc-state cache when returning nil

* lisp/vc/vc-hg.el (vc-hg-registered):
Clear the vc-state cache when returning nil.

4 years agoRemove extra process call from vc-hg-registered
Tom Fitzhenry [Mon, 9 Nov 2020 11:19:10 +0000 (22:19 +1100)]
Remove extra process call from vc-hg-registered

Prefer vc-state to benefit from its caching (bug#44534)

This same technique is used in vc-git.el,
per commit 2018-06-28 "Remove extra process call from vc-git-find-file-hook"
93c41ce6aa64b14fc9bd7bdd0d909915a79191cd.

* lisp/vc/vc-hg.el (vc-hg-registered): Use vc-state rather than vc-hg-state.

4 years agoFix a recent change in image.c for MS-Windows
Eli Zaretskii [Tue, 10 Nov 2020 15:06:46 +0000 (17:06 +0200)]
Fix a recent change in image.c for MS-Windows

* src/image.c: Fix DEF_DLL_FN of
rsvg_handle_get_intrinsic_dimensions.  Reported by Andy Moreton
<andrewjmoreton@gmail.com>.

4 years agoOnly use nbutlast when we actually want to modify the original list
Steven Allen [Tue, 10 Nov 2020 09:02:15 +0000 (10:02 +0100)]
Only use nbutlast when we actually want to modify the original list

* lisp/net/tramp-gvfs.el (tramp-gvfs-dbus-byte-array-to-string):
Don't modify the byte array.
* lisp/net/tramp-integration.el (tramp-eshell-directory-change):
Don't modify the underlying exec-path.

4 years agoRemove ephemeral group on error or null result
Andrew G Cohen [Tue, 10 Nov 2020 00:19:43 +0000 (08:19 +0800)]
Remove ephemeral group on error or null result

* lisp/gnus/nnselect.el (nnselect-request-group): If an ephemeral
group is empty, there is nothing to see, so remove the group.
(nnselect-run): Catch and return an empty artlist on error.

4 years agoCC Mode: fix many compiler warnings which would appear with lexical binding
Alan Mackenzie [Mon, 9 Nov 2020 21:19:19 +0000 (21:19 +0000)]
CC Mode: fix many compiler warnings which would appear with lexical binding

* lisp/progmodes/cc-align.el (three places) prefix langelem with a _.

* lisp/progmodes/cc-{cmds,engine}.el: Remove superfluous local variables.

* lisp/progmodes/cc-defs.el (c-will-be-unescaped): Remove unused parameter
end.
* lisp/progmodes/cc-engine.el (c-looking-at-decl-block): Remove unused
parameter containing-sexp.
(c-looking-at-special-brace-list); Remove unused parameter lim.
(c-add-class-syntax): Remove unused parameter paren-state.

4 years agoAdd test for substitute-command-keys with command remap
Stefan Kangas [Mon, 9 Nov 2020 20:43:53 +0000 (21:43 +0100)]
Add test for substitute-command-keys with command remap

* test/lisp/help-tests.el (help-tests-remap-map): New variable.
(help-tests-substitute-command-keys/remap): New test.
(help-tests-substitute-command-keys/keymaps)
(help-tests-substitute-command-keys/undefined-map): Fix indentation.

4 years agoshortdoc: prefer seq-contains-p over seq-contains
Brian Leung [Mon, 9 Nov 2020 16:38:18 +0000 (08:38 -0800)]
shortdoc: prefer seq-contains-p over seq-contains

* lisp/emacs-lisp/shortdoc.el (sequence): use seq-contains-p instead
of seq-contains, which is obsolete as of 27.1.  (Bug#44536)

Copyright-paperwork-exempt: yes

4 years agoSimplify getting value of text-quoting-style (Bug#44471)
Stefan Kangas [Thu, 5 Nov 2020 14:32:45 +0000 (15:32 +0100)]
Simplify getting value of text-quoting-style (Bug#44471)

* src/doc.c (text_quoting_style): Remove function by merging it...
(Ftext_quoting_style): ...here.  Rename from Fget_quoting_style.
(syms_of_doc): Update defsubr for Ftext_quoting_style.
* src/lisp.h (enum text_quoting_style): Remove enum.
* src/doprnt.c (doprnt):
* src/editfns.c (styled_format):
* lisp/help.el (substitute-command-keys): Update callers to use
text-quoting-style.

4 years ago* lisp/disp-table.el (make-glyph-code): Remove obsolete comment.
Philipp Stephani [Mon, 9 Nov 2020 17:15:12 +0000 (18:15 +0100)]
* lisp/disp-table.el (make-glyph-code): Remove obsolete comment.

4 years agoBetter warning suppression in rx-tests
Mattias Engdegård [Mon, 9 Nov 2020 17:05:08 +0000 (18:05 +0100)]
Better warning suppression in rx-tests

* test/lisp/emacs-lisp/rx-tests.el (rx-compat): Use with-no-warnings
instead of with-suppressed-warnings which complains when running
the test interactively.

4 years agoFix pcase rx form snag with '?' and '??' (bug#44532)
Mattias Engdegård [Mon, 9 Nov 2020 16:11:05 +0000 (17:11 +0100)]
Fix pcase rx form snag with '?' and '??' (bug#44532)

This is a regression from Emacs 26.
Reported by Phillip Stephani.

* lisp/emacs-lisp/rx.el (rx--pcase-transform): Process ? and ?? correctly.
* test/lisp/emacs-lisp/rx-tests.el (rx-pcase): Add test case.

4 years agoFix css length calculations
Alan Third [Mon, 9 Nov 2020 16:22:13 +0000 (16:22 +0000)]
Fix css length calculations

* src/image.c (svg_css_length_to_pixels): Put in missing breaks where
necessary.

4 years agoMake the SHOW parameter work again in `run-python'
Lars Ingebrigtsen [Mon, 9 Nov 2020 16:21:56 +0000 (17:21 +0100)]
Make the SHOW parameter work again in `run-python'

* lisp/progmodes/python.el (run-python): Make the SHOW parameter
work again after the fix for 31398 (bug#44421).

4 years agoUse a separate face for expanded log-view bodies
Protesilaos Stavrou [Mon, 9 Nov 2020 16:14:24 +0000 (17:14 +0100)]
Use a separate face for expanded log-view bodies

* lisp/vc/log-view.el (log-view-commit-body): Define new face.
(log-view-toggle-entry-display): Implement 'log-view-commit-body'
face (bug#44424).

4 years agoClarify Lisp warning about elements following other expressions
Lars Ingebrigtsen [Mon, 9 Nov 2020 15:50:45 +0000 (16:50 +0100)]
Clarify Lisp warning about elements following other expressions

* lisp/emacs-lisp/lisp-mode.el (lisp-fdefs): Clarify warning in
help text (bug#44482).

4 years agoFix compilation of image.c on MS-Windows
Eli Zaretskii [Mon, 9 Nov 2020 15:35:52 +0000 (17:35 +0200)]
Fix compilation of image.c on MS-Windows

This is a followup to last change in image.c.
* src/image.c (rsvg_handle_get_intrinsic_dimensions): Define to
call fn_rsvg_handle_get_intrinsic_dimensions.
(svg_css_length_to_pixels): Compile only for librsvg >= 2.46.0, as
RsvgLength type was not defined before.

4 years agoUpdate the doc-view header line
Lars Ingebrigtsen [Mon, 9 Nov 2020 15:29:54 +0000 (16:29 +0100)]
Update the doc-view header line

4 years agoAvoid breaking Arabic shaping in 'window-text-pixel-size'
Eli Zaretskii [Mon, 9 Nov 2020 15:22:25 +0000 (17:22 +0200)]
Avoid breaking Arabic shaping in 'window-text-pixel-size'

* src/xdisp.c (CHAR_COMPOSED_P): If the bidi_p flag is not set,
pass -1 to composition_reseat_it, so that the shaping engine will
figure out the directionality of the text.  This is important,
e.g., when using move_it_* functions in some context that is not
redisplay, such as 'window-text-pixel-size'.  (Bug#44521)

4 years agoMerge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Eli Zaretskii [Mon, 9 Nov 2020 14:57:03 +0000 (16:57 +0200)]
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs

4 years agoFix crash in ns_mouse_position (bug#44313)
Alan Third [Sat, 31 Oct 2020 15:14:34 +0000 (15:14 +0000)]
Fix crash in ns_mouse_position (bug#44313)

* src/nsterm.m (ns_destroy_window): Close the window before freeing
the frame resources so we don't end up accessing the frame struct
after it's been freed.

4 years agoNS: Make s-<left/right> to move to beginning/end of line
Andrii Kolomoiets [Mon, 12 Oct 2020 11:24:25 +0000 (14:24 +0300)]
NS: Make s-<left/right> to move to beginning/end of line

* lisp/term/ns-win.el: Bind 's-<left>' to 'move-beginning-of-line';
bind 's-<right>' to 'move-end-of-line'.
* etc/NEWS: Mention new bindings.

4 years agoCalculate SVG image sizes more accurately (bug#44206)
Alan Third [Sun, 25 Oct 2020 15:45:07 +0000 (15:45 +0000)]
Calculate SVG image sizes more accurately (bug#44206)

* src/image.c (svg_css_length_to_pixels): New function.
(svg_load_image): Try more methods to work out the image size.

4 years agodoc-view.el comment clarification
Lars Ingebrigtsen [Mon, 9 Nov 2020 14:38:35 +0000 (15:38 +0100)]
doc-view.el comment clarification

* lisp/doc-view.el: Make the commentary mention that it's not
limited to a narrow range of file formats (bug#44504).

4 years agoUpdate erc documentation about C-c C-b
Daniel Martín [Mon, 9 Nov 2020 14:34:08 +0000 (15:34 +0100)]
Update erc documentation about C-c C-b

* doc/misc/erc.texi (Keystroke Summary): C-c C-b runs
erc-switch-to-buffer, which is implemented in terms of
read-buffer (bug#44498).

4 years agocperl-mode: Indentation of ')' follows customisation
Harald Jörg [Mon, 9 Nov 2020 14:25:47 +0000 (15:25 +0100)]
cperl-mode: Indentation of ')' follows customisation

* lisp/progmodes/cperl-mode.el (cperl-style-alist): Add
cperl-close-paren-offset to the settings for PBP style.

* test/lisp/progmodes/cperl-mode-tests.el (cperl-bug19709):
New test to verify correct indentation of closing parentheses (Bug#19709).

* test/lisp/progmodes/cperl-mode-resources/cperl-bug-19709.pl:
New test case with code from the bug report.

* test/lisp/progmodes/cperl-mode-resources/cperl-indent-styles.pl:
Add a new test clause for cperl-close-paren-offset.

4 years agoFix xwidget's webkitgtk widget overriding of Emacs SIGCHLD handler
Akira Kyle [Mon, 9 Nov 2020 13:51:48 +0000 (14:51 +0100)]
Fix xwidget's webkitgtk widget overriding of Emacs SIGCHLD handler

* src/xwidget.c (make-xwidget): Save and restore Emacs SIGCHLD signal
handler since glib doesn't (but should) do this.
Copyright-paperwork-exempt: yes

4 years agoRemove test for return value of set-keymap-parent
Stefan Kangas [Mon, 9 Nov 2020 10:35:32 +0000 (11:35 +0100)]
Remove test for return value of set-keymap-parent

* test/src/keymap-tests.el
(keymap-keymap-set-parent/returns-parent): Remove test for the return
value of set-keymap-parent.  It is not clear that returning the value
is a very good idea.
Problem pointed out by Stefan Monnier <monnier@iro.umontreal.ca>.

4 years agoAdd more protections to gnus-search query parsing
Eric Abrahamsen [Mon, 9 Nov 2020 00:32:10 +0000 (16:32 -0800)]
Add more protections to gnus-search query parsing

* lisp/gnus/gnus-group.el (gnus-group-make-search-group,
gnus-group-read-ephemeral-search-group): If the query is coming in via
the old 'nnir-query-spec key, we know not to parse it.
* lisp/gnus/gnus-search.el (gnus-search-make-query-string): Check if
the query was sent in as '(query "query"), and not '(query . "query).
(gnus-search-imap-search-keys): Add x-gm-raw to imap search keys.
(gnus-search-prepare-query): If we know this query should be raw,
don't even try parsing it, as it probably won't work.

4 years ago* lisp/progmodes/project.el: Don't truncate the saved project list.
Juri Linkov [Sun, 8 Nov 2020 19:45:02 +0000 (21:45 +0200)]
* lisp/progmodes/project.el: Don't truncate the saved project list.

* lisp/progmodes/project.el (project--write-project-list):
Let-bind print-length and print-level to nil to not truncate the
saved project list with unreadable ellipsis.

4 years agoAnother backwards-compatibility fix for gnus-search
Eric Abrahamsen [Sun, 8 Nov 2020 16:37:03 +0000 (08:37 -0800)]
Another backwards-compatibility fix for gnus-search

* lisp/gnus/gnus-search.el (gnus-search-server-to-engine): Because of
the way we've set up the obsolete variable alias for
`nnir-method-default-engines', we may end up with its value in
`gnus-search-default-engines'. Make the check for "old style" values
general, so we catch them no matter where they came from.

4 years agoMerge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Eli Zaretskii [Sun, 8 Nov 2020 14:51:13 +0000 (16:51 +0200)]
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs

4 years agoDon't set the selected window to the miniwindow on a frame change.
Alan Mackenzie [Sun, 8 Nov 2020 13:28:55 +0000 (13:28 +0000)]
Don't set the selected window to the miniwindow on a frame change.

Intended to fix bug #44502.

* src/minibuf.c (move_minibuffer_onto_frame): Remove the lines of code which
set the selected window to the minibuffer.

4 years agoDoc fix
Dmitry Gutov [Sun, 8 Nov 2020 12:29:11 +0000 (14:29 +0200)]
Doc fix

* lisp/vc/vc.el (vc-deduce-fileset): Doc fix (bug#44420).

4 years agoMention which exact file is already registered
Dmitry Gutov [Sun, 8 Nov 2020 12:02:55 +0000 (14:02 +0200)]
Mention which exact file is already registered

* lisp/vc/vc.el (vc-register):
Mention which exact file is already registered (bug#44420).

4 years agoMerge from origin/emacs-27
Glenn Morris [Sat, 7 Nov 2020 17:57:56 +0000 (09:57 -0800)]
Merge from origin/emacs-27

f5d7fb3a2d (origin/emacs-27) Fix 'uudecode-decode-region-internal' in...
d4242177da Fix 'send-string-to-terminal' writing very long strings
9da0f4026c * lisp/subr.el (read-char-from-minibuffer): Doc fix.  (Bug...
9899f74e4e Merge branch 'emacs-27' of git.savannah.gnu.org:/srv/git/e...
a6fcba783e Fix documentation of 'windmove-swap-states-default-keybind...
f4acd7a924 Split windows evenly when 'min-margins' parameter was set ...

4 years ago; Merge from origin/emacs-27
Glenn Morris [Sat, 7 Nov 2020 17:57:56 +0000 (09:57 -0800)]
; Merge from origin/emacs-27

The following commits were skipped:

0cdd6c9218 Handle Cairo errors in ftcrfont_open
29af10afe8 Backport: Fix exiting the finder-commentary buffer

4 years agoMerge from origin/emacs-27
Glenn Morris [Sat, 7 Nov 2020 17:57:56 +0000 (09:57 -0800)]
Merge from origin/emacs-27

53933cdf5c ; * lisp/international/mule.el (define-coding-system): Doc...
e90ffcf759 * src/w32fns.c (Fw32_register_hot_key): Doc fix.  (Bug#44456)
89740e9cb5 Prevent redisplay from moving point behind user's back
5932df7435 Document that the :match function for a widget takes an ex...
1b7ab9d0ac Don't render XML declaration of an HTML document (bug#44348)

# Conflicts:
# lisp/international/mule.el

4 years agoVarious fixes and backward compatibility for gnus-search
Eric Abrahamsen [Sat, 7 Nov 2020 17:40:40 +0000 (09:40 -0800)]
Various fixes and backward compatibility for gnus-search

* lisp/gnus/gnus-group.el (gnus-group-make-search-group,
gnus-group-read-ephemeral-search-group): Check for and accept the old
nnir-* spec keys.
* lisp/gnus/gnus-search.el (shared-initialize): Use
generate-new-buffer instead of doing it ourselves.
(gnus-search-server-to-engine): Raise an informative error explicitly
if we can't find a search engine, rather than letting it fall through
to something less helpful.
(gnus-search-make-spec): Add `gnus-search--complete-key-data' to
`completion-at-point-functions' locally, not globally.

4 years agoMerge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Eli Zaretskii [Sat, 7 Nov 2020 15:26:45 +0000 (17:26 +0200)]
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs

4 years ago* lisp/emacs-lisp/lisp-mode.el: Avoid false-positive "hidden arg" in strings
Stefan Monnier [Sat, 7 Nov 2020 15:15:22 +0000 (10:15 -0500)]
* lisp/emacs-lisp/lisp-mode.el: Avoid false-positive "hidden arg" in strings

(lisp--match-hidden-arg): Don't misfire in strings and comments.

Reported by: Andrii Kolomoiets <andreyk.mad@gmail.com>

4 years agoAdd test for recent change in enable-theme
Mauro Aranda [Sat, 7 Nov 2020 12:53:21 +0000 (09:53 -0300)]
Add test for recent change in enable-theme

* test/lisp/custom-tests.el (custom-test-enable-theme-keeps-settings):
Enabling a theme should not change the theme settings, so test for
that.  See
https://lists.gnu.org/archive/html/emacs-devel/2020-11/msg00232.html

4 years agoDon't leave lock files after 'replace-buffer-contents'
Eli Zaretskii [Sat, 7 Nov 2020 10:29:41 +0000 (12:29 +0200)]
Don't leave lock files after 'replace-buffer-contents'

* src/editfns.c (Freplace_buffer_contents): Unlock the buffer's
file if no changes have been made.  (Bug#44303)

4 years agoFix 'uudecode-decode-region-internal' in multibyte buffers
Kazuhiro Ito [Thu, 5 Nov 2020 10:48:08 +0000 (19:48 +0900)]
Fix 'uudecode-decode-region-internal' in multibyte buffers

* lisp/mail/uudecode.el (uudecode-decode-region-internal): Fix
inserting the decoded string into a multibyte buffer.  Optimize by
working with characters, not strings.  (Bug#44411)

Copyright-paperwork-exempt: yes

4 years agoFix 'send-string-to-terminal' writing very long strings
Eli Zaretskii [Sat, 7 Nov 2020 09:19:44 +0000 (11:19 +0200)]
Fix 'send-string-to-terminal' writing very long strings

* src/dispnew.c (Fsend_string_to_terminal): Prevent partial writes
by blocking SIGIO while 'fwrite' runs.  (Bug#44320)

4 years ago* lisp/subr.el (read-char-from-minibuffer): Doc fix. (Bug#44451)
Eli Zaretskii [Sat, 7 Nov 2020 09:10:36 +0000 (11:10 +0200)]
* lisp/subr.el (read-char-from-minibuffer): Doc fix.  (Bug#44451)

4 years agoMerge branch 'emacs-27' of git.savannah.gnu.org:/srv/git/emacs into emacs-27
Eli Zaretskii [Sat, 7 Nov 2020 08:57:48 +0000 (10:57 +0200)]
Merge branch 'emacs-27' of git.savannah.gnu.org:/srv/git/emacs into emacs-27

4 years agoFix documentation of 'windmove-swap-states-default-keybindings'
Earl Hyatt [Wed, 4 Nov 2020 12:26:06 +0000 (07:26 -0500)]
Fix documentation of 'windmove-swap-states-default-keybindings'

* doc/emacs/windows.texi (Window Convenience): Fix description of
'windmove-swap-states-default-keybindings' and related index
entry.  (Bug#44441)

4 years ago; * src/xdisp.c (redisplay_window): Add comment for a recent change.
Eli Zaretskii [Sat, 7 Nov 2020 08:44:30 +0000 (10:44 +0200)]
; * src/xdisp.c (redisplay_window): Add comment for a recent change.

4 years agoFix scrolling problems with misc-fixed fonts under Cairo
Eli Zaretskii [Sat, 7 Nov 2020 08:27:15 +0000 (10:27 +0200)]
Fix scrolling problems with misc-fixed fonts under Cairo

* src/ftcrfont.c (ftcrfont_glyph_extents): Avoid rounding up the
glyph ascent to a higher value than needed due to floating-point
roundoff errors.  (Bug#44284)

4 years agoSplit windows evenly when 'min-margins' parameter was set (Bug#44483)
Martin Rudalics [Sat, 7 Nov 2020 08:20:14 +0000 (09:20 +0100)]
Split windows evenly when 'min-margins' parameter was set (Bug#44483)

* lisp/window.el (split-window): Make new window inherit any
'min-margins' parameter from WINDOW so that horizontal splits
reliably produce windows of same width (Bug#44483).

4 years agoHandle Cairo errors in ftcrfont_open
Pip Cet [Thu, 22 Oct 2020 11:40:34 +0000 (13:40 +0200)]
Handle Cairo errors in ftcrfont_open

* src/ftcrfont.c (ftcrfont_open): Handle Cairo errors (bug#41627).

(cherry picked from commit 954a4decfcc8e41084789516773b22d0adc11d91)

4 years agoDelete outdated comment about C rewrite in apropos.el
Stefan Kangas [Sat, 7 Nov 2020 07:20:21 +0000 (08:20 +0100)]
Delete outdated comment about C rewrite in apropos.el

Maybe it made sense to rewrite apropos.el in C for speed in 1991, but
today the speed increase would not outweigh the maintenance burden.

* lisp/apropos.el: Delete outdated comment.

4 years agoAdd some more tests for keymap.c
Stefan Kangas [Sat, 7 Nov 2020 06:55:50 +0000 (07:55 +0100)]
Add some more tests for keymap.c

* test/src/keymap-tests.el (keymap-make-keymap)
(keymap-make-sparse-keymap, keymap-keymapp)
(keymap-keymap-parent, keymap-keymap-set-parent/returns-parent)
(keymap-copy-keymap/is-equal, keymap-copy-keymap/is-not-eq)
(keymap-lookup-key, keymap-apropos-internal)
(keymap-apropos-internal/predicate): New tests.
(keymap-tests--make-keymap-test): New defun.

4 years agoBackport: Fix exiting the finder-commentary buffer
Stefan Kangas [Tue, 3 Nov 2020 00:35:01 +0000 (01:35 +0100)]
Backport: Fix exiting the finder-commentary buffer

Do not merge to master.

* lisp/finder.el (finder-exit): Fix exiting the finder-commentary
buffer.  (Bug#44384)
(finder-buffer): New defconst.
(finder-list-keywords): Use above new defconst.

4 years agoRectify skip-set argument
Mattias Engdegård [Fri, 6 Nov 2020 22:02:29 +0000 (23:02 +0100)]
Rectify skip-set argument

* lisp/gnus/gnus-search.el (gnus-search-query-end-of-input):
Remove brackets that don't belong.  Found by relint.

4 years ago; * lisp/international/mule.el (define-coding-system): Doc fix.
Eli Zaretskii [Fri, 6 Nov 2020 20:13:50 +0000 (22:13 +0200)]
; * lisp/international/mule.el (define-coding-system): Doc fix.

4 years agoFix javac message parsing column number off-by-one
Mattias Engdegård [Fri, 6 Nov 2020 16:10:55 +0000 (17:10 +0100)]
Fix javac message parsing column number off-by-one

* lisp/progmodes/compile.el (compilation-error-regexp-alist-alist):
'javac': Column numbers are 1-based by default; remove subtraction and
η-reduce.  Translate regexp to rx (mechanised).
* test/lisp/progmodes/compile-tests.el (compile-tests--test-regexps-data):
Adapt 'javac' test cases to the change.

4 years agoFix --enable-check-lisp-object-type build
Glenn Morris [Fri, 6 Nov 2020 16:00:54 +0000 (08:00 -0800)]
Fix --enable-check-lisp-object-type build

* src/print.c (syms_of_print) <print-integers-as-characters>:
Fix type.

4 years agoUpdate gdb-mi-tests
Mattias Engdegård [Fri, 6 Nov 2020 14:37:17 +0000 (15:37 +0100)]
Update gdb-mi-tests

* test/lisp/progmodes/gdb-mi-tests.el (gdb-mi-parse-value):
Make test pass after the change in gdb-mi-decode-strings default value.

4 years ago* lisp/gnus/gnus-search.el (gnus-search-contact-tables): Fix type.
Mattias Engdegård [Fri, 6 Nov 2020 12:43:53 +0000 (13:43 +0100)]
* lisp/gnus/gnus-search.el (gnus-search-contact-tables): Fix type.

A more precise type is desirable but at it is now correct ('list' is not).

4 years agoChange the default value of gdb-mi-decode-strings to t (bug#44173)
Mattias Engdegård [Sat, 31 Oct 2020 13:44:58 +0000 (14:44 +0100)]
Change the default value of gdb-mi-decode-strings to t (bug#44173)

This is likely to be a more commonly wanted default value today.

* lisp/progmodes/gdb-mi.el (gdb-mi-decode-strings): Change default.
* doc/emacs/building.texi (Source Buffers): Update manual.
* etc/NEWS: Announce.

4 years agoReduce integer-output-format to print-integers-as-characters
Mattias Engdegård [Mon, 2 Nov 2020 22:37:16 +0000 (23:37 +0100)]
Reduce integer-output-format to print-integers-as-characters

The variable now only controls whether characters are printed, not
the radix.  Control chars are printed in human-readable syntax
only when special escapes such as ?\n are available.  Spaces,
formatting and combining chars are excluded (bug#44155).
Done in collaboration with Juri Linkov.

* src/character.c (graphic_base_p):
* src/print.c (named_escape): New functions.
(print_object): Change semantics as described above.
(syms_of_print): Rename integer-output-format.  Update doc string.
* doc/lispref/streams.texi (Output Variables):
* etc/NEWS:
* test/src/print-tests.el (print-integers-as-characters):
Rename and update according to new semantics.  The test now passes.

4 years agoGo back to not using custom-push-theme when enabling a theme
Mauro Aranda [Fri, 6 Nov 2020 12:34:08 +0000 (09:34 -0300)]
Go back to not using custom-push-theme when enabling a theme

* lisp/custom.el (enable-theme): Relying on custom-push-theme to
handle theme settings and prior user settings was a mistake.  The
theme settings haven't changed between loading the theme and enabling
it, so we don't need all of what custom-push-theme does.  However, we
still need to save a user setting outside of Customize, in order to be
able to get back to it, so do that in enable-theme itself.

4 years agoImprove documentation of a recent change
Eli Zaretskii [Fri, 6 Nov 2020 11:49:07 +0000 (13:49 +0200)]
Improve documentation of a recent change

* doc/emacs/mule.texi (Select Input Method): Add an @anchor.
* doc/emacs/search.texi (Special Isearch): Add cross-reference and
improve wording.

4 years agoSupport transient input methods in Isearch mode (bug#44266)
Juri Linkov [Fri, 6 Nov 2020 08:31:58 +0000 (10:31 +0200)]
Support transient input methods in Isearch mode (bug#44266)

* doc/emacs/mule.texi (Select Input Method): Rename
transient-input-method to activate-transient-input-method.

* doc/emacs/search.texi (Special Isearch):
Document isearch-transient-input-method.

* lisp/international/isearch-x.el (isearch-transient-input-method):
New function.
(isearch-process-search-multibyte-characters):
Call 'deactivate-transient-input-method' after 'read-string'.

* lisp/international/mule-cmds.el (mule-menu-keymap): Remove
duplicate menu item 'describe-input-method'.  Add new menu item
'activate-transient-input-method'.
(default-transient-input-method): Rename from transient-input-method.
(current-transient-input-method)
(previous-transient-input-method): New buffer-local variables.
(deactivate-input-method): Don't add
current-transient-input-method to input-method-history.
(toggle-input-method): Call deactivate-transient-input-method
when current-transient-input-method is non-nil.
(activate-transient-input-method): Rename from transient-input-method.
(deactivate-transient-input-method): New function with body from
renamed function transient-input-method.

* lisp/isearch.el (isearch-menu-bar-map): Add new menu item
'isearch-transient-input-method'.
(isearch-mode-map): Bind 'C-x \' to isearch-transient-input-method.
(isearch-forward): Add isearch-transient-input-method to docstring.
(isearch-message-prefix): Use shorter string for narrowed buffer.

4 years ago; * etc/NEWS: Fix wording in a recently added entry.
Eli Zaretskii [Fri, 6 Nov 2020 05:51:07 +0000 (07:51 +0200)]
; * etc/NEWS: Fix wording in a recently added entry.

4 years agoAdd more tests for where-is-internal
Stefan Kangas [Fri, 6 Nov 2020 03:45:26 +0000 (04:45 +0100)]
Add more tests for where-is-internal

* test/src/keymap-tests.el (keymap-where-is-internal)
(keymap-where-is-internal/firstonly-t)
(keymap-where-is-internal/menu-item)
(keymap-where-is-internal/advertised-binding)
(keymap-where-is-internal/advertised-binding-respect-remap)
(keymap-where-is-internal/remap)
(keymap-where-is-internal/shadowed): New tests.
(keymap-where-is-internal/preferred-modifier-is-a-string):
Rename from keymap-where-is-internal-test.

4 years agoFixes and improvements to gnus-search
Eric Abrahamsen [Thu, 5 Nov 2020 05:13:03 +0000 (21:13 -0800)]
Fixes and improvements to gnus-search

* lisp/gnus/gnus-search.el (gnus-search-default-engines): Change type
from a list of two-element lists, to alist. This matches nnir's old
option type, and should make transition easier.
(nnir-imap-default-search-key): Note that variable is obsolete.
(gnus-search-transform-expression): Interpret the "attachment" key as
"body" in imap searches. Allow specifying larger/smaller message size
values in KB or MB units.
(gnus-search-server-to-engine): Fix error in this function, and
clarify somewhat.

4 years ago* doc/misc/gnus.texi (Selection Groups): Delete excessive paren
Katsumi Yamaoka [Thu, 5 Nov 2020 22:32:09 +0000 (22:32 +0000)]
* doc/misc/gnus.texi (Selection Groups): Delete excessive paren

4 years agoEnable/disable buttons, tool bar and menu items in Custom buffer (Bug#14398)
Mauro Aranda [Thu, 5 Nov 2020 21:56:29 +0000 (18:56 -0300)]
Enable/disable buttons, tool bar and menu items in Custom buffer (Bug#14398)

* lisp/cus-edit.el (custom-reset-extended-menu): Keymap menu for the
Revert... menu button.
(custom-reset-menu): Keep for backward compatibility, but default to
nil, so we prefer the keymap menu instead.
(custom-reset): Pass the new keymap menu to widget-choose.

(custom-commands): Add an element to each list item, to manage its
enable/disable state.  Add docstring.
(custom-command-buttons): New variable, to hold the buttons that act
on all options in a Custom buffer.
(custom-buffer-create-internal): When creating the command buttons,
add the optional :notify function to enable/disable them.  Add the
buttons to the new variable custom-command-buttons.
(customize-menu-create): Notify the command buttons after creating the
Custom buffer, so they are correctly enabled/disabled.
(custom-redraw-magic, custom-notify): Notify the command buttons and
update the tool bar when changing a widget to the modified state.

4 years agoFix coding system in eww-display-pdf
Basil L. Contovounesios [Thu, 5 Nov 2020 21:06:39 +0000 (21:06 +0000)]
Fix coding system in eww-display-pdf

* lisp/net/eww.el (eww-display-pdf): Make *eww pdf* buffer unibyte
before populating it to avoid conversions.  The binding for
coding-system-for-write is then no longer necessary, and can be
delegated to the viewer invoked by mailcap-view-mime.  Suggested by
Stefan Monnier <monnier@iro.umontreal.ca>.  (Bug#44338)