Lars Ingebrigtsen [Mon, 21 Dec 2020 17:53:32 +0000 (18:53 +0100)]
Beef up the Emacs string utility set a bit
* doc/lispref/strings.texi (Modifying Strings): Document them.
* lisp/emacs-lisp/shortdoc.el (string): Add examples.
* lisp/emacs-lisp/subr-x.el (string-clean-whitespace)
(string-fill, string-limit, string-lines, slice-string): New
functions.
Eli Zaretskii [Mon, 21 Dec 2020 17:27:02 +0000 (19:27 +0200)]
Fix frame creation on X when tool bar is disabled
* src/xterm.c (handle_one_xevent): Restrict the fix for bug#44002
to situations when we are asked by the WM to create a window with
bogus 1x1 dimensions. (Bug#44794)
Michael Albinus [Mon, 21 Dec 2020 15:37:29 +0000 (16:37 +0100)]
Fix permission problem in Tramp's copy-file
* lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file-directly):
Take care of PRESERVE-UID-GID.
Mattias Engdegård [Mon, 21 Dec 2020 10:24:46 +0000 (11:24 +0100)]
; * src/nsfns.m (all_nonzero_ascii): comment correction
Stefan Kangas [Mon, 21 Dec 2020 15:22:42 +0000 (16:22 +0100)]
Drop XEmacs support for EDE ELisp projects
* lisp/cedet/ede/proj-elisp.el (ede-proj-target-elisp): Remove
XEmacs support.
(ede-xemacs-compiler): Make obsolete.
Lars Ingebrigtsen [Mon, 21 Dec 2020 04:55:32 +0000 (05:55 +0100)]
Fix problem with entering Gnus groups when Gnus isn't running
* lisp/gnus/gnus-sum.el (gnus-update-summary-mark-positions):
Don't bug out when Gnus isn't running (bug#45330).
Dario Gjorgjevski [Mon, 21 Dec 2020 04:40:38 +0000 (05:40 +0100)]
Make python-mode fontify more assignment statements
* lisp/progmodes/python.el (python-font-lock-assignment-matcher): New
function to match assignment statements.
(python-rx): Add `assignment-target' and `grouped-assignment-target'.
(python-font-lock-keywords-maximum-decoration): Add new matchers
(bug#45341).
Dmitry Gutov [Mon, 21 Dec 2020 01:38:37 +0000 (03:38 +0200)]
Generic-ify xref-location-column
* lisp/progmodes/xref.el (xref-location-column):
Create a generic from xref-file-location-column, to use in the
common rendering code (bug#36967).
(xref--insert-xrefs): Update accordingly.
* test/lisp/progmodes/xref-tests.el
(xref-matches-in-directory-finds-two-matches-on-the-same-line)
(xref-matches-in-directory-finds-an-empty-line-regexp-match):
Ditto.
Juri Linkov [Mon, 21 Dec 2020 01:22:23 +0000 (03:22 +0200)]
De-duplicate lines in Xref buffers
* lisp/progmodes/xref.el (xref--insert-xrefs):
Render matches coming from the same line together (bug#36967).
(xref--item-at-point): Account for the above.
Philipp Stephani [Sun, 20 Dec 2020 23:17:56 +0000 (00:17 +0100)]
Unbreak build after commit
1a0a11f7d2d1dbecb9f754b1e129d50e489058e6.
The commit only changed a comment in 'struct buffer', so the portable
dumper doesn't need to be adapted.
* src/pdumper.c (dump_buffer): Update hash for 'struct buffer'.
Alan Third [Sun, 20 Dec 2020 16:03:52 +0000 (16:03 +0000)]
Fix image cache lookup
* src/image.c (lookup_image): ignore_colors should be false as we want
to search for images with matching colors.
Alan Third [Sun, 20 Dec 2020 15:57:23 +0000 (15:57 +0000)]
Remove unnecessary string conversion
* src/nsfns.m (ns_set_represented_filename): NSString can load List
strings directly now.
Juri Linkov [Sun, 20 Dec 2020 20:05:51 +0000 (22:05 +0200)]
* lisp/simple.el (goto-line-read-args): Use number-at-point (bug#45199)
* lisp/subr.el (goto-char--read-natnum-interactive): Add the value of
point to the end of default values, and move function slightly higher.
Michael Albinus [Sun, 20 Dec 2020 18:45:11 +0000 (19:45 +0100)]
Improve make-process in Tramp
* doc/misc/tramp.texi (Remote processes): Remove INSIDE_EMACS
restriction.
(Frequently Asked Questions, External packages): Add indices.
* etc/NEWS: 'start-process-shell-command' and
'start-file-process-shell-command' do not support the old calling
conventions any longer.
* lisp/subr.el (start-process-shell-command)
(start-file-process-shell-command): Remove old calling conventions.
* lisp/net/tramp-compat.el (remote-file-error): Remove, it isn't
necessary.
* lisp/net/tramp.el (tramp-handle-make-process): Remove special shell
handling. Support environment variables.
* test/lisp/net/tramp-tests.el
(tramp--test--deftest-direct-async-process): Skip for mock method.
(tramp--test-async-shell-command): Suppress `shell-command-sentinel'.
(tramp-test32-shell-command, tramp-test33-environment-variables):
Adapt tests.
(tramp-test32-shell-command-direct-async)
(tramp-test33-environment-variables-direct-async): New tests.
Basil L. Contovounesios [Sat, 19 Dec 2020 12:39:45 +0000 (12:39 +0000)]
Inhibit buffer hooks in temporary buffers
Give get-buffer-create an optional argument to inhibit buffer hooks
in internal or temporary buffers for efficiency (bug#34765).
* etc/NEWS: Announce new parameter of get-buffer-create and
generate-new-buffer, and that with-temp-buffer and with-temp-file
now inhibit buffer hooks.
* doc/lispref/buffers.texi (Buffer Names): Fix typo.
(Creating Buffers): Document new parameter of get-buffer-create and
generate-new-buffer.
(Buffer List, Killing Buffers): Document when buffer hooks are
inhibited.
(Current Buffer):
* doc/lispref/files.texi (Writing to Files): Document that
with-temp-buffer and with-temp-file inhibit buffer hooks.
* doc/lispref/internals.texi (Buffer Internals): Document
inhibit_buffer_hooks flag. Remove stale comment.
* doc/misc/gnus-faq.texi (FAQ 5-8):
* lisp/simple.el (shell-command-on-region): Fix indentation.
* lisp/files.el (kill-buffer-hook): Document when hook is inhibited.
(create-file-buffer):
* lisp/gnus/gnus-uu.el (gnus-uu-unshar-article):
* lisp/international/mule.el (load-with-code-conversion):
* lisp/mh-e/mh-xface.el (mh-x-image-url-fetch-image):
* lisp/net/imap.el (imap-open):
* lisp/net/mailcap.el (mailcap-maybe-eval):
* lisp/progmodes/flymake-proc.el
(flymake-proc--read-file-to-temp-buffer)
(flymake-proc--copy-buffer-to-temp-buffer): Simplify.
* lisp/subr.el (generate-new-buffer): Forward new optional argument
to inhibit buffer hooks to get-buffer-create.
(with-temp-file, with-temp-buffer, with-output-to-string):
* lisp/json.el (json-encode-string): Inhibit buffer hooks in buffer
used.
* src/buffer.c (run_buffer_list_update_hook): New helper function.
(Fget_buffer_create): Use it. Add optional argument to set
inhibit_buffer_hooks flag instead of comparing the buffer name to
Vcode_conversion_workbuf_name. All callers changed.
(Fmake_indirect_buffer, Frename_buffer, Fbury_buffer_internal)
(record_buffer): Use run_buffer_list_update_hook.
(Fkill_buffer): Document when buffer hooks are inhibited. Use
run_buffer_list_update_hook.
(init_buffer_once): Inhibit buffer hooks in Vprin1_to_string_buffer.
(Vkill_buffer_query_functions, Vbuffer_list_update_hook): Document
when hooks are inhibited.
* src/buffer.h (struct buffer): Update inhibit_buffer_hooks
commentary.
* src/coding.h (Vcode_conversion_workbuf_name):
* src/coding.c (Vcode_conversion_workbuf_name): Make static again
since it is no longer needed in src/buffer.c.
(code_conversion_restore, code_conversion_save, syms_of_coding):
Prefer boolean over integer constants.
* src/fileio.c (Finsert_file_contents): Inhibit buffer hooks in
" *code-converting-work*" buffer.
* src/window.c (Fselect_window): Fix grammar. Mention
window-selection-change-functions alongside buffer-list-update-hook.
* test/src/buffer-tests.el: Fix requires.
(buffer-tests-inhibit-buffer-hooks): New test.
Mattias Engdegård [Sat, 19 Dec 2020 15:47:32 +0000 (16:47 +0100)]
image-cache-size improvements
Implement for non-Cairo X11 and NS. Count masks as well, and
XImage objects on X11.
* src/image.c (image_size_in_bytes): New.
(image_frame_cache_size): Use image_size_in_bytes.
* src/nsterm.h:
* src/nsimage.m (ns_image_size_in_bytes, [EmacsImage sizeInBytes]):
New function and method.
* src/w32gui.h:
* src/w32term.c (w32_image_size): Update signature.
Eric Abrahamsen [Sat, 19 Dec 2020 23:25:14 +0000 (15:25 -0800)]
Fix default value of gnus-registry-register-all: should be t
* lisp/gnus/gnus-registry.el (gnus-registry-register-all): This was
meant to default to t; only an oversight during code review left it as
nil.
Dmitry Gutov [Sat, 19 Dec 2020 22:16:32 +0000 (00:16 +0200)]
Jamie Beardslee <beardsleejamie@gmail.com>
* lisp/progmodes/project.el (project-execute-extended-command):
New command.
(project-prefix-map): Binding for it.
Copyright-paperwork-exempt: yes
Juri Linkov [Sat, 19 Dec 2020 20:19:18 +0000 (22:19 +0200)]
* lisp/image-mode.el: Use one timer and lock for slow remote calls (bug#45256)
* lisp/image-mode.el (image-auto-resize-timer): New variable.
(image--window-state-change): Cancel previous timer and
remember new timer in image-auto-resize-timer.
(image--window-state-change): New variable.
(image-fit-to-window): When image-fit-to-window-lock is nil,
call image-toggle-display-image ignoring 'remote-file-error'.
Juri Linkov [Sat, 19 Dec 2020 20:12:32 +0000 (22:12 +0200)]
No need to set isearch-input-method-function in isearch-transient-input-method
Stefan Kangas [Sat, 19 Dec 2020 18:54:46 +0000 (19:54 +0100)]
Convert apropos-internal from C to Lisp (Bug#44529)
This runs insignificantly faster in C, and is already fast enough on
reasonably modern hardware. We might as well lift it to Lisp.
This benchmark can be used to verify:
(benchmark-run 10 (apropos-command "test"))
=> (0.
12032415399999999 2 0.
014772391999999995) ; C
=> (0.
13513192100000002 2 0.
017216643000000004) ; Lisp
* lisp/subr.el (apropos-internal): New defun, converted from C.
* src/keymap.c (Fapropos_internal): Remove defun.
(apropos_accum): Remove function.
(apropos_predicate, apropos_accumulate): Remove variables.
(syms_of_keymap): Remove defsubr for Fapropos_internal, and
definitions of the above variables.
* test/src/keymap-tests.el (keymap-apropos-internal)
(keymap-apropos-internal/predicate): Move tests from here...
* test/lisp/subr-tests.el (apropos-apropos-internal)
(apropos-apropos-internal/predicate): ...to here.
Stefan Kangas [Sat, 19 Dec 2020 16:14:33 +0000 (17:14 +0100)]
Shorten some over-wide docstrings in functions and macros
* lisp/allout-widgets.el (allout-widgets-tally-string):
* lisp/array.el (array-mode):
* lisp/calc/calc-units.el (calc-spn):
* lisp/cedet/ede/generic.el (ede-generic-new-autoloader):
* lisp/cedet/semantic/analyze.el (semantic-analyze-find-tag-sequence-default)
(semantic-analyze-find-tag-sequence):
* lisp/cedet/semantic/bovine/c.el (semantic-c-evaluate-symbol-for-hideif):
* lisp/cedet/semantic/bovine/make.el (semantic-lex-make-command):
* lisp/cedet/semantic/db-typecache.el (semanticdb-typecache-include-tags):
* lisp/cedet/semantic/doc.el (semantic-documentation-for-tag):
* lisp/cedet/semantic/tag-ls.el (semantic--tag-attribute-similar-p):
* lisp/emacs-lisp/advice.el (ad-map-arglists):
* lisp/emacs-lisp/bytecomp.el (byte-constant2)
(byte-save-restriction, byte-catch-OBSOLETE, byte-unwind-protect):
* lisp/emacs-lisp/cl-generic.el (cl-generic-combine-methods):
* lisp/emacs-lisp/seq.el (seq-partition, seq-set-equal-p)
(seq-filter):
* lisp/faces.el (face-attribute-specified-or, face-equal):
* lisp/info.el (Info-prev-reference-or-link)
(Info-next-reference-or-link):
* lisp/isearch.el (with-isearch-suspended):
* lisp/kmacro.el (kmacro-step-edit-macro, kmacro-set-counter):
* lisp/org/org-agenda.el (org-agenda-filter-by-category):
* lisp/ses.el (ses-cell-symbol):
* lisp/w32-fns.el (w32-shell-dos-semantics): Shorten doc strings to
not exceed 80-column limits. (Bug#44858)
Stefan Kangas [Sat, 19 Dec 2020 16:35:50 +0000 (17:35 +0100)]
Shorten over-wide docstrings in variables
* lisp/cedet/semantic/util-modes.el (semantic-highlight-func-popup-menu):
* lisp/emacs-lisp/elint.el (elint-top-form-logged):
* lisp/erc/erc-dcc.el (erc-dcc-list):
* lisp/expand.el (expand-pos):
* lisp/font-lock.el (cpp-font-lock-keywords-source-depth):
* lisp/gnus/gnus-sum.el (gnus-sort-gathered-threads-function):
* lisp/gnus/message.el (message-cite-style-thunderbird):
* lisp/gnus/nnmh.el (nnmh-be-safe):
* lisp/gnus/nntp.el (nntp-open-telnet-envuser):
* lisp/international/mule-cmds.el (current-transient-input-method):
* lisp/net/tramp.el (tramp-file-name-structure):
* lisp/org/ob-R.el (org-babel-R-write-object-command):
* lisp/org/org-attach.el (org-attach-after-change-hook):
* lisp/org/org.el (org-stamp-time-of-day-regexp):
* lisp/progmodes/elisp-mode.el (elisp-xref-find-def-functions):
* lisp/progmodes/ruby-mode.el (ruby-block-mid-re):
* lisp/progmodes/verilog-mode.el (verilog-cache-enabled):
* lisp/term.el (term-scroll-end):
* lisp/textmodes/table.el (table-command-remap-alist)
(table-inhibit-auto-fill-paragraph, table-command-remap-alist):
* lisp/vc/ediff-diff.el (ediff-ignore-similar-regions):
* lisp/vc/ediff-wind.el (ediff-mouse-pixel-threshold):
* lisp/vc/smerge-mode.el (smerge-refine-ignore-whitespace):
* lisp/vc/vc.el (vc-log-short-style):
* lisp/view.el (view-exit-action): Shorten doc strings to not exceed
80-column limits. (Bug#44858)
Stefan Kangas [Sat, 19 Dec 2020 16:26:58 +0000 (17:26 +0100)]
Shorten over-wide docstrings in defcustoms
* lisp/calc/calc.el (calc-embedded-announce-formula-alist)
(calc-embedded-open-formula, calc-embedded-close-formula)
(calc-matrix-mode):
* lisp/cedet/semantic/imenu.el (semantic-imenu-sort-bucket-function):
* lisp/emacs-lisp/find-func.el (find-feature-regexp):
* lisp/emulation/cua-base.el (cua-paste-pop-rotate-temporarily):
* lisp/emulation/viper-init.el (viper-fast-keyseq-timeout)
(viper-related-files-and-buffers-ring):
* lisp/emulation/viper-keym.el (viper-want-ctl-h-help):
* lisp/gnus/gnus-art.el (gnus-article-banner-alist):
* lisp/gnus/gnus-group.el (gnus-keep-same-level):
* lisp/gnus/gnus-score.el (gnus-adaptive-word-length-limit):
* lisp/gnus/gnus-sum.el (gnus-inhibit-user-auto-expire):
* lisp/gnus/gnus-uu.el (gnus-uu-ignore-files-by-type)
(gnus-uu-do-not-unpack-archives)
(gnus-uu-unmark-articles-not-decoded)
(gnus-uu-correct-stripped-uucode, gnus-uu-save-in-digest)
(gnus-uu-post-include-before-composing):
* lisp/gnus/gnus.el (gnus-use-long-file-name)
(gnus-install-group-spam-parameters):
* lisp/gnus/message.el (message-cite-style):
* lisp/gnus/nnmail.el
(nnmail-split-fancy-with-parent-ignore-groups)
(nnmail-cache-ignore-groups):
* lisp/ido.el (ido-rewrite-file-prompt-functions):
* lisp/mail/feedmail.el (feedmail-fiddle-plex-user-list)
(feedmail-spray-address-fiddle-plex-list):
* lisp/mh-e/mh-e.el (mh-annotate-msg-hook):
* lisp/net/imap.el (imap-process-connection-type):
* lisp/net/rcirc.el (rcirc-omit-threshold):
* lisp/net/tramp-sh.el (tramp-copy-size-limit):
* lisp/nxml/nxml-mode.el (nxml-default-buffer-file-coding-system):
* lisp/obsolete/landmark.el (landmark-max-stall-time):
* lisp/obsolete/tls.el (tls-checktrust):
* lisp/org/org-indent.el
(org-indent-mode-turns-off-org-adapt-indentation)
(org-indent-mode-turns-on-hiding-stars):
* lisp/org/org-protocol.el (org-protocol-project-alist):
* lisp/progmodes/cc-vars.el (c-doc-comment-style):
* lisp/progmodes/cperl-mode.el (cperl-indent-subs-specially):
* lisp/progmodes/flymake-proc.el (flymake-proc-allowed-file-name-masks):
* lisp/progmodes/hideif.el (hide-ifdef-expand-reinclusion-protection):
* lisp/simple.el (minibuffer-history-case-insensitive-variables):
* lisp/tab-bar.el (tab-bar-close-last-tab-choice):
* lisp/textmodes/reftex-vars.el
(reftex-special-environment-functions):
* lisp/vc/ediff-init.el (ediff-startup-hook, ediff-cleanup-hook)
(ediff-metachars):
* lisp/vc/ediff-merg.el (ediff-show-clashes-only):
* lisp/vc/ediff-mult.el (ediff-default-filtering-regexp): Shorten doc
strings to not exceed 80-column limits. (Bug#44858)
Mattias Engdegård [Sat, 19 Dec 2020 15:24:55 +0000 (16:24 +0100)]
Correct units and spacing in memory-report
* lisp/emacs-lisp/memory-report.el (memory-report--format):
Use IEC unit prefixes and a space before.
Basil L. Contovounesios [Sat, 19 Dec 2020 12:40:00 +0000 (12:40 +0000)]
Set indent-tabs-mode for c-mode in .dir-locals.el
* .dir-locals.el (c-mode): Enforce existing indent-tabs-mode
policy. (Bug#34765)
Eli Zaretskii [Sat, 19 Dec 2020 13:25:08 +0000 (15:25 +0200)]
; Revert unintended change.
Eli Zaretskii [Sat, 19 Dec 2020 11:18:11 +0000 (13:18 +0200)]
Fix over-wide doc strings
* lisp/vc/ediff-init.el (ediff-before-flag-bol)
(ediff-after-flag-eol, ediff-before-flag-mol):
* lisp/org/org-ctags.el (org-ctags-open-link-functions):
* lisp/mail/feedmail.el (feedmail-sendmail-f-doesnt-sell-me-out):
* lisp/language/ethio-util.el (ethio-use-three-dot-question)
(ethio-quote-vowel-always, ethio-W-sixth-always):
* lisp/gnus/nnvirtual.el (nnvirtual-mapping-table)
(nnvirtual-mapping-offsets, nnvirtual-mapping-reads)
(nnvirtual-mapping-marks, nnvirtual-info-installed):
* lisp/gnus/gnus.el (charset):
* lisp/gnus/deuglify.el (gnus-outlook-deuglify-unwrap-stop-chars)
(gnus-outlook-deuglify-no-wrap-chars)
(gnus-outlook-deuglify-attrib-cut-regexp): Fix doc strings to not
exceed 80-column limits. (Bug#44858)
Roland Winkler [Sat, 19 Dec 2020 04:26:40 +0000 (22:26 -0600)]
bibtex-mode: Permit user-defined schemes for sorting entries.
* lisp/textmodes/bibtex.el (bibtex-maintain-sorted-entries):
New allowed value (INDEX-FUN PREDICATE).
(bibtex-entry-index, bibtex-lessp): Use it.
(bibtex-init-sort): Rename from bibtex-init-sort-entry-class-alist.
Stefan Monnier [Fri, 18 Dec 2020 23:29:52 +0000 (18:29 -0500)]
* lisp/emacs-lisp/package.el (package-quickstart-refresh): Fix last change
Actually allow byte-compiling the file.
Reported by Basil L. Contovounesios <contovob@tcd.ie>.
Basil L. Contovounesios [Fri, 18 Dec 2020 23:22:39 +0000 (23:22 +0000)]
; Fix grammar in recent change to internals.texi
Basil L. Contovounesios [Fri, 18 Dec 2020 22:34:30 +0000 (22:34 +0000)]
; Fix @pxref in last change to flymake.texi
Glenn Morris [Fri, 18 Dec 2020 16:55:07 +0000 (08:55 -0800)]
; Merge from origin/emacs-27
The following commit was skipped:
37eba74d60 (tag: emacs-27.1.90, origin/emacs-27) Update files for the...
Glenn Morris [Fri, 18 Dec 2020 16:55:06 +0000 (08:55 -0800)]
Merge from origin/emacs-27
48b9c47805 Minor fixes in authors.el and in tarball-making instructions
d7a4ceaa1e ; Add a new item to TODO
64fe805b19 Improve documentation of 'query-replace'
7cacf5da47 Update to Org 9.4.3
# Conflicts:
# admin/authors.el
João Távora [Fri, 18 Dec 2020 15:38:27 +0000 (15:38 +0000)]
Document that flymake-diag-region saves match data
The typical use of this function (which is parsing compiler diagnostic
messages), lends itself too easily to one the problems in bug#29193.
Make it a friendlier API.
* doc/misc/flymake.texi (Flymake utility functions): Document that
flymake-diag-region saves match data.
* lisp/progmodes/flymake.el (flymake-diag-region): Document that
this saves match data.
Eli Zaretskii [Fri, 18 Dec 2020 15:13:53 +0000 (10:13 -0500)]
Update files for the 27.1.90 pretest
* README:
* configure.ac:
* nt/README.W32:
* msdos/sed2v2.inp: Bump Emacs version to 27.1.90.
* lisp/ldefs-boot.el: Update from loaddefs.el
Stefan Monnier [Fri, 18 Dec 2020 15:02:15 +0000 (10:02 -0500)]
* lisp/emacs-lisp/package.el: Byte compile the quickstart file
Earlier tests had found problems when byte-compiling the file,
but later investigations indicated the problem was not
directly related. The performance difference is appreciable.
(package-quickstart-refresh): Byte compile the file.
(package-activate-all): Load byte-compiled version if available.
(package--quickstart-maybe-refresh): Delete the byte-compiled file as well.
Eli Zaretskii [Fri, 18 Dec 2020 14:38:29 +0000 (09:38 -0500)]
Minor fixes in authors.el and in tarball-making instructions
* admin/authors.el (authors): Make the error message more helpful.
(authors-ignored-files, authors-renamed-files-alist): Update.
Stefan Monnier [Fri, 18 Dec 2020 14:16:29 +0000 (09:16 -0500)]
* lisp/progmodes/which-func.el (which-func-update): Bind `non-essential`
Mattias Engdegård [Fri, 18 Dec 2020 13:35:09 +0000 (14:35 +0100)]
Follow good regexp practice
These were found by relint 1.19.
* lisp/help-fns.el (help-fns--first-release): Use string-end instead
of line-end when matching a file name.
* lisp/org/ob-core.el (org-babel--string-to-number): Put hyphen last
in alternative.
* lisp/org/org-agenda.el (org-agenda-filter): Escape '+' correctly.
Michael Albinus [Fri, 18 Dec 2020 12:33:31 +0000 (13:33 +0100)]
* lisp/net/tramp.el (tramp-handle-make-process): Handle shell commands.
João Távora [Fri, 18 Dec 2020 11:29:28 +0000 (11:29 +0000)]
Save match data in flymake-diag-region (bug#29193)
* lisp/progmodes/flymake.el (flymake-diag-region): Move
save-match-data up.
Lars Ingebrigtsen [Fri, 18 Dec 2020 09:24:48 +0000 (10:24 +0100)]
Fix previous frame-focus server.el change
* lisp/server.el (server-execute): Always give Emacs focus,
whether we open a new frame or not.
Eric Abrahamsen [Fri, 18 Dec 2020 03:16:00 +0000 (19:16 -0800)]
Fix regexp in IMAP search-string preparation
* lisp/gnus/gnus-search.el (gnus-search-run-search): This was failing
to catch all of X-GM-RAW.
Dmitry Gutov [Fri, 18 Dec 2020 02:05:18 +0000 (04:05 +0200)]
flymake-diag-region: Fix the recent test breakage
* lisp/progmodes/flymake.el (flymake-diag-region):
Make sure to save the match data (bug#29193).
Stefan Monnier [Thu, 17 Dec 2020 23:21:47 +0000 (18:21 -0500)]
* lisp/org/org-refile.el (org-copy): Fix missing obsoletion version
Michael Albinus [Thu, 17 Dec 2020 17:52:23 +0000 (18:52 +0100)]
Some minor Tramp changes
* doc/lispref/os.texi (Timers): Speak about `remote-file-error'.
* doc/misc/tramp.texi (Frequently Asked Questions): Speak about
`remote-file-error'.
(External packages): New subsection "Timers".
* lisp/net/tramp-adb.el (tramp-adb-handle-make-process):
* lisp/net/tramp-sh.el (tramp-sh-handle-make-process): Adapt error
function. Handle coding.
* lisp/net/tramp.el (tramp-handle-make-process): Adapt error function.
Stefan Kangas [Thu, 17 Dec 2020 18:08:40 +0000 (19:08 +0100)]
Remove incorrect comment from erc-goodies.el
* lisp/erc/erc-goodies.el (erc-move-to-prompt-setup): Remove incorrect
comment; the XEmacs compat code has been removed.
Stefan Monnier [Thu, 17 Dec 2020 16:53:56 +0000 (11:53 -0500)]
Fix my two most common causes of all windows/frames redisplay
* src/buffer.c (Fkill_all_local_variables): Only redisplay the buffer.
* src/window.c (set_window_scroll_bars): Only redisplay the window.
Zajcev Evgeny [Thu, 17 Dec 2020 08:27:20 +0000 (11:27 +0300)]
Make "Invalid modifier in string" ordinary invalid-read-syntax error
* src/lread.ec (read1): Raise "Invalid modifier in string" error as
`invalid-read-syntax'. This fixes raise of unhandled error in
`elisp--local-variables'
Eli Zaretskii [Thu, 17 Dec 2020 14:22:05 +0000 (16:22 +0200)]
; Add a new item to TODO
* etc/TODO (redisplay): Add an item for making redisplay cycle
more scalable when there are many frames.
Lars Ingebrigtsen [Thu, 17 Dec 2020 11:32:29 +0000 (12:32 +0100)]
Fix fallback use of write-file in ido-mode
* lisp/ido.el (ido-file-internal): Make `write-file' respect the
directory we've navigated to (bug#28513).
Philipp Stephani [Thu, 17 Dec 2020 11:06:15 +0000 (12:06 +0100)]
Ensure that byte compilation works for relative files (Bug#45287).
* lisp/emacs-lisp/bytecomp.el (byte-compile-file): Don’t fail if
target filename doesn’t contain a directory name.
* test/lisp/emacs-lisp/bytecomp-tests.el
(bytecomp-tests--target-file-no-directory): New unit test.
Lars Ingebrigtsen [Thu, 17 Dec 2020 11:17:23 +0000 (12:17 +0100)]
Default the init file to init.el, not init
* lisp/startup.el (startup--load-user-init-file): Make the default
init file be "init.el", not "init" (bug#45197).
Pankaj Jangid [Wed, 16 Dec 2020 22:34:20 +0000 (23:34 +0100)]
Fix resetting of gnus-pick-line-number
* lisp/gnus/gnus-sum.el (gnus-summary-read-group-1): Move setting
gnus-pick-line-number from here (bug#45269)...
(gnus-summary-prepare): To here. This ensures that the number is
reset when regenerating the buffer, for instance when limiting it.
Juri Linkov [Wed, 16 Dec 2020 21:27:11 +0000 (23:27 +0200)]
Don't show minibuffer keybindings for suggestions in read-extended-command
* lisp/simple.el (read-extended-command): Use 'affixation-function'
instead of 'annotation-function'. (Bug#45035)
(read-extended-command--affixation): New function created from
'read-extended-command--annotation'.
Juri Linkov [Wed, 16 Dec 2020 21:19:46 +0000 (23:19 +0200)]
Give affixation-function higher priority over annotation-function (bug#45234)
* doc/lispref/minibuf.texi (Completion Variables)
(Programmed Completion): Describe precedence rules
of affixation-function and annotation-function.
* lisp/minibuffer.el (completion-metadata)
(completion-extra-properties): Describe precedence rules
of affixation-function and annotation-function.
(minibuffer-completion-help): First try to apply
affixation-function, if there is no such function,
try annotation-function.
Eli Zaretskii [Wed, 16 Dec 2020 19:14:40 +0000 (21:14 +0200)]
Improve documentation of 'query-replace'
* doc/emacs/search.texi (Query Replace): Add 'E' to the list of
characters one can type at 'query-replace' prompt. (Bug#45273)
Bastien Guerry [Wed, 16 Dec 2020 18:17:58 +0000 (19:17 +0100)]
Update to Org 9.4.3
Fix #45259
Harald Jörg [Tue, 15 Dec 2020 17:53:03 +0000 (18:53 +0100)]
CPerl-mode: don't treat <<>> as starting a here-doc
* lisp/progmodes/cperl-mode.el (cperl-find-pods-heres): Detect
the "<<>>" operator (Bug#42455).
* test/lisp/progmodes/cperl-mode-tests.el
(cperl-test-bug-45255): Verify that <<>> does not start a
HERE-doc.
E. Choroba [Tue, 15 Dec 2020 13:37:50 +0000 (14:37 +0100)]
Update short docs in cperl-mode
* lisp/progmodes/cperl-mode.el (cperl-short-docs):
Update with some missing entries. (Bug#45254)
Stefan Kangas [Wed, 16 Dec 2020 14:20:46 +0000 (15:20 +0100)]
; * lisp/play/5x5.el: Fix my last change.
Dmitry Gutov [Wed, 16 Dec 2020 00:49:35 +0000 (02:49 +0200)]
(flymake-diag-region): Fall back to (end-of-thing 'symbol)
* lisp/progmodes/flymake.el (flymake-diag-region):
Fall back to (end-of-thing 'symbol) (bug#29193).
Eli Zaretskii [Tue, 15 Dec 2020 17:34:16 +0000 (19:34 +0200)]
Fix C-n/C-p when a line starts with an image
* src/xdisp.c (move_it_to): Handle the case where the second call
to move_it_in_display_line_to under MOVE_TO_Y takes us farther
from TO_CHARPOS than the first call. This fixes values returned
by pos-visible-in-window-p and posn-at-point when the screen line
starts with invisible text followed by an image. (Bug#9092)
Glenn Morris [Tue, 15 Dec 2020 17:24:21 +0000 (09:24 -0800)]
; Merge from origin/emacs-27
The following commit was skipped:
ee6c702e18 (origin/emacs-27) Fix error with fn key in NS port (bug#44...
Glenn Morris [Tue, 15 Dec 2020 17:24:21 +0000 (09:24 -0800)]
Merge from origin/emacs-27
668f0a7f84 Fix point location when completing in gdb-mi.el
2dbc95063b Update to Org 9.4.2
f22856a5c5 Update to Org 9.4.1
# Conflicts:
# doc/misc/org.texi
# lisp/org/ob-core.el
# lisp/org/ob-ruby.el
# lisp/org/ob-screen.el
# lisp/org/ol-gnus.el
# lisp/org/ol.el
# lisp/org/org.el
Glenn Morris [Tue, 15 Dec 2020 17:23:37 +0000 (09:23 -0800)]
; Merge from origin/emacs-27
The following commit was skipped:
6aa9fe3e1b Fix crash in ns_mouse_position (bug#44313)
Glenn Morris [Tue, 15 Dec 2020 17:23:37 +0000 (09:23 -0800)]
Merge from origin/emacs-27
62a6934af9 Fix crash when using XRender and restoring image from X (b...
de032d41c6 Bind k to image-kill-buffer in doc-view-mode-map.
Eli Zaretskii [Tue, 15 Dec 2020 17:19:43 +0000 (19:19 +0200)]
Fix setting breakpoints in "M-x gdb" when a source file is missing
* lisp/progmodes/gdb-mi.el (gdb-get-location): Fix control flow
logic when "fullname" is not found. Unquote and unescape the full
file name by calling gdb-mi--c-string-from-string. FLAG is a
string, not a character. (Bug#15051)
Alan Mackenzie [Tue, 15 Dec 2020 12:09:47 +0000 (12:09 +0000)]
CC Mode: Optimize for scrolling large buffers containing few braces
This fixes bug #25706. It particularly pertains to .h files which contain
only macro definitions. Many of these files are to be found, for example, in
the driver sections of the Linux kernel.
* lisp/progmodes/cc-engine.el (c-beginning-of-statement-1, c-on-identifier)
(c-syntactic-skip-backward, c-find-decl-prefix-search, c-find-decl-spots)
(c-forward-name, c-back-over-list-of-member-inits)
(c-back-over-member-initializers, c-looking-at-inexpr-block)
(c-guess-basic-syntax): Give search limits to, or amend existing ones to
c-backward-syntactic-ws, c-forward-syntactic-ws, c-backward-token-2,
c-beginning-of-statement-1.
(c-determine-limit-no-macro): New function.
(c-determine-limit-get-base): Remove unlimted invocation of
c-backward-syntactic-ws.
(c-determine-limit): Exclude movement between two different macros. Use new
function c-determine-limit-no-macro.
(c-back-over-list-of-member-inits): New parameter `limit'.
* lisp/progmodes/cc-fonts.el (c-font-lock-complex-decl-prepare)
(c-font-lock-declarations, c-font-lock-c++-using): Give search limits to, or
amend existing ones to c-backward-syntactic-ws, c-beginning-of-decl-1.
* lisp/progmodes/cc-mode.el (c-unfind-coalesced-tokens, c-before-changer)
(c-fl-decl-end): Give search limits to, or amend existing ones to
c-backward-syntactic-ws, c-forward-syntactic-ws, skip-chars-backward,
skip-chars-forward.
Michael Albinus [Tue, 15 Dec 2020 11:50:50 +0000 (12:50 +0100)]
Revert last change in tramp-maybe-open-connection)
* lisp/net/tramp-sh.el (tramp-maybe-open-connection): Revert last change,
it causes trouble.
Lars Ingebrigtsen [Tue, 15 Dec 2020 07:43:41 +0000 (08:43 +0100)]
Fix electric pairs in rst-mode
* lisp/textmodes/rst.el (rst-mode-syntax-table): Mark pairs in the
syntax table (bug#23413).
(rst-mode): Instead of setting electric-pair-pairs.
Lars Ingebrigtsen [Tue, 15 Dec 2020 06:18:03 +0000 (07:18 +0100)]
Bind current-minibuffer-command to this-command
* src/callint.c (Fcall_interactively): Bind
current-minibuffer-command to this-command, as documented (bug#45177).
Glenn Morris [Mon, 14 Dec 2020 21:51:22 +0000 (13:51 -0800)]
* doc/lispref/errors.texi (Standard Errors): Fix xref.
Though I am not sure "report a bug" is helpful.
Glenn Morris [Mon, 14 Dec 2020 21:46:35 +0000 (13:46 -0800)]
* doc/emacs/indent.texi (Indent Convenience): Fix use of @xref.
Glenn Morris [Mon, 14 Dec 2020 21:45:29 +0000 (13:45 -0800)]
Tiny fix for lispref/variables.texi
* doc/lispref/variables.texi (Converting to Lexical Binding):
@strong{Note...} produces a spurious cross-reference in Info;
reword to avoid that.
Stefan Monnier [Mon, 14 Dec 2020 21:16:01 +0000 (16:16 -0500)]
* lisp/emacs-lisp/gv.el (error): Allow it as a place
Alan Mackenzie [Mon, 14 Dec 2020 20:44:33 +0000 (20:44 +0000)]
Optimise c-font-lock-<>-arglists, particularly for buffers with few <..> pairs
* lisp/progmodes/cc-fonts.el (c-font-lock-<>-arglists): In place of a regexp
search for a complicated and slow regexp, search simply for "<" ouside of
literals together with add hoc testing of other requirements for a <...>
match.
* lisp/progmodes/cc-langs.el (c-nonsymbol-key): New c-lang-defvar from the
c-lang-const.
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.
(cherry picked from commit
7970610d48701a949ce443c94c71eac47d044197)
Alan Mackenzie [Mon, 14 Dec 2020 19:38:52 +0000 (19:38 +0000)]
Optimise c-parse-state for large buffers with few (if any) braces.
* lisp/progmodes/cc-engine (c-get-fallback-scan-pos): Search a maximum of
50,000 characters back for the two BODs. Return nil if we dont' find them.
(c-parse-state-get-strategy): For strategy `forward', always use the position
`good-pos' for `start-point', even when there's a change of current macro.
Deal with a possible return value of nil from c-get-fallback-scan-pos (as
above).
(c-invalidate-state-cache-1): For `c-state-cache-good-pos', instead of
sometimes using the minimum scan pos (leading to extensive scanning of the
entire buffer) use a point close to `here'.
Lars Ingebrigtsen [Mon, 14 Dec 2020 18:54:29 +0000 (19:54 +0100)]
Add some admin/emake comments
Gregory Heytings [Mon, 14 Dec 2020 18:49:39 +0000 (19:49 +0100)]
Make the emake error messages red
* admin/emake: Colorize error messages.
Michael Albinus [Mon, 14 Dec 2020 18:30:01 +0000 (19:30 +0100)]
Add 'remote-file-error' for Tramp
* doc/lispref/errors.texi (Standard Errors): Add 'remote-file-error'.
* etc/NEWS: Mention 'remote-file-error'.
* lisp/net/ange-ftp.el (ftp-error): Add error condition
`remote-file-error'.
* lisp/net/tramp-cmds.el (tramp-cleanup-all-connections): Do not set
`tramp-locked'.
* lisp/net/tramp-compat.el (remote-file-error): Define if it
doesn't exist.
* lisp/net/tramp-sh.el (tramp-timeout-session): Check for "locked"
property.
(tramp-maybe-open-connection): Simplify.
* lisp/net/tramp.el (tramp-locked, tramp-locker): Remove them.
(tramp-file-name-handler): Do not set them.
(with-tramp-locked-connection): New defmacro.
(tramp-accept-process-output, tramp-send-string): Use it.
* src/fileio.c (Qremote_file_error): New error symbol.
* test/lisp/net/tramp-tests.el (tramp-test43-asynchronous-requests):
Adapt test. Remove :unstable tag.
Eli Zaretskii [Mon, 14 Dec 2020 18:23:24 +0000 (20:23 +0200)]
Improve accuracy of scrolling commands
* src/xdisp.c (move_it_vertically_backward): Don't rely on
line_bottom_y for accurate calculation of the next screen line's Y
coordinate: it doesn't work when the current screen line was not
yet traversed. Instead, record the previous Y coordinate and
reseat there if overshoot is detected.
* src/window.c (window_scroll_pixel_based): Calculate the new
window-start point more accurately when screen lines have uneven
height. (Bug#8355)
Stefan Kangas [Mon, 14 Dec 2020 18:21:28 +0000 (19:21 +0100)]
Make XEmacs entry in the FAQ more contemporary
* doc/misc/efaq.texi (Difference between Emacs and XEmacs): Make
XEmacs entry in the FAQ more contemporary. Remove part about re-using
XEmacs code; this is not likely to be relevant these days and in any
case is not a frequently asked question. (Bug#45235)
Eli Zaretskii [Mon, 14 Dec 2020 18:09:04 +0000 (20:09 +0200)]
Fix point location when completing in gdb-mi.el
* lisp/progmodes/gdb-mi.el (def-gdb-auto-update-handler): Don't
force window-start position, so that redisplay doesn't move point
when popping completion window below the GUD one. (Bug#45052)
Eric Abrahamsen [Fri, 11 Dec 2020 03:52:00 +0000 (19:52 -0800)]
Fix logic of gnus-search-imap-handle-date
* lisp/gnus/gnus-search.el (gnus-search-imap-handle-date): Just
rewrite this whole ridiculous function.
Stefan Kangas [Mon, 14 Dec 2020 17:08:20 +0000 (18:08 +0100)]
* lisp/play/5x5.el: Fix typo. Remove redundant :group args.
Tim Ruffing [Mon, 14 Dec 2020 16:59:58 +0000 (17:59 +0100)]
* etc/emacs.service:
* etc/emacs.service (ExecStart): Make Emacs exit from systemd work
better (bug#45181).
The problem here is the exit code 15, which emacs will return *only* if
it has received SIGTERM. I believe what's happening here is that
emacsclient will call kill-emacs but not wait until the emacs server
has properly shut down. However, it's supposed to wait for the shutdown
as an "ExecStop" command according to "man systemd.service". So since
the process is still alive when emacsclient comes back, systemd will
still issue SIGTERM, making emacs return 15 (maybe after calling kill-
emacs again?!).
Copyright-paperwork-exempt: yes
Robert Thorpe [Mon, 14 Dec 2020 16:51:25 +0000 (17:51 +0100)]
Mention how to handle user names with @ in rmail
* doc/emacs/rmail.texi (Remote Mailboxes): Mention how to work
around the problem with user names like foo@example.com (bug#16946).
Copyright-paperwork-exempt: yes
Daniel Martín [Mon, 14 Dec 2020 16:16:00 +0000 (17:16 +0100)]
Make goto-char offer the number at point as default
* lisp/subr.el (read-natnum-interactive): New function to read natural
numbers for interactive functions.
* src/editfns.c (Fgoto_char): Call read-natnum-interactive from the
interactive definition of goto-char to offer the number at point as
default. Also expand the docstring to document this new interactive
behavior.
* doc/emacs/basic.texi (Moving Point): Expand the Emacs manual to
document this new behavior.
* etc/NEWS: And announce it (bug#45199).
Lars Ingebrigtsen [Mon, 14 Dec 2020 16:07:41 +0000 (17:07 +0100)]
Tool bar documentation clarification: Mention forcing updates
* doc/lispref/keymaps.texi (Tool Bar): Document that flipping the
status of a tool bar item doesn't necessarily update the visuals
(bug#42957).
Tomas Nordin [Mon, 14 Dec 2020 15:58:07 +0000 (16:58 +0100)]
Fix narrow-to-defun in python-mode
* lisp/progmodes/python.el (python-nav--beginning-of-defun): Make
narrow-to-defun work better in classes (bug#40563).
Copyright-paperwork-exempt: yes
Lars Ingebrigtsen [Mon, 14 Dec 2020 15:44:00 +0000 (16:44 +0100)]
Add a new recursively bound `current-minibuffer-command' variable
* doc/lispref/commands.texi (Command Loop Info): Document it
(bug#45177).
* src/callint.c (Fcall_interactively): Bind it.
* src/keyboard.c (syms_of_keyboard): Define
current-minibuffer-command.
Ulrich Ölmann [Mon, 14 Dec 2020 15:02:54 +0000 (16:02 +0100)]
Add a DirectoryMode to the Emacs Server example
* doc/emacs/misc.texi (Emacs Server): Update example
* doc/emacs/misc.texi (Emacs Server): The socket containing directory
is per default created with permissions 0755 by the socket-unit.
However this is considered unsafe since commit [1], so enhance unit
example with systemd configuration directive `DirectoryMode=' to
create it with safe permissions, see
https://www.freedesktop.org/software/systemd/man/systemd.socket.html#DirectoryMode=
[1] 2003-04-12 "(server-socket-name): Use new safe location for socket."
Copyright-paperwork-exempt: yes
Stefan Kangas [Mon, 14 Dec 2020 15:23:51 +0000 (16:23 +0100)]
Update value of frame-title-format in FAQ
* doc/misc/efaq.texi (Displaying the current file name in the
titlebar): Fix default value of frame-title-format.
Stefan Kangas [Mon, 14 Dec 2020 15:22:22 +0000 (16:22 +0100)]
Don't recommend setnu and wb-line-number
* doc/misc/efaq.texi (Displaying the current line or column): Remove
reference to third-party alternatives to display-line-numbers-mode.
Stefan Kangas [Mon, 14 Dec 2020 14:48:38 +0000 (15:48 +0100)]
Remove more references to old versions from FAQ
* doc/misc/efaq.texi (Learning how to do something)
(Installing Emacs, Emacs for GNUstep, Emacs for macOS): Remove more
references to Emacs 22 and older from FAQ.
Stefan Kangas [Mon, 14 Dec 2020 14:16:13 +0000 (15:16 +0100)]
Make XEmacs compat variable warning-level-aliases obsolete
* lisp/emacs-lisp/warnings.el (warning-level-aliases): Make obsolete.
(display-warning): Warn when using one of the warning levels defined
in above obsolete variable. (Bug#44849)
* lisp/url/url-proxy.el (url-find-proxy-for-url): Replace obsolete
warning type 'critical with :error.
Stefan Kangas [Mon, 14 Dec 2020 14:09:14 +0000 (15:09 +0100)]
Prefer setq to set+quote
* lisp/cedet/semantic/senator.el (senator-lazy-highlight-update):
* lisp/emulation/edt.el (edt-find, edt-restore-key)
(edt-remember):
* lisp/eshell/em-ls.el (eshell-ls--insert-directory):
* lisp/net/tramp-sh.el (tramp-sh-handle-write-region):
* lisp/progmodes/hideif.el (hide-ifdef-mode):
* test/lisp/url/url-future-tests.el (url-future-tests): Prefer setq to
set+quote.