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.
Alan Mackenzie [Sun, 31 Jan 2021 17:24:23 +0000 (17:24 +0000)]
Minimise the time Vminibuffer_list is in an inconsistent state (src/minibuf.c)
src/minibuf.c (get_minibuffer): Move the XSETCAR which writes the new
minibuffer into Vminibuffer_list to immediately after the MB's creation, so
that the list is in a consistent state before calling fundamental-mode or
minibuffer-inactive-mode.
* lisp/subr.el (operating-system-release): Make obsolete
(bug#39940). There are no in-tree usages any more, and the data
doesn't seem all that interesting on its own.
Doc string improvements around `default-korean-keyboard'
* lisp/language/korea-util.el (default-korean-keyboard): Mention
"Hangul" here for easier discoverability.
(toggle-korean-input-method, quail-hangul-switch-symbol-ksc)
(quail-hangul-switch-hanja): Mention the variable.
Stefan Monnier [Sat, 30 Jan 2021 23:44:00 +0000 (18:44 -0500)]
* lisp/gnus: Use lexical-binding in all the files
* lisp/gnus/gnus-group.el (features): Use `dlet`.
(gnus-tmp-level, gnus-tmp-marked, gnus-tmp-group): Declare vars.
(gnus-group-insert-group-line): Bind dynbound vars via `let` rather
than as formal args. Bind `number` as dynbound.
(gnus-visual, gnus-score-find-score-files-function)
(gnus-home-score-file, gnus-apply-kill-hook)
(gnus-summary-expunge-below): Declare vars.
(gnus-group-restart, gnus-group-list-plus): Fix `interactive` spec
since the arg is unused.
* lisp/gnus/mail-source.el (mail-source-bind, mail-source-bind-common):
Use `dlet` and suppress the warnings about the non-prefixed dynbound vars.
(mail-source-set-1): Remove unused var `auth-info`.
(mail-source-call-script): Remove unused var `background`.
(mail-source-fetch-pop, mail-source-check-pop): Bind pop3 vars with `dlet`.
* lisp/gnus/gnus-int.el (mail-source-plugged, gnus-inhibit-demon):
Declare vars.
(gnus-server-opened, gnus-status-message)
(gnus-open-server, gnus-close-server, gnus-request-list)
(gnus-finish-retrieve-group-infos, gnus-retrieve-group-data-early)
(gnus-request-list-newsgroups, gnus-request-newgroups)
(gnus-request-regenerate, gnus-request-compact, gnus-request-group)
(gnus-retrieve-groups, gnus-request-post, gnus-request-expunge-group)
(gnus-request-scan, gnus-request-update-info, gnus-request-marks)
(gnus-request-accept-article, gnus-request-create-group)
(gnus-asynchronous-p, gnus-remove-denial):
Bind `gnus-command-method` via `let` rather than as formal args.
* lisp/gnus/gnus-topic.el (gnus-topic-insert-topic-line):
Pass documented vars to eval for `gnus-topic-line-format-spec`.
* lisp/gnus/message.el (message-yank-original): Use `cl-progv` rather
than `eval` to bind the vars from `message-cite-style`.
* lisp/gnus/mml.el (mml-parse-1): Use `apply` instead of `eval`.
(gnus-newsgroup-name, gnus-displaying-mime, gnus-newsgroup-name)
(gnus-article-prepare-hook, gnus-newsgroup-charset)
(gnus-original-article-buffer, gnus-message-buffer)
(message-this-is-news, message-this-is-mail): Declare vars.
* lisp/gnus/deuglify.el (gnus-outlook-rearrange-article): Remove unused
var `cite-marks`.
* lisp/gnus/gnus-art.el (ansi-color-context-region): Declare var.
(gnus-mime-display-attachment-buttons-in-header): Move declaration
before first use.
(gnus-mime-display-alternative): Remove unused var `from`.
* lisp/gnus/gnus-bookmark.el (gnus-bookmark-bmenu-list): Remove unused
var `start` `end`.
* lisp/gnus/gnus-cache.el (gnus-article-decode-hook)
(nnml-generate-active-function): Declare var.
* lisp/gnus/gnus-cite.el (gnus-message-citation-mode): Remove unused
var `keywords`.
* lisp/gnus/gnus-cloud.el (gnus-cloud-encode-data): Remove unused var
`cipher`.
(gnus-cloud-ensure-cloud-group): Remove unused var `method`.
* lisp/gnus/gnus-delay.el (gnus-delay-article): Remove unused var `days`.
* lisp/gnus/gnus-html.el (gnus-html-wash-images): Remove unused vars
`tag`, `string`, and `images`.
(gnus-html-wash-tags): Remove unused vars `string` and `images`.
* lisp/gnus/gnus-msg.el (gnus-msg-mail): Remove unused var `group-name`.
(gnus-group-mail, gnus-group-news, gnus-summary-mail-other-window)
(gnus-summary-news-other-window):
Remove unused vars `group` and `buffer`.
(gnus-configure-posting-styles): Remove unused vars `style` and `attribute`.
* lisp/gnus/gnus-picon.el (gnus-picon-find-face): Remove unused vars
`database`, `directory`, and `instance`.
(gnus-picon-transform-newsgroups): Remove unused var `point`.
* lisp/gnus/gnus-range.el (gnus-range-difference): Remove unused var `safe`.
* lisp/gnus/gnus-score.el (gnus-score-load-file): Remove unused var
`score-fn`.
* lisp/gnus/gnus-sum.el (message-options-set-recipient): Declare var.
* lisp/gnus/gnus-undo.el (gnus-undo): Fix docstring lie.
* lisp/gnus/gnus-util.el (print-string-length)
(iswitchb-make-buflist-hook): Declare vars.
(gnus-emacs-version): Remove unused var `codename`.
(gnus-rename-file): Remove unused vars `old-name` and `new-name`.
* lisp/gnus/gnus-uu.el (gnus-uu-yenc-article): Remove unused var
`start-char`.
(gnus-asynchronous): Declare var.
* lisp/gnus/mm-partial.el (gnus-displaying-mime): Declare var.
(mm-inline-partial): Remove unused var `buffer`.
* lisp/gnus/mm-view.el (w3m-force-redisplay, w3m-safe-url-regexp)
(gnus-displaying-mime, gnus-original-article-buffer)
(gnus-article-prepare-hook): Declare vars.
* lisp/gnus/mml-smime.el (mml-smime-epg-encrypt): Remove unused var
`boundary`.
(mml-smime-epg-verify): Remove unused vars `plain` and `signature-file`.
* lisp/gnus/mml1991.el (pgg-text-mode): Declare var.
* lisp/gnus/mml2015.el (pgg-text-mode): Declare var.
(mml2015-pgg-decrypt): Remove unused var `result`.
(mml2015-epg-key-image-to-string): Remove unused var `error`.
(mml2015-epg-decrypt): Remove unused var `result`.
(mml2015-epg-verify): Remove unused vars `plain` and `signature-file`.
* lisp/gnus/nnbabyl.el (nnml-current-directory): Declare var.
* lisp/gnus/nndiary.el (nndiary-files): Move declaration before first use.
* lisp/gnus/nnfolder.el (nnfolder-request-accept-article):
Remove unused var `buf`.
* lisp/gnus/nnmail.el (nnmail-parse-active): Remove unused var `err`.
* lisp/gnus/nnmairix.el (nnmairix-request-group): Remove unused var `args`.
(nnmairix-request-create-group): Remove unused var `info`.
(nnmairix-request-list): Remove unused var `folder`.
(nnmairix-request-set-mark): Remove unused var `propto`.
(nnmairix-request-set-mark): Remove unused vars `number` and `method`.
(nnmairix-close-group): Remove unused var `method`.
(nnmairix-create-search-group-from-message): Remove unused var `cq`.
(nnmairix-create-server-and-default-group): Remove unused var `create`.
(nnmairix-purge-old-groups): Remove unused var `folder`.
(nnmairix-remove-tick-mark-original-article, nnmairix-get-valid-servers):
Remove unused var `cur`.
(nnmairix-replace-group-and-numbers): Remove unused var `header`.
(nnmairix-goto-original-article): Remove unused var `rval`.
(nnmairix-widget-create-query): Remove unused var `allwidgets`.
* lisp/gnus/nnmbox.el (nnml-current-directory): Declare var.
* lisp/gnus/nnmh.el (nnmh-toplev): Move declaration before first use.
(nnmh-request-list-1): Remove unused var `rdir`.
* lisp/gnus/nnml.el (nnml-generate-nov-file): Remove unused var `file`.
* lisp/gnus/nnrss.el (nnrss-request-article): Remove unused var `post`.
(nnrss-request-article): Remove unused var `fn`.
(nnrss-check-group): Remove unused var `rdf-ns`.
* lisp/gnus/nnweb.el (nnweb-request-article): Remove unused var `active`.
(nnweb-google-parse-1): Remove unused var `Score`.
* lisp/gnus/spam-stat.el (spam-stat-error-holder): Remove var.
(spam-stat-buffer-words-with-scores): Remove unused var `word`.
(spam-stat-score-buffer): Remove unused var `spam-stat-error-holder`.
(spam-stat-split-fancy): Use `err` instead of `spam-stat-error-holder`.
* lisp/gnus/spam-wash.el (spam-wash): Remove unused var `handle`.
* lisp/gnus/spam.el (spam-copy-or-move-routine): Remove unused vars
`article` and `mark`.
(spam-register-routine): Remove unused var `article`.
(spam-log-undo-registration): Remove unused var `found`.
(spam-ifile-register-with-ifile): Remove unused var `parameters`.
(spam-check-stat): Remove unused vars `category` and `return`.
(spam-parse-list): Remove unused var `found`.
(spam-filelist-register-routine): Remove unused var `from`.
Stefan Monnier [Sat, 30 Jan 2021 21:45:25 +0000 (16:45 -0500)]
* lisp/gnus: Misc simplifications found during conversion to lexical
* lisp/gnus/nnoo.el (noo-import-1, nnoo-define-skeleton-1): Use `dolist`.
(noo-map-functions, nnoo-define-basics): Directly emit the code rather than
going through an intermediate function; this also avoids the use of `eval`.
(noo-map-functions-1, nnoo-define-basics-1): Delete functions,
folded into their corresponding macro.
* lisp/gnus/gmm-utils.el (gmm-tool-bar-from-list): Demote `eval` to
`symbol-value`.
* lisp/gnus/gnus-art.el (gnus-button-handle-describe-key): Avoid `eval`
since `kbd` is a function nowadays.
(gnus-treat-part-number): Rename from `part-number`.
(gnus-treat-total-parts): Rename from `total-parts`.
(gnus-treat-article, gnus-treat-predicate): Adjust accordingly.
* lisp/gnus/gnus-cache.el (gnus-agent-load-alist): Use `declare-function`.
* lisp/gnus/gnus-group.el (gnus-cache-active-hashtb): Use `defvar`.
(gnus-group-iterate): Make it a normal function since lexical scoping
avoids the risk of name capture anyway.
(gnus-group-delete-articles): Actually use the `oldp` arg.
* lisp/gnus/gnus-html.el (gnus-html-wash-images): Fix debug message so
it's emitted after the `url` var it prints is actually initialized.
And avoid `setq` while we're at it.
* lisp/gnus/gnus-msg.el (gnus-group-mail, gnus-group-news)
(gnus-summary-mail-other-window, gnus-summary-news-other-window):
Merge `let`s using `let*`.
* lisp/gnus/gnus-spec.el (gnus-update-format-specifications):
Tighten the scope of `buffer`, and tighten a regexp.
(gnus-parse-simple-format): Reduce code duplication.
* lisp/gnus/gnus-start.el (gnus-child-mode): Don't `defvar` it since we
never use that variable and accordingly don't define it as a minor mode.
* lisp/gnus/gnus-util.el (gnus-byte-compile): Simplify so it obeys
`gnus-use-byte-compile` not just on the first call.
(iswitchb-minibuffer-setup): Declare.
* lisp/gnus/mail-source.el (mail-source-bind-1)
(mail-source-bind-common-1): Use `mapcar`.
(mail-source-set-common-1): Use `dolist`.
(display-time-event-handler): Declare.
* lisp/gnus/spam.el (BBDB): Use the `noerror` arg of `require`, and
define all the functions for BBDB regardless if the require succeeded.
(spam-exists-in-BBDB-p): Don't inline, not worth it.
Alan Mackenzie [Sat, 30 Jan 2021 21:16:35 +0000 (21:16 +0000)]
With minibuffer-follows-selected-frame `hybrid', preserve recursive Mbuffers
...when enable-recursive-minibuffers is non-nil, and several minibuffers are
activated from different frames. Also set the major mode of a reused active
minibuffer to `fundamental-mode' - up till now it's been
minibuffer-inactive-mode.
* src/minibuf.c (read_minibuf): with the indicated settings of variables,
"stack up" all containing minibuffers on the mini-window of the current
frame. Delete another, now superfluous such stacking up.
(set_minibuffer_mode): New function.
(get_minibuffer): Call the above new function (twice), in place of inline
code, ensuring active minibuffers are never left in minibuffer-inactive-mode.
Stefan Monnier [Sat, 30 Jan 2021 19:15:19 +0000 (14:15 -0500)]
* lisp/gnus: Demote some macros and defsubsts, plus a fix
* lisp/gnus/gnus-sum.el (gnus-summary-thread-level)
(gnus-summary-article-mark): Turn macros into `defsubst`.
* lisp/gnus/mail-source.el (mail-source-bind-common): Actually use its arg.
* lisp/gnus/nntp.el (nntp-copy-to-buffer): Turn macro into a `defsubst`.
(nntp-wait-for, nntp-retrieve-data, nntp-send-command): Don't inline
those, it's not worth it.
Juri Linkov [Sat, 30 Jan 2021 19:12:37 +0000 (21:12 +0200)]
Allow the caller to specify own face on suffix in annotation-function
* lisp/minibuffer.el (completion--insert-strings):
Don't add 'completions-annotations' face when the caller
specified own face in annotation-function.
Remove no-op code for 'unless prefix' branch.
(completion-metadata, completion-extra-properties):
Update docs of affixation-function.
Suggested by Clemens <clemera@posteo.net> (bug#45780)
* test/lisp/minibuffer-tests.el: Rename package name from
completion-tests.el to minibuffer-tests.el.
Add new test completion--insert-strings-faces.
* doc/lispref/minibuf.texi (Completion Variables)
(Programmed Completion): Update descriptions of
annotation-function and affixation-function.
Augusto Stoffel [Wed, 27 Jan 2021 15:09:38 +0000 (16:09 +0100)]
Reduce flicker in Isearch mode
Lazy highlighting now happens immediately when the search string is at
least as long as the value of the new custom variable
`lazy-highlight-no-delay-length`. Also avoid updating the lazy
count in the echo area too often.
* isearch.el (lazy-highlight-no-delay-length): New defcustom.
* isearch.el (lazy-lazy-count-format): Avoid a momentarily incorrect
count when reversing search direction.
* isearch.el (isearch-lazy-highlight-new-loop): Avoid a call to
`isearch-message` that is quickly succeed by a second echo area
update, thus causing flicker.
* isearch.el (isearch-lazy-highlight-new-loop):
Start lazy highlight immediately if appropriate.
* etc/NEWS: Announce the change.
* doc/emacs/search.texi: Document `lazy-highlight-no-delay-length'.
* lisp/gnus/gnus-util.el (gnus-define-keys): Use `declare`, and also
don't quote `keymap` if it's a variable name.
(gnus-define-keys-1): Reject the case where `keymap` is a variable name.
(gnus-eval-in-buffer-window, gnus-define-keys-safe)
(gnus-define-keymap, gnus-atomic-progn, gnus-with-output-to-file)
(gnus-parse-without-error): Use `declare`.
(gnus-atomic-progn-assign, gnus-atomic-setq): Delete macros.
* lisp/gnus/gnus-undo.el (gnus-undo-register): Drop indent and edebug spec
since they're not really appropriate for a function.
* lisp/gnus/gnus-art.el (gnus--\,@): New macro.
Use it at top-level to construct the `gnus-article-FOO` => `article-FOO`
wrapper functions.
(gnus-with-article-headers, gnus-with-article-buffer): Use `declare`.