]> git.eshelyaron.com Git - emacs.git/log
emacs.git
3 years ago* lisp/gnus/gnus-group.el: Defvar all the `gnus-tmp-*` vars
Stefan Monnier [Sun, 31 Jan 2021 22:32:11 +0000 (17:32 -0500)]
* lisp/gnus/gnus-group.el: Defvar all the `gnus-tmp-*` vars

These were collected via

    sed -n -e 's/.*\(gnus-tmp-[^     ()]*\).*/(defvar \1)/p' \
        lisp/gnus/gnus-group.el

3 years ago* lisp/gnus: Use closures now that we activated `lexical-binding`
Stefan Monnier [Sat, 30 Jan 2021 23:56:37 +0000 (18:56 -0500)]
* lisp/gnus: Use closures now that we activated `lexical-binding`

* lisp/gnus/nnml.el (nnml-request-accept-article):
* lisp/gnus/nnmairix.el (nnmairix-request-marks):
* lisp/gnus/nnmail.el (nnmail-get-new-mail-1):
* lisp/gnus/mm-view.el (mm-inline-image)
(mm-inline-text-html-render-with-w3m, mm-inline-text)
(mm-insert-inline, mm-inline-message):
* lisp/gnus/mm-partial.el (mm-inline-partial):
* lisp/gnus/mm-archive.el (mm-archive-dissect-and-inline):
* lisp/gnus/gnus-util.el (gnus-create-info-command):
* lisp/gnus/gnus-topic.el (gnus-topic-edit-parameters)
(gnus-topic-sort-topics-1):
* lisp/gnus/gnus-sum.el (gnus-summary-edit-article):
* lisp/gnus/gnus-srvr.el (gnus-server-edit-server):
* lisp/gnus/gnus-msg.el (gnus-inews-make-draft)
(gnus-inews-add-send-actions, gnus-summary-cancel-article)
(gnus-summary-supersede-article, gnus-summary-resend-message)
(gnus-configure-posting-styles):
* lisp/gnus/gnus-kill.el (gnus-execute):
* lisp/gnus/gnus-html.el (gnus-html-wash-images):
* lisp/gnus/gnus-group.el (gnus-group-edit-group)
(gnus-group-nnimap-edit-acl):
* lisp/gnus/gnus-draft.el (gnus-draft-edit-message, gnus-draft-setup):
* lisp/gnus/gnus-art.el (gnus-article-edit-part)
(gnus-mm-display-part, gnus-article-edit):
* lisp/gnus/gnus-agent.el (gnus-category-edit-predicate)
(gnus-category-edit-score, gnus-category-edit-groups):
Use closures instead of `(lambda ...).

* lisp/gnus/nnoo.el (noo--defalias): New function.
(nnoo-import-1, nnoo-define-skeleton-1): Use it to avoid `eval`.

3 years ago* lisp/gnus: Use lexical-binding in all the files
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`.

3 years ago* lisp/gnus: Misc simplifications found during conversion to lexical
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/mml-smime.el (mml-smime-epg-verify): Reduce code duplication.

* lisp/gnus/mml.el (mml-parse-1): Reduce code duplication.

* lisp/gnus/mml2015.el (mml2015-epg-verify): Reduce code duplication.

* lisp/gnus/nnmail.el (nnmail-get-split-group): Tighten regexp.
(nnmail-split-it): Reduce code duplication.

* lisp/gnus/nnweb.el (nnweb-request-article): Avoid `setq`.

* 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.

3 years ago* lisp/gnus: Remove redundant `:group` args
Stefan Monnier [Sat, 30 Jan 2021 19:27:40 +0000 (14:27 -0500)]
* lisp/gnus: Remove redundant `:group` args

* lisp/gnus/spam-stat.el:
* lisp/gnus/spam-report.el:
* lisp/gnus/smime.el:
* lisp/gnus/nnrss.el:
* lisp/gnus/nnmairix.el:
* lisp/gnus/nnimap.el:
* lisp/gnus/nndiary.el:
* lisp/gnus/mm-url.el:
* lisp/gnus/mail-source.el:
* lisp/gnus/gnus-win.el:
* lisp/gnus/gnus-topic.el:
* lisp/gnus/gnus-sieve.el:
* lisp/gnus/gnus-search.el:
* lisp/gnus/gnus-registry.el:
* lisp/gnus/gnus-notifications.el:
* lisp/gnus/gnus-gravatar.el:
* lisp/gnus/gnus-eform.el:
* lisp/gnus/gnus-dup.el:
* lisp/gnus/gnus-diary.el:
* lisp/gnus/gnus-demon.el:
* lisp/gnus/gnus-delay.el:
* lisp/gnus/gnus-cloud.el:
* lisp/gnus/gnus-cite.el:
* lisp/gnus/gnus-bookmark.el:
* lisp/gnus/gmm-utils.el:
* lisp/gnus/deuglify.el:
* lisp/gnus/canlock.el: Remove redundant `:group` arguments

3 years ago* lisp/gnus: Demote some macros and defsubsts, plus a fix
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.

3 years ago* lisp/gnus: Use `with-current-buffer` at a few more places
Stefan Monnier [Sat, 30 Jan 2021 19:12:10 +0000 (14:12 -0500)]
* lisp/gnus: Use `with-current-buffer` at a few more places

* lisp/gnus/nnmbox.el (nnmbox-request-scan, nnmbox-read-mbox):
* lisp/gnus/nnmairix.el (nnmairix-create-search-group):
* lisp/gnus/nnfolder.el (nnfolder-existing-articles):
* lisp/gnus/nndraft.el (nndraft-auto-save-file-name):
* lisp/gnus/nndoc.el (nndoc-request-article):
* lisp/gnus/nnbabyl.el (nnbabyl-read-mbox):
* lisp/gnus/gnus-score.el (gnus-score-body):
* lisp/gnus/gnus-start.el (gnus-dribble-enter)
(gnus-dribble-eval-file, gnus-ask-server-for-new-groups)
(gnus-read-newsrc-file, gnus-read-descriptions-file):
* lisp/gnus/gnus-spec.el (gnus-update-format-specifications):
* lisp/gnus/gnus-draft.el (gnus-draft-edit-message):
* lisp/gnus/gnus-art.el (gnus-request-article-this-buffer)
(gnus-article-edit-exit): Use `with-current-buffer`.

3 years ago* lisp/gnus/gnus-msg.el: Remove empty `unwind-protect`s
Stefan Monnier [Sat, 30 Jan 2021 05:45:22 +0000 (00:45 -0500)]
* lisp/gnus/gnus-msg.el: Remove empty `unwind-protect`s

(gnus-msg-mail, gnus-group-mail)
(gnus-group-news, gnus-summary-mail-other-window)
(gnus-summary-news-other-window): Remove empty `unwind-protect`.

3 years ago* lisp/gnus/mm-encode.el (mm-default-file-type): New name
Stefan Monnier [Sat, 30 Jan 2021 05:40:21 +0000 (00:40 -0500)]
* lisp/gnus/mm-encode.el (mm-default-file-type): New name

Rename from misleading `mm-default-file-encoding`.
(mm-default-file-encoding): Redefine as obsolete alias.

* lisp/mail/sendmail.el (mail-add-attachment):
* lisp/mh-e/mh-mime.el (mh-minibuffer-read-type):
* lisp/gnus/gnus-art.el (gnus-mime-view-part-as-type-internal):
* lisp/gnus/gnus-dired.el (gnus-dired-attach):
* lisp/gnus/mml.el (mml-generate-mime-1, mml-minibuffer-read-type)
(mml-attach-file): Use the new name.

3 years ago* lisp/gnus: Quote functions with #'
Stefan Monnier [Sat, 30 Jan 2021 05:35:24 +0000 (00:35 -0500)]
* lisp/gnus: Quote functions with #'

To get better warnings, try and use #' to quote function names.

* lisp/gnus/canlock.el:
* lisp/gnus/deuglify.el:
* lisp/gnus/gmm-utils.el:
* lisp/gnus/gnus-agent.el:
* lisp/gnus/gnus-art.el:
* lisp/gnus/gnus-bookmark.el:
* lisp/gnus/gnus-cache.el:
* lisp/gnus/gnus-cite.el:
* lisp/gnus/gnus-cus.el:
* lisp/gnus/gnus-delay.el:
* lisp/gnus/gnus-diary.el:
* lisp/gnus/gnus-dired.el:
* lisp/gnus/gnus-draft.el:
* lisp/gnus/gnus-fun.el:
* lisp/gnus/gnus-group.el:
* lisp/gnus/gnus-html.el:
* lisp/gnus/gnus-int.el:
* lisp/gnus/gnus-kill.el:
* lisp/gnus/gnus-mlspl.el:
* lisp/gnus/gnus-msg.el:
* lisp/gnus/gnus-notifications.el:
* lisp/gnus/gnus-picon.el:
* lisp/gnus/gnus-registry.el:
* lisp/gnus/gnus-rfc1843.el:
* lisp/gnus/gnus-salt.el:
* lisp/gnus/gnus-score.el:
* lisp/gnus/gnus-search.el:
* lisp/gnus/gnus-sieve.el:
* lisp/gnus/gnus-srvr.el:
* lisp/gnus/gnus-start.el:
* lisp/gnus/gnus-topic.el:
* lisp/gnus/gnus-undo.el:
* lisp/gnus/gnus-util.el:
* lisp/gnus/gnus-uu.el:
* lisp/gnus/gnus.el:
* lisp/gnus/mail-source.el:
* lisp/gnus/message.el:
* lisp/gnus/mm-archive.el:
* lisp/gnus/mm-decode.el:
* lisp/gnus/mm-url.el:
* lisp/gnus/mm-util.el:
* lisp/gnus/mm-view.el:
* lisp/gnus/mml-sec.el:
* lisp/gnus/mml-smime.el:
* lisp/gnus/mml.el:
* lisp/gnus/nnagent.el:
* lisp/gnus/nndiary.el:
* lisp/gnus/nndoc.el:
* lisp/gnus/nndraft.el:
* lisp/gnus/nnfolder.el:
* lisp/gnus/nnheader.el:
* lisp/gnus/nnmail.el:
* lisp/gnus/nnmaildir.el:
* lisp/gnus/nnmairix.el:
* lisp/gnus/nnmh.el:
* lisp/gnus/nnml.el:
* lisp/gnus/nnrss.el:
* lisp/gnus/nnselect.el:
* lisp/gnus/nnspool.el:
* lisp/gnus/nnvirtual.el:
* lisp/gnus/nnweb.el:
* lisp/gnus/smiley.el:
* lisp/gnus/smime.el:
* lisp/gnus/spam-report.el:
* lisp/gnus/spam-stat.el:
* lisp/gnus/spam-wash.el:
* lisp/gnus/spam.el:

3 years ago* lisp/gnus/gnus-art.el: Add `event` args and operate at its position.
Stefan Monnier [Sat, 30 Jan 2021 04:58:58 +0000 (23:58 -0500)]
* lisp/gnus/gnus-art.el: Add `event` args and operate at its position.

(gnus-mime-save-part-and-strip)
(gnus-mime-delete-part, gnus-mime-save-part, gnus-mime-pipe-part)
(gnus-mime-view-part, gnus-mime-view-part-as-type)
(gnus-mime-copy-part, gnus-mime-print-part, gnus-mime-inline-part)
(gnus-mime-view-part-as-charset, gnus-mime-view-part-externally)
(gnus-mime-view-part-internally, gnus-article-press-button):
Add `event` arg and operate at its position.

3 years ago* lisp/gnus: Use `declare`.
Stefan Monnier [Sat, 30 Jan 2021 04:40:48 +0000 (23:40 -0500)]
* lisp/gnus: Use `declare`.

* lisp/gnus/nnoo.el (defvoo, deffoo, nnoo-declare, nnoo-import)
(nnoo-map-functions):
* lisp/gnus/nnmaildir.el (nnmaildir--with-nntp-buffer)
(nnmaildir--with-work-buffer, nnmaildir--with-nov-buffer)
(nnmaildir--with-move-buffer, nnmaildir--condcase):
* lisp/gnus/mm-decode.el (mm-with-part):
* lisp/gnus/gnus-msg.el (gnus-setup-message):
* lisp/gnus/gnus-agent.el (gnus-agent-with-fetch, gnus-agent-while-plugged):
* lisp/gnus/mail-source.el (mail-source-set-1, mail-source-value):
Use `declare`.

* 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`.

3 years agoRemove unused argument from set_frame_menubar (Bug#45759)
Stefan Kangas [Sat, 30 Jan 2021 14:59:13 +0000 (15:59 +0100)]
Remove unused argument from set_frame_menubar (Bug#45759)

* src/w32menu.c (set_frame_menubar):
* src/xmenu.c (set_frame_menubar): Remove unused argument.
All callers updated.

3 years agoAlso highlight 'conflict' with the warning face
Dmitry Gutov [Sat, 30 Jan 2021 13:42:19 +0000 (15:42 +0200)]
Also highlight 'conflict' with the warning face

* lisp/vc/vc-git.el (vc-git-dir-printer):
Also highlight 'conflict' with the warning face, like
vc-default-dir-printer does already.

3 years ago; Use American spelling in etc/NEWS.
Basil L. Contovounesios [Sat, 30 Jan 2021 13:26:29 +0000 (13:26 +0000)]
; Use American spelling in etc/NEWS.

3 years agoauth-source-search doc string fix
Lars Ingebrigtsen [Sat, 30 Jan 2021 10:10:26 +0000 (11:10 +0100)]
auth-source-search doc string fix

* lisp/auth-source.el (auth-source-search): Fix example (bug#36286).

3 years ago* lisp/tab-line.el (tab-line-new-tab): Use tty menus when supported.
Jared Finder [Tue, 8 Dec 2020 06:44:32 +0000 (22:44 -0800)]
* lisp/tab-line.el (tab-line-new-tab): Use tty menus when supported.

3 years agoNew Rmail option 'rmail-show-message-set-modified'
Eli Zaretskii [Sat, 30 Jan 2021 09:26:07 +0000 (11:26 +0200)]
New Rmail option 'rmail-show-message-set-modified'

* lisp/mail/rmail.el (rmail-show-message-set-modified): New
option.
(rmail-show-message-1): If 'rmail-show-message-set-modified' is
non-nil, don't reset the buffer's modified state.  (Bug#45941)

* etc/NEWS: Announce the new option.

3 years agoFix vc-hg-rename-file on file names like ~/foo/bar
Lars Ingebrigtsen [Sat, 30 Jan 2021 07:59:48 +0000 (08:59 +0100)]
Fix vc-hg-rename-file on file names like ~/foo/bar

* lisp/vc/vc-hg.el (vc-hg-rename-file): Use absolute file names,
because hg doesn't like getting file names like "~/foo/bar"
(bug#36932).

3 years agoFix interaction between two dired cleanup variables
Jeff Spencer [Sat, 30 Jan 2021 07:12:57 +0000 (08:12 +0100)]
Fix interaction between two dired cleanup variables

* lisp/dired.el (dired-clean-up-after-deletion): Kill the buffers
if you have `dired-clean-up-buffers-too' set and
`dired-clean-confirm-killing-deleted-buffers' nil (bug#38037).

Copyright-paperwork-exempt: yes

3 years agoImprove :foreground description in the manual
Lars Ingebrigtsen [Sat, 30 Jan 2021 06:59:30 +0000 (07:59 +0100)]
Improve :foreground description in the manual

* doc/lispref/frames.texi (Font and Color Parameters): Make the
description less confusing (bug#38710).

3 years agoAdd source to sgml-empty-tags
Mauro Aranda [Sat, 30 Jan 2021 06:47:34 +0000 (07:47 +0100)]
Add source to sgml-empty-tags

* lisp/textmodes/sgml-mode.el (html-mode): Add "source" as an empty
tag to fix indentation when this element is present (bug#46181).

3 years agormail-summary-mark-deleted optional argument fix
Lars Ingebrigtsen [Fri, 29 Jan 2021 07:34:43 +0000 (08:34 +0100)]
rmail-summary-mark-deleted optional argument fix

* lisp/mail/rmailsum.el (rmail-summary-mark-deleted): Argument N
is optional, so don't assume that it's a number (bug#39076).

3 years agovc-dir-mode-map: Remove the mouse-2 binding
Dmitry Gutov [Sat, 30 Jan 2021 01:56:27 +0000 (03:56 +0200)]
vc-dir-mode-map: Remove the mouse-2 binding

* lisp/vc/vc-dir.el (vc-dir-mode-map):
Remove the mouse-2 binding (bug#13692).
(vc-dir-mode): Update the docstring accordingly.
(vc-dir-status-mouse-map): New variable.
(vc-default-dir-printer): Use it on the state buttons.

* lisp/vc/vc-git.el (vc-git-dir-printer): Same.

3 years agoUse lexical-binding in mpuz.el
Stefan Kangas [Fri, 29 Jan 2021 23:32:20 +0000 (00:32 +0100)]
Use lexical-binding in mpuz.el

* lisp/play/mpuz.el: Use lexical-binding.  Remove redundant :group
args.
(mpuz-switch-to-window): Minor cleanup.

3 years agoUse lexical-binding in handwrite.el
Stefan Kangas [Fri, 29 Jan 2021 23:10:10 +0000 (00:10 +0100)]
Use lexical-binding in handwrite.el

* lisp/play/handwrite.el: Use lexical-binding.  Remove redundant
:group args.  Minor cleanups.

(handwrite): Minor cleanups.
(handwrite-set-pagenumber-off, handwrite-set-pagenumber-on): Make
comments into docstrings.

3 years ago* test/lisp/electric-tests.el: Fix switch to lexical-binding.
Stefan Monnier [Fri, 29 Jan 2021 21:49:12 +0000 (16:49 -0500)]
* test/lisp/electric-tests.el: Fix switch to lexical-binding.

(define-electric-pair-test): Don't presume that function values are
self-evaluating.

3 years ago; * src/process.c (child_signal_read): Don't report EAGAIN as error
Mattias Engdegård [Fri, 29 Jan 2021 20:15:33 +0000 (21:15 +0100)]
; * src/process.c (child_signal_read): Don't report EAGAIN as error

3 years ago; Silence byte-compiler
Stefan Kangas [Fri, 29 Jan 2021 20:06:02 +0000 (21:06 +0100)]
; Silence byte-compiler

* lisp/net/sasl-ntlm.el (sasl-ntlm-request):
* lisp/net/sasl.el (sasl-plain-response, sasl-login-response-1)
(sasl-login-response-2, sasl-anonymous-response): Fix warnings
introduced by my previous commit.

3 years agoUse lexical-binding in sasl.el and add tests
Stefan Kangas [Fri, 29 Jan 2021 19:11:38 +0000 (20:11 +0100)]
Use lexical-binding in sasl.el and add tests

* lisp/net/sasl.el:
* lisp/net/sasl-digest.el:
* lisp/net/sasl-cram.el:
* lisp/net/sasl-ntlm.el: Use lexical-binding.

* test/lisp/net/sasl-tests.el:
* test/lisp/net/sasl-cram-tests.el: New files.

3 years ago(xref-revert-buffer): Also 'erase-buffer' when handling a user-error
Dmitry Gutov [Fri, 29 Jan 2021 13:53:28 +0000 (15:53 +0200)]
(xref-revert-buffer): Also 'erase-buffer' when handling a user-error

* lisp/progmodes/xref.el (xref-revert-buffer):
Also 'erase-buffer' when handling a user-error (bug#46042).

3 years agoSupport 'operating-system-release' on MS-Windows
Eli Zaretskii [Fri, 29 Jan 2021 11:52:31 +0000 (13:52 +0200)]
Support 'operating-system-release' on MS-Windows

* src/w32fns.c (w32_version_string) [WINDOWSNT]: New function.
* src/w32common.h (w32_version_string) [WINDOWSNT]: Add prototype.
* src/editfns.c (init_editfns) [WINDOWSNT]: Produce a non-nil
string with the OS version.

3 years ago* test/lisp/net/tramp-tests.el (tramp--test-special-characters):
Michael Albinus [Fri, 29 Jan 2021 11:25:36 +0000 (12:25 +0100)]
* test/lisp/net/tramp-tests.el (tramp--test-special-characters):

Adapt test for docker.

3 years agoUse save-mark-and-excursion in query-replace-read-args (bug#45617)
Juri Linkov [Fri, 29 Jan 2021 08:55:16 +0000 (10:55 +0200)]
Use save-mark-and-excursion in query-replace-read-args (bug#45617)

3 years agoFix Bug#45518 in compile.el
Michael Albinus [Fri, 29 Jan 2021 08:44:31 +0000 (09:44 +0100)]
Fix Bug#45518 in compile.el

* lisp/progmodes/compile.el (compilation-get-file-structure):
Avoid call of `file-truename' for remote files.  (Bug#45518)

3 years agoImprove doc string of 'operating-system-release'
Eli Zaretskii [Fri, 29 Jan 2021 07:45:13 +0000 (09:45 +0200)]
Improve doc string of 'operating-system-release'

* src/editfns.c (syms_of_editfns) <operating-system-release>: Doc
fix.  (Bug#39940)

3 years agoFix previous commit regarding revert-buffer-function
Sean Whitton [Fri, 29 Jan 2021 07:18:52 +0000 (08:18 +0100)]
Fix previous commit regarding revert-buffer-function

* simple.el (shell-command, shell-command-on-region): Set
revert-buffer-function buffer-locally, not globally.  Also, avoid an
unnecessary call to (current-buffer) by taking advantage of the
closure (bug#46151).

3 years agoDescribe pointer shapes in the manual
Lars Ingebrigtsen [Fri, 29 Jan 2021 07:16:04 +0000 (08:16 +0100)]
Describe pointer shapes in the manual

* doc/lispref/frames.texi (Pointer Shape): Describe what the
typical pointer shapes are (and add `nhdrag') (bug#39246).

3 years agoAdd a command for redisplay during keyboard macros
Marco Wahl [Fri, 29 Jan 2021 07:01:12 +0000 (08:01 +0100)]
Add a command for redisplay during keyboard macros

* doc/emacs/kmacro.texi (Basic Keyboard Macro): Document it
(bug#39252).

* lisp/kmacro.el (kdb-macro-redisplay): New function.
(kmacro-keymap): Bind it.

3 years agoImprove fontifying of #| ... |# in `lisp-mode'
Lars Ingebrigtsen [Fri, 29 Jan 2021 06:40:06 +0000 (07:40 +0100)]
Improve fontifying of #| ... |# in `lisp-mode'

* lisp/emacs-lisp/lisp-mode.el (lisp-mode): Fontify the end
delimiter in #| ... |# correctly (bug#39820).

3 years agooperating-system-release doc string improvement
Lars Ingebrigtsen [Fri, 29 Jan 2021 06:22:14 +0000 (07:22 +0100)]
operating-system-release doc string improvement

* src/editfns.c (syms_of_editfns): Be more precise about what
`operating-system-release' is (bug#39940).

3 years agoflymake-diagnostic-beg/end doc string and error reporting improvement
Lars Ingebrigtsen [Fri, 29 Jan 2021 06:15:35 +0000 (07:15 +0100)]
flymake-diagnostic-beg/end doc string and error reporting improvement

* lisp/progmodes/flymake.el (flymake-diagnostic-beg):
(flymake-diagnostic-end): Improve doc string and error reporting
(bug#39971).

3 years agoFix position in empty buffers in checkdoc-file-comments-engine
Lars Ingebrigtsen [Fri, 29 Jan 2021 06:04:43 +0000 (07:04 +0100)]
Fix position in empty buffers in checkdoc-file-comments-engine

* lisp/emacs-lisp/checkdoc.el (checkdoc-file-comments-engine):
Don't give invalid positions on empty buffers (bug#39987).

3 years agoSet revert-buffer-function in shell command output buffers
Sean Whitton [Fri, 29 Jan 2021 05:50:38 +0000 (06:50 +0100)]
Set revert-buffer-function in shell command output buffers

* simple.el (shell-command, shell-command-on-region): Set
revert-buffer-function in shell command output buffers (bug#46151).

3 years agoMention using buffer-list-update-hook in recentf-mode
Lars Ingebrigtsen [Fri, 29 Jan 2021 05:46:14 +0000 (06:46 +0100)]
Mention using buffer-list-update-hook in recentf-mode

* lisp/recentf.el (recentf-mode): Mention using
`buffer-list-update-hook' (bug#46153).

3 years agoRemove Emacs 21 compat code from sasl.el
Stefan Kangas [Fri, 29 Jan 2021 03:43:57 +0000 (04:43 +0100)]
Remove Emacs 21 compat code from sasl.el

* lisp/net/sasl.el (sasl-read-passphrase): Remove compat code;
'read-passwd' is preloaded since Emacs 22.

3 years ago* lisp/flow-ctrl.el: Use lexical-binding.
Stefan Kangas [Fri, 29 Jan 2021 01:55:34 +0000 (02:55 +0100)]
* lisp/flow-ctrl.el: Use lexical-binding.

* lisp/flow-ctrl.el (enable-flow-control): Minor cleanup.

3 years agoUse lexical-binding in find-cmd.el and add tests
Stefan Kangas [Fri, 29 Jan 2021 01:47:38 +0000 (02:47 +0100)]
Use lexical-binding in find-cmd.el and add tests

* lisp/find-cmd.el: Use lexical-binding.
* test/lisp/find-cmd-tests.el: New file.

3 years agoSlight gravatar.el code clean up
Lars Ingebrigtsen [Fri, 29 Jan 2021 04:52:51 +0000 (05:52 +0100)]
Slight gravatar.el code clean up

* lisp/image/gravatar.el (gravatar--service-libravatar): Clean the
code up slightly.

3 years agoMerge branch 'master' of git+ssh://git.sv.gnu.org/srv/git/emacs into trunk
Stefan Monnier [Thu, 28 Jan 2021 23:10:29 +0000 (18:10 -0500)]
Merge branch 'master' of git+ssh://git.sv.gnu.org/srv/git/emacs into trunk

3 years agoUse lexical-binding in nroff-mode.el
Stefan Kangas [Thu, 28 Jan 2021 21:06:35 +0000 (22:06 +0100)]
Use lexical-binding in nroff-mode.el

* lisp/textmodes/nroff-mode.el: Use lexical-binding.  Remove
redundant :group args.

3 years ago* lisp/progmodes/bat-mode.el: Use lexical-binding.
Stefan Kangas [Thu, 28 Jan 2021 20:45:26 +0000 (21:45 +0100)]
* lisp/progmodes/bat-mode.el: Use lexical-binding.

3 years ago; Fix my previous commit
Stefan Kangas [Thu, 28 Jan 2021 20:55:31 +0000 (21:55 +0100)]
; Fix my previous commit

* lisp/generic-x.el (generic-mode-ini-file-find-file-hook): Fix my
previous commit; for some reason 'function' produces a warning here
while 'quote' does not.

3 years agoUse lexical-binding in generic-x.el
Stefan Kangas [Thu, 28 Jan 2021 20:35:34 +0000 (21:35 +0100)]
Use lexical-binding in generic-x.el

* lisp/generic-x.el: Use lexical-binding.  Remove redundant :groups.
(generic-rul-mode-setup-function): Prefer setq-local.

3 years agoDefine compat alias obsolete
Stefan Kangas [Thu, 28 Jan 2021 20:28:03 +0000 (21:28 +0100)]
Define compat alias obsolete

* lisp/generic-x.el (generic-mode-ini-file-find-file-hook): Define
compat alias introduced after rename in 22.1 obsolete.

3 years agoUse lexical-binding in all of `lisp/emacs-lisp`
Stefan Monnier [Thu, 28 Jan 2021 19:42:21 +0000 (14:42 -0500)]
Use lexical-binding in all of `lisp/emacs-lisp`

* lisp/emacs-lisp/bindat.el: Use lexical-binding.
(bindat--unpack-group, bindat--length-group, bindat--pack-group):
Declare `last` and `tag` as dyn-scoped.
(bindat-unpack, bindat-pack): Bind `bindat-raw` and `bindat-idx` via
`let` rather than via the formal arglist.

* lisp/emacs-lisp/package-x.el:
* lisp/emacs-lisp/generic.el:
* lisp/emacs-lisp/eieio-opt.el:
* lisp/emacs-lisp/derived.el:
* lisp/emacs-lisp/crm.el: Use lexical-binding.

* lisp/emacs-lisp/helper.el: Use lexical-binding.
(Helper-help-map): Move initialization into declaration.

* lisp/emacs-lisp/regi.el: Use lexical-binding.
(regi-interpret): Remove unused var `tstart`.
Declare `curframe`, `curentry` and `curline` as dyn-scoped.

* lisp/emacs-lisp/shadow.el: Use lexical-binding.
(load-path-shadows-find): Remove unused var `file`.
Tighten a regexp, use `push`.

* lisp/emacs-lisp/tcover-ses.el: Use lexical-binding.  Require `ses`.
Remove correspondingly redundant declarations.
(ses--curcell-overlay): Declare.
(ses-exercise): Use `dlet` and use a properly-prefixed var name.
Fix name of `curcell-overlay` variable.

* lisp/emacs-lisp/unsafep.el: Use lexical-binding.
(unsafep): Bind `unsafep-vars` via `let` rather than via the formal arglist.

3 years agoUse isearch-tmm-menubar when tmm-menubar is called in isearch-mode (bug#43966)
Juri Linkov [Thu, 28 Jan 2021 19:27:26 +0000 (21:27 +0200)]
Use isearch-tmm-menubar when tmm-menubar is called in isearch-mode (bug#43966)

* lisp/isearch.el (isearch-menu-bar-commands): Add tmm-menubar to defaults.
(isearch-mode-map): Remove remapping of tmm-menubar to isearch-tmm-menubar.

* lisp/tmm.el (tmm-menubar): Call isearch-tmm-menubar in isearch-mode.

3 years ago* lisp/wdired.el: Minor doc fixes.
Stefan Kangas [Thu, 28 Jan 2021 18:21:41 +0000 (19:21 +0100)]
* lisp/wdired.el: Minor doc fixes.

3 years agoAvoid recommending Google
Stefan Kangas [Thu, 28 Jan 2021 18:06:18 +0000 (19:06 +0100)]
Avoid recommending Google

* doc/misc/org.texi (Link Abbreviations):
* lisp/net/webjump.el (webjump-sample-sites):
* lisp/org/ol.el (org-link-shell-confirm-function)
(org-link-elisp-confirm-function):
* lisp/org/org.el (org-highlight-links):
* lisp/wdired.el: Avoid recommending Google.

squash! Avoid recommending Google

3 years ago* lisp/leim/quail/viqr.el: Use lexical-binding.
Stefan Kangas [Thu, 28 Jan 2021 17:49:29 +0000 (18:49 +0100)]
* lisp/leim/quail/viqr.el: Use lexical-binding.

3 years ago* lisp/leim/quail/compose.el: Use lexical-binding.
Stefan Kangas [Thu, 28 Jan 2021 17:49:17 +0000 (18:49 +0100)]
* lisp/leim/quail/compose.el: Use lexical-binding.

3 years ago* lisp/ezimage.el: Use lexical-binding.
Stefan Kangas [Thu, 28 Jan 2021 17:35:45 +0000 (18:35 +0100)]
* lisp/ezimage.el: Use lexical-binding.

3 years ago* src/fns.c (hash_string): Fix bug#46111
Stefan Monnier [Thu, 28 Jan 2021 17:27:09 +0000 (12:27 -0500)]
* src/fns.c (hash_string): Fix bug#46111

Use `memcpy` instead of an unaligned memory access.  On x86 at least,
GCC turns this `memcpy` into a single `mov`, so it's about as fast.

3 years agoAdd cross-reference to with-eval-after-load
Stefan Kangas [Thu, 28 Jan 2021 17:16:49 +0000 (18:16 +0100)]
Add cross-reference to with-eval-after-load

* lisp/subr.el (eval-after-load): Doc fix; add cross-reference to
'with-eval-after-load'.

3 years ago* lisp/generic-x.el (hosts-generic-mode): Support IPv6 addresses.
Stefan Kangas [Thu, 28 Jan 2021 16:05:06 +0000 (17:05 +0100)]
* lisp/generic-x.el (hosts-generic-mode): Support IPv6 addresses.

3 years agoAdd missing file systems to etc-fstab-generic-mode
Stefan Kangas [Thu, 28 Jan 2021 14:08:51 +0000 (15:08 +0100)]
Add missing file systems to etc-fstab-generic-mode

* lisp/generic-x.el (etc-fstab-generic-mode): Add entries for missing
file systems.

3 years ago; * lisp/dired-aux.el (dired-compress-files-alist): Minor doc fix.
Stefan Kangas [Sat, 23 Jan 2021 23:53:38 +0000 (00:53 +0100)]
; * lisp/dired-aux.el (dired-compress-files-alist): Minor doc fix.

3 years ago* test/Makefile.in (emacs): Use the C locale
Stefan Monnier [Thu, 28 Jan 2021 17:13:29 +0000 (12:13 -0500)]
* test/Makefile.in (emacs): Use the C locale

This fixes spurious test failures in my environment for
`diff-mode-test-font-lock-syntax-one-line` (where my `diff` otherwise
returns "No newline at end of file" in French) and for
various tests in `emacs-module-tests` because errors signal
"Abandon" instead of "Abort".

3 years ago* lisp/net/ange-ftp.el (ange-ftp-ls): Handle several "--dired" switches.
Michael Albinus [Thu, 28 Jan 2021 14:09:29 +0000 (15:09 +0100)]
* lisp/net/ange-ftp.el (ange-ftp-ls): Handle several "--dired" switches.

3 years agoSimplify auto-revert buffer list by watch descriptor (Bug#44639)
Michael Albinus [Thu, 28 Jan 2021 14:09:18 +0000 (15:09 +0100)]
Simplify auto-revert buffer list by watch descriptor  (Bug#44639)

* lisp/autorevert.el (auto-revert--buffer-by-watch-descriptor):
Rename from `auto-revert--buffers-by-watch-descriptor'.  Make it
an assoc list.
(auto-revert-notify-rm-watch, auto-revert-notify-add-watch)
(auto-revert-notify-handler): Adapt accordingly.  Based on a
patch provided by Spencer Baugh <sbaugh@catern.com>.  (Bug#44639)

3 years agoUse lexical-binding in lisp/{term,nxml,language}
Stefan Monnier [Thu, 28 Jan 2021 13:43:01 +0000 (08:43 -0500)]
Use lexical-binding in lisp/{term,nxml,language}

* test/lisp/electric-tests.el:
* lisp/term/w32console.el:
* lisp/nxml/rng-util.el:
* leim/leim-ext.el: Use lexical-binding.

* lisp/international/titdic-cnv.el (tit-process-header)
(miscdic-convert):
* lisp/international/mule-cmds.el (leim-list-header):
* lisp/international/ja-dic-cnv.el (skkdic-convert):
Use lexical-binding in the generated file.

3 years agoProtect against bad results from libravatar
Lars Ingebrigtsen [Thu, 28 Jan 2021 12:10:45 +0000 (13:10 +0100)]
Protect against bad results from libravatar

* lisp/image/gravatar.el (gravatar--service-libravatar): Don't
have (gravatar-retrieve "foobar@zjp.codes" 'ignore) (which returns
a CNAME) bug out.

3 years agoFix numerical `comment-padding' value
Lars Ingebrigtsen [Thu, 28 Jan 2021 08:57:48 +0000 (09:57 +0100)]
Fix numerical `comment-padding' value

* lisp/newcomment.el (comment-padright): Allow using a number for
`comment-padding', like the doc string says (bug#40056).

3 years agoMake the default `whitespace-enable-predicate' use `derived-mode-p'
Lars Ingebrigtsen [Thu, 28 Jan 2021 07:40:15 +0000 (08:40 +0100)]
Make the default `whitespace-enable-predicate' use `derived-mode-p'

* lisp/whitespace.el (whitespace-enable-predicate): Use
`derived-mode-p' to check modes instead of `eq' (bug#40481).

3 years agoFix fill-paragraph in asm-mode
Mattias M [Thu, 28 Jan 2021 06:34:10 +0000 (07:34 +0100)]
Fix fill-paragraph in asm-mode

* lisp/progmodes/asm-mode.el: The value of fill-prefix ought to be nil
not "\t" so that fill-context-prefix can do its thing. In fact,
fill-prefix does not have to be set at all becuase asm-mode derives
from prog-mode and fill-prefix is set in simple.el.

* test/lisp/progmodes/asm-mode-tests.el: Add relevant test (bug#41064).

Copyright-paperwork-exempt: yes

3 years agoAllow commenting out white space lines in latex-mode
Lars Ingebrigtsen [Thu, 28 Jan 2021 06:09:18 +0000 (07:09 +0100)]
Allow commenting out white space lines in latex-mode

* lisp/newcomment.el (comment-region-default-1): Allow commenting
out whitespace-only regions (bug#41793).

* lisp/textmodes/tex-mode.el (latex--comment-region): Use it.
(latex-mode): Set a comment style shim.

3 years agoFix Gnus icalendar button navigation
Lars Ingebrigtsen [Thu, 28 Jan 2021 05:21:40 +0000 (06:21 +0100)]
Fix Gnus icalendar button navigation

* lisp/gnus/gnus-icalendar.el (gnus-icalendar-insert-button): Mark
buttons correctly for TAB navigation (bug#46135).

3 years agoperl-mode.el: Eliminate keywords which are not in Perl.
Harald Jörg [Thu, 28 Jan 2021 03:22:21 +0000 (04:22 +0100)]
perl-mode.el: Eliminate keywords which are not in Perl.

* lisp/progmodes/perl-mode.el (perl-imenu-generic-expression):
Remove keywords which are not part of Perl.
(perl-font-lock-keywords-2): Remove keywords which are not part of
Perl (bug#46024).  (These keywords are part of Raku; aka. Perl 6.)

3 years agoAllow project/xref packages to be used in Emacs 26.1
João Távora [Thu, 28 Jan 2021 03:18:12 +0000 (04:18 +0100)]
Allow project/xref packages to be used in Emacs 26.1

* lisp/progmodes/project.el: Change Package-Requires to Emacs 26.1
(bug#44671).

* lisp/progmodes/xref.el: Ditto.

3 years ago* lisp/emacs-lisp/macroexp.el (macroexp-if): Fix typo
Stefan Monnier [Wed, 27 Jan 2021 23:53:58 +0000 (18:53 -0500)]
* lisp/emacs-lisp/macroexp.el (macroexp-if): Fix typo

3 years ago* lisp/emacs-lisp/pcase.el (pcase--split-pred): Handle `memq` pred.
Stefan Monnier [Wed, 27 Jan 2021 23:51:09 +0000 (18:51 -0500)]
* lisp/emacs-lisp/pcase.el (pcase--split-pred): Handle `memq` pred.

Improve handling of the `member` tests generated from (or 'a 'b 'c).
This will expand

    (pcase EXP ((and (or 1 2 3) (guard (FOO))) EXP1) (1 EXP2) (6 EXP3))

to

    (cond ((memql '(3 2 1) EXP)
           (cond ((FOO) EXP1) ((eql EXP 1) EXP2)))
          ((eql EXP 6) EXP3))

rather than to

    (cond ((memql '(3 2 1) EXP)
           (cond ((FOO) EXP1) ((eql EXP 1) EXP2) ((eql EXP 6) EXP3)))
          ((eql EXP 1) EXP2)
          ((eql EXP 6) EXP3))

3 years ago* lisp/emacs-lisp/macroexp.el (macroexp--expand-all): Perform β-reduction
Stefan Monnier [Wed, 27 Jan 2021 22:35:28 +0000 (17:35 -0500)]
* lisp/emacs-lisp/macroexp.el (macroexp--expand-all): Perform β-reduction

Also, in `funcall` macroexpand the function before checking to see if
we can remove the `funcall`.

(macroexp-if): Trim trailing `nil` in the generated code while we're at it.

3 years ago* lisp/replace.el (query-replace-read-from-suggestions): New function.
Juri Linkov [Wed, 27 Jan 2021 18:33:13 +0000 (20:33 +0200)]
* lisp/replace.el (query-replace-read-from-suggestions): New function.

(query-replace-read-from): Use it instead of hard-coded '(car search-ring)'.
(read-regexp-suggestions): Add the active region (bug#41692).

3 years ago* admin/notes/unicode: titdic-cnv.el is now utf-8.
Paul Eggert [Wed, 27 Jan 2021 18:10:44 +0000 (10:10 -0800)]
* admin/notes/unicode: titdic-cnv.el is now utf-8.

3 years agoSupport multi-line prompt and contents in previous-line-or-history-element.
Juri Linkov [Wed, 27 Jan 2021 18:08:43 +0000 (20:08 +0200)]
Support multi-line prompt and contents in previous-line-or-history-element.

* lisp/simple.el (previous-line-or-history-element): Move to the
beginning of minibuffer contents if there is editable minibuffer contents
on the same line after moving point to the prompt (bug#46033).
Fix minimal old-column from 0 to 1 to put point at the beginning of
minibuffer contents after going to the previous history element.

3 years ago* lisp/international/titdic-cnv.el (tsang-quick-converter): Simplify
Stefan Monnier [Wed, 27 Jan 2021 17:35:19 +0000 (12:35 -0500)]
* lisp/international/titdic-cnv.el (tsang-quick-converter): Simplify

Merge branches which only differed in the `charset` property of the
strings they intended to return, since that info gets lost later
on anyway.

3 years ago* lisp/international/titdic-cnv.el: Revert to utf-8 encoding
Stefan Monnier [Wed, 27 Jan 2021 17:25:52 +0000 (12:25 -0500)]
* lisp/international/titdic-cnv.el: Revert to utf-8 encoding

While it's true that using the iso-2022-jp encoding on the file does
allow Emacs to render the two strings differently, this only applies to
the source file.  The .elc files all use `utf-8-emacs` encoding anyway,
so that info is lost.  And the difference is even lost before we write
the .elc file because when Emacs byte-compiles that code the
byte-compiler considers those two strings as "equal" and emits only one
string in the byte-code (so the two branches return `eq` strings).

So, I think using `iso-2022-jp` is a bad idea here: it gives the
illusion that the the `charset` info exists, even it will be lost.
Eli discussed it with Handa-san a year ago, and they arrived at the
conclusion that the charset information is indeed no longer important.

3 years agoUse lexical-binding in of all lisp/language
Stefan Monnier [Wed, 27 Jan 2021 02:11:49 +0000 (21:11 -0500)]
Use lexical-binding in of all lisp/language

* lisp/international/titdic-cnv.el (pinyin-convert):
Enable lexical-binding in the generated file(s).

* lisp/language/ethio-util.el: Use lexical-binding.
(ethio-tex-to-fidel-buffer): Use `inhibit-read-only`.  Remove unused
vars `p` and `ch`.

* lisp/language/hanja-util.el: Use lexical-binding.

* lisp/language/ind-util.el: Use lexical-binding.
(indian-translate-region): Actually use the `from` and `to` arguments.
(<toplevel>): Use `dlet`.  Remove unused var `current-repertory`.
(indian-2-column-to-ucs-region): Remove unused var `pos`.

* lisp/language/japan-util.el: Use lexical-binding.
(japanese-katakana-region, japanese-hiragana-region)
(japanese-zenkaku-region): Remove unused var `next`.

* lisp/language/korea-util.el: Use lexical-binding.

* lisp/language/lao-util.el: Use lexical-binding.
(lao-composition-function): Remove unused var `glyph`.

* lisp/language/thai-util.el: Use lexical-binding.
(thai-composition-function): Remove unused var `glyph`.

* lisp/language/thai-word.el: Use lexical-binding.
(thai-forward-word): Remove unused var `tail`.

* lisp/language/tibet-util.el: Use lexical-binding.
(tibetan-add-components): Remove unused var `tmp`.
(tibetan-compose-region): Remove unused vars `str`, `result`, `chars`.

* lisp/language/viet-util.el:
* lisp/language/tv-util.el:
* lisp/language/cyril-util.el:
* lisp/language/china-util.el: Use lexical-binding.

3 years ago; Merge from origin/emacs-27
Glenn Morris [Wed, 27 Jan 2021 15:55:11 +0000 (07:55 -0800)]
; Merge from origin/emacs-27

The following commits were skipped:

e79e377a4e (origin/emacs-27) Improve documentation of 'read-regexp' a...
0340e9eccb read-regexp-suggestions doc string improvement
932aba674c Try to improve the read-regexp doc string
809503431d ; xref-revert-buffer: Drop the (goto-char) at the end
0399cc2ab5 Erase the buffer only after fetching the new contents

3 years agoMerge from origin/emacs-27
Glenn Morris [Wed, 27 Jan 2021 15:55:11 +0000 (07:55 -0800)]
Merge from origin/emacs-27

3443a1c698 Fix last change

3 years ago; Merge from origin/emacs-27
Glenn Morris [Wed, 27 Jan 2021 15:55:11 +0000 (07:55 -0800)]
; Merge from origin/emacs-27

The following commit was skipped:

c8fa056a50 Mention undo-amalgamate-change-group in the lispref manual

3 years agoMerge from origin/emacs-27
Glenn Morris [Wed, 27 Jan 2021 15:55:11 +0000 (07:55 -0800)]
Merge from origin/emacs-27

3f610177ad Avoid sending systemd shutdown notifications if non-daemon
009df5cb3c * src/cmds.c (Fforward_line): Doc fix.  (Bug#46027)
ee1c54ebc0 Improve documentation of sendmail.el defcustom's

3 years ago; Merge from origin/emacs-27
Glenn Morris [Wed, 27 Jan 2021 15:55:11 +0000 (07:55 -0800)]
; Merge from origin/emacs-27

The following commit was skipped:

82c228a017 Don't let `maybe_quit` prevent resetting `consing_until_gc...

3 years agoMerge from origin/emacs-27
Glenn Morris [Wed, 27 Jan 2021 15:55:11 +0000 (07:55 -0800)]
Merge from origin/emacs-27

b58fd1eab9 ; * lisp/language/cham.el: Fix copy-paste mistake in comment.

3 years agoFix display of stretches of whitespace in the display margins
Eli Zaretskii [Wed, 27 Jan 2021 15:52:51 +0000 (17:52 +0200)]
Fix display of stretches of whitespace in the display margins

* src/xdisp.c (produce_stretch_glyph): Truncate the stretch glyph
due to line wrap only when drawing in the text area.
* src/xterm.c (x_draw_stretch_glyph_string):
* src/w32term.c (w32_draw_stretch_glyph_string): Fix the
adjustment of the stretch X and width so that stretch glyphs could
be drawn in the left margin.  Reported by Paul W. Rankin
<pwr@bydasein.com>.

3 years agoSome Tramp fixes
Michael Albinus [Wed, 27 Jan 2021 15:30:49 +0000 (16:30 +0100)]
Some Tramp fixes

* doc/misc/tramp.texi (GVFS-based methods): Ban sftp RemoteCommand
option.

* lisp/net/tramp-adb.el (tramp-adb-handle-copy-file)
(tramp-adb-handle-rename-file): Avoid calling jka-compr when
writing the target file.

* lisp/net/tramp-sh.el (tramp-sh-handle-file-ownership-preserved-p):
Skip GROUP test on *BSD machines.

* test/lisp/net/tramp-tests.el (tramp-test17-insert-directory-one-file):
Skip for tamp-crypt.el.
(tramp--test-sh-no-ls--dired-p): Ignore errors.

3 years ago* lisp/net/dbus.el (dbus-monitor-handler): Disable buffer undo.
Michael Albinus [Wed, 27 Jan 2021 15:30:08 +0000 (16:30 +0100)]
* lisp/net/dbus.el (dbus-monitor-handler): Disable buffer undo.

3 years agoImprove documentation of 'read-regexp' and friends
Eli Zaretskii [Wed, 27 Jan 2021 15:15:46 +0000 (17:15 +0200)]
Improve documentation of 'read-regexp' and friends

* doc/emacs/glossary.texi (Glossary): Add "Tag" to the Glossary.
* doc/emacs/maintaining.texi (Xref): Mention that identifiers are
also known as "tags".

* lisp/replace.el (read-regexp, read-regexp-suggestions): Improve
wording of doc strings.  (Bug#46088)  (Bug#46089)

(cherry picked from commit 49eb03d6c8a181fd46adbbcf1f0a976d0a9efa87)

3 years agoread-regexp-suggestions doc string improvement
Lars Ingebrigtsen [Wed, 27 Jan 2021 02:47:02 +0000 (03:47 +0100)]
read-regexp-suggestions doc string improvement

* lisp/replace.el (read-regexp-suggestions): Add a link to the
manual to explain what a tag is (bug#46089).

(cherry picked from commit f9cc2d48246fe8370e9286866e6115ba8e2acf44)

3 years agoTry to improve the read-regexp doc string
Lars Ingebrigtsen [Wed, 27 Jan 2021 02:38:49 +0000 (03:38 +0100)]
Try to improve the read-regexp doc string

* lisp/replace.el (read-regexp): Attempt to clarify the semantics
(bug#46088).

(cherry picked from commit eded2a7ad7d456a417354a2797c18e9a578414d7)