* lisp/subr.el (provided-mode-derived-p): Remove detail about "or
their aliases", since that seems self-evident (bug#46331) (and
derived-mode-p works the same, and doesn't have the bit in
question).
* lisp/emacs-lisp/testcover.el: Rename the symbol `1value'
throughout the file to `testcover-1value' to allow using the
variable in code that's to be tested (bug#25471).
* lisp/subr.el (provided-mode-derived-p): Allow this to work on
modes that are aliases of other modes (bug#46331). For instance:
(provided-mode-derived-p 'javascript-mode 'prog-mode)
Michael Albinus [Sat, 6 Feb 2021 10:50:55 +0000 (11:50 +0100)]
Modernize use of prompts in auth-source.el
* lisp/auth-source.el (auth-source-search): Adapt docstring
(auth-source-format-prompt): Remove trailing ": ".
(auth-source-netrc-create, auth-source-secrets-create)
(auth-source-plstore-create): Adapt prompts. Use `format-prompt'.
Do not ask interactively if `auth-source-save-behavior' is nil.
Eli Zaretskii [Fri, 5 Feb 2021 12:24:01 +0000 (14:24 +0200)]
Fix last change in 'window-text-pixel-size'
* src/xdisp.c (Fwindow_text_pixel_size): Fix last change: preserve
the original Y coordinate after start_display, instead of zeroing
it out. Reported by martin rudalics <rudalics@gmx.at>.
Protect against killed buffers in term-emulate-terminal
* lisp/term.el (term-emulate-terminal): Ensure that the buffer is
still alive before selecting it (bug#46323). This avoids an error
when saying `C-x k' in an ansi-term buffer.
Eli Zaretskii [Thu, 4 Feb 2021 17:35:07 +0000 (19:35 +0200)]
Avoid overwriting minibuffer prompt by keystrokes echo
* src/lread.c (Fread_char, Fread_event, Fread_char_exclusive):
Call cancel_echoing to make sure the prompt is not obscured by
keystrokes echo. (Bug#46243)
* lisp/progmodes/python.el (python-shell-send-region): Deactivate
mark after executing (bug#28789). This is how this command worked
in Emacs 24, apparently.
Eli Zaretskii [Thu, 4 Feb 2021 16:00:29 +0000 (18:00 +0200)]
Fix 'window-text-pixel-size' for short spans of text
* src/xdisp.c (Fwindow_text_pixel_size): Support the use case
where FROM and TO belong to the same screen line. Reported by
Yuan Fu <casouri@gmail.com>.
Allow a :variable keyword in define-globalized-minor-mode
* doc/lispref/modes.texi (Defining Minor Modes): Document it.
* lisp/emacs-lisp/easy-mmode.el (define-globalized-minor-mode):
Allow specifying a :variable to be used if the underlying mode has
a divergent variable to store the state (bug#29081).
Make the recency sorting stable when we have inverted sorting
* lisp/ibuffer.el (recency): Remove.
(recency): New macro function so that sorting by recency is
stable when inverted sorting is switched on (bug#30129).
Don't ask the user to make a bug report on missing arglists
* lisp/help-fns.el (help-fns--signature): Don't ask the user to
make a bug report (bug#30223) because the symbol may very well be
one that the user has defined themselves.
(help-fns-function-description-header): Ditto.
Robert Pluim [Thu, 4 Feb 2021 10:24:13 +0000 (11:24 +0100)]
Update description of 'tramp-crypt-remove-directory'
* doc/misc/tramp.texi (Keeping files encrypted): Correct name of
function to use to indicate files should no longer be encrypted,
and update its description.
Stefan Kangas [Thu, 4 Feb 2021 07:16:33 +0000 (08:16 +0100)]
Don't set removed variable facemenu-unlisted-faces
* lisp/vc/ediff-init.el (ediff-hide-face): Redefine as obsolete
function alias for 'ignore'; the variable 'facemenu-unlisted-faces'
was removed in Emacs 22. Remove all calls.
* lisp/mh-e/mh-e.el: Add comment saying that the variable
'facemenu-unlisted-faces' is removed.
Dmitry Gutov [Thu, 4 Feb 2021 01:38:27 +0000 (03:38 +0200)]
Bind default-directory to the project root
* lisp/progmodes/project.el (project-find-regexp):
Bind default-directory to the project root, to save this value
in the resulting buffer (esp. if the project selector was used,
(https://lists.gnu.org/archive/html/emacs-devel/2021-02/msg00140.html).
(project-or-external-find-regexp): Same.
* lisp/net/tramp-adb.el (tramp-adb-file-name-handler): Sync args
with other `tramp-*-file-name-handler'.
* lisp/net/tramp-compat.el (tramp-error): Declare.
(tramp-compat-file-missing): New defsubst.
* lisp/net/tramp-gvfs.el (tramp-gvfs-do-copy-or-rename-file):
Handle volatile files.
(tramp-gvfs-set-attribute): New defun.
(tramp-gvfs-handle-set-file-modes)
(tramp-gvfs-handle-set-file-times)
(tramp-gvfs-handle-set-file-uid-gid): Use it.
* lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file):
Use `msg-operation'.
* lisp/net/tramp.el (tramp-handle-file-truename): Drop volume letter from
symlinked files.
* test/lisp/net/tramp-tests.el (tramp--test-gdrive-p): New defun.
(tramp--test-nextcloud-p): Remove.
(tramp-test40-special-characters-with-ls): Do not skip on MS Windows.
(tramp-test41-utf8): Skip if needed.
Make backslash characters no longer escape in `f90-mode'
* lisp/progmodes/f90.el (f90-backslash-not-special): Make obsolete
(bug#32766).
(f90-mode-syntax-table): Make the backslash be a normal
(non-escape) character, which is the default since about 2007 (and
F2K): https://gcc.gnu.org/bugzilla/show_bug.cgi?id=34203
Wilson Snyder [Wed, 3 Feb 2021 04:22:44 +0000 (23:22 -0500)]
Update lisp/progmodes/verilog-mode.el
* lisp/progmodes/verilog-mode.el: Cleanup compile-time warning
suppression. Use underscore for unused arguments and other style
cleanups. Use '# for function references. By Stefan Monnier.
(verilog-auto-reset, verilog-sig-tieoff):
Fix AUTORESET '0 (#1714). Reported by Paul Adams.
(verilog-simplify-range-expression):
Fix AUTOWIRE simplifying X/Y where there is a remainder (#1712).
Reported by Joachim Lechner.
(verilog-read-sub-decls-expr):
Fix multiplication in multidimensional AUTOINST output (#1698).
Reported by alanamckee.
(verilog-at-constraint-p, verilog-at-streaming-op-p, verilog-streaming-op-re):
Add streaming operator support (#1692) (#1516),
(verilog-auto-assign-modport, verilog-auto-inout-modport):
Support adding prefix to AUTOASSIGNMODPORT and AUTOINOUTMODPORT (#1690).
(verilog-signals-matching-dir-re):
Fix error when matching regexp with 2D packed memory.
Reported by Chris DeMarco.
(verilog-declaration-core-re): Allow parameter
declaration statements to align like any other declaration (#1683).
Suggested by Vinam Arora.
(verilog-auto-inout, verilog-auto-inout-in)
(verilog-auto-inout-module, verilog-auto-input, verilog-auto-inst)
(verilog-auto-inst-param, verilog-auto-output-every)
(verilog-signals-matching-regexp)
(verilog-signals-not-matching-regexp):
When "?!" is at the front of a signal-matching regexp, invert it.
(verilog-declaration-varname-matcher)
(verilog-highlight-max-lookahead, verilog-mode)
(verilog-single-declaration-end) (verilog-font-lock-keywords-1):
Improve syntax highlighting in declaration statements, and support
multi-line declarations, #1681. Reported by Vinam Arora.
Alan Mackenzie [Tue, 2 Feb 2021 20:34:42 +0000 (20:34 +0000)]
CC Mode: Prevent "const" inside an identifier being recognized as the keyword
This fixes bug #45560.
* lisp/progmodes/cc-engine.el (c-forward-declarator)
(c-forward-decl-or-cast-1): Amend certain regexp match numbers on account of
the change below. Surround some looking-at calls with save-match-data.
* lisp/progmodes/cc-langs.el (c-type-decl-prefix-keywords-key): New lang
const.
(c-type-decl-prefix-key): Reformulate to match operators and keywords
separately, using the new lang const (above).
Stefan Kangas [Mon, 1 Feb 2021 15:03:10 +0000 (16:03 +0100)]
; Move obsolete version variables further down
* lisp/dframe.el:
* lisp/speedbar.el: Move obsolete variables from the top of the file
to the bottom, where they don't obscure the license information.
* src/lread.c (invalid_syntax_lisp): Instead of putting the
line/column in a string, signal an error containing the numbers as
data. This allows for easier post-processing and is how other
similar errors (like (forward-sexp 1)) do it.
Dmitry Gutov [Tue, 2 Feb 2021 01:47:46 +0000 (03:47 +0200)]
ruby-syntax-propertize: Fix certain cases following ::
* lisp/progmodes/ruby-mode.el (ruby-syntax-propertize):
Make sure to backtrack if the "symbols with special characters"
rule is aborted because of preceding colon.
Make syntax errors say the line/column they appear at
* src/lisp.h: Add count_lines prototype.
* src/lread.c (invalid_syntax_lisp): New function (bug#36970).
(invalid_syntax): Extend function to take a readcharfun parameter.
(read_emacs_mule_char, character_name_to_code): Pass in.
(read_escape, invalid_radix_integer, read1): Ditto.
* src/xdisp.c (count_lines): Add a more succinct shim over
display_count_lines.
Stefan Kangas [Mon, 1 Feb 2021 04:34:40 +0000 (05:34 +0100)]
Make XEmacs compat alias obsolete in allout-widgets.el
* lisp/allout-widgets.el (allout-frame-property): Redefine compat
alias as obsolete function alias for 'frame-parameter'.
(allout-fetch-icon-image): Update caller.
Stefan Kangas [Mon, 1 Feb 2021 04:32:16 +0000 (05:32 +0100)]
Make two eshell aliases obsolete
* lisp/eshell/esh-util.el (eshell-user-name): Redefine as obsolete
function alias for 'user-login-name'.
(eshell-copy-tree): Redefine as obsolete function alias for
'copy-tree'.
* lisp/eshell/esh-cmd.el (eshell-do-eval): Don't use above
obsolete alias.
* lisp/textmodes/sgml-mode.el (sgml-comment-indent-new-line): Only
indent as if we're in a comment if syntax-ppss says that we're in
a comment (bug#36227).
Stefan Monnier [Mon, 1 Feb 2021 00:27:10 +0000 (19:27 -0500)]
* lisp/eshell/em-cmpl.el: Try and fix bug#41423
(eshell--complete-commands-list): Rename from `eshell-complete-commands-list`.
Return a (dynamic) completion table rather than a list of completions.
Use `dolist` and `push`.
Stefan Monnier [Sun, 31 Jan 2021 23:00:39 +0000 (18:00 -0500)]
* admin/*.el: Use lexical-binding
* admin/admin.el: Use lexical-binding.
(manual-misc-manuals): Pass a limit to `looking-back`.
(reminder-for-release-blocking-bugs): Don't use `_` for a real variable.
* admin/authors.el: Use lexical-binding.
(authors-disambiguate-file-name): Remove unused var `parent`.
* admin/cus-test.el:
* admin/find-gc.el:
* admin/gitmerge.el: Use lexical-binding.