]> git.eshelyaron.com Git - emacs.git/log
emacs.git
3 years ago* lisp/emacs-lisp/cconv.el (cconv--analyze-use): Warn never-initialized vars
Stefan Monnier [Thu, 11 Mar 2021 18:01:59 +0000 (13:01 -0500)]
* lisp/emacs-lisp/cconv.el (cconv--analyze-use): Warn never-initialized vars

(byte-compile-not-lexical-var-p): Remove Emacs<24 compatibility.

3 years agoRe-fix previous Info-fontify-node change
Lars Ingebrigtsen [Thu, 11 Mar 2021 16:50:02 +0000 (17:50 +0100)]
Re-fix previous Info-fontify-node change

* lisp/info.el (Info-fontify-node): Re-fix previous fix here
(bug#34661) by fixing an off-by-one error in the `looking-back'.

3 years agoAdd remote processes to Tramp sshfs method
Michael Albinus [Thu, 11 Mar 2021 16:16:50 +0000 (17:16 +0100)]
Add remote processes to Tramp sshfs method

* doc/misc/tramp.texi (FUSE setup): Method sshfs supports also
remote processes.

* lisp/net/tramp-cache.el (tramp-get-file-property)
(tramp-set-file-property): Move setting of
`tramp-cache-unload-hook' out of function.

* lisp/net/tramp.el (tramp-expand-args): New defun.
(tramp-handle-make-process):
* lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band)
(tramp-maybe-open-connection):
* lisp/net/tramp-sshfs.el (tramp-sshfs-maybe-open-connection):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-send-command): Use it.

* lisp/net/tramp-sshfs.el (tramp-methods) <sshfs>:
Adapt `tramp-mount-args'.  Add `tramp-login-args',
`tramp-direct-async', `tramp-remote-shell',
`tramp-remote-shell-login' and `tramp-remote-shell-args'.
(tramp-connection-properties): Set "direct-async-process" fir sshfs.
(tramp-sshfs-file-name-handler-alist): Add `exec-path',
`make-process', `process-file', `set-file-modes', `shell-command',
`start-file-process', `tramp-get-remote-gid',
`tramp-get-remote-uid' and `tramp-set-file-uid-gid'.
(tramp-sshfs-handle-exec-path, tramp-sshfs-handle-process-file)
(tramp-sshfs-handle-set-file-modes): New defuns.

* test/lisp/net/tramp-tests.el (tramp-test20-file-modes)
(tramp-test28-process-file, tramp-test29-start-file-process)
(tramp-test30-make-process, tramp-test32-shell-command)
(tramp-test32-shell-command-dont-erase-buffer)
(tramp-test34-explicit-shell-file-name, tramp-test35-exec-path)
(tramp-test43-asynchronous-requests): Run also for tramp-sshfs.
(tramp--test-shell-file-name): New defun.
(tramp-test28-process-file)
(tramp-test34-explicit-shell-file-name)
(tramp-test43-asynchronous-requests): Use it.
(tramp-test40-special-characters-with-stat)
(tramp-test40-special-characters-with-perl)
(tramp-test40-special-characters-with-ls)
(tramp-test41-utf8-with-stat, tramp-test41-utf8-with-perl)
(tramp-test41-utf8-with-ls): Remove superfluous skip.

3 years agoMake tags tables from Texinfo sources
Petteri Hintsanen [Sun, 7 Mar 2021 22:25:53 +0000 (00:25 +0200)]
Make tags tables from Texinfo sources

* doc/misc/Makefile.in (ETAGS, texifiles): New variables.
(TAGS, tags, FORCE, ${ETAGS}): New targets.
(bootstrap-clean maintainer-clean): Delete TAGS.
* doc/lispref/Makefile.in (ETAGS, texifiles): New variables.
(TAGS, tags, FORCE, ${ETAGS}): New targets.
(bootstrap-clean maintainer-clean): Delete TAGS.
* doc/lispintro/Makefile.in (ETAGS, texifiles): New variables.
(TAGS, tags, FORCE, ${ETAGS}): New targets.
(bootstrap-clean maintainer-clean): Delete TAGS.
* doc/emacs/Makefile.in (ETAGS, texifiles): New variables.
(TAGS, tags, FORCE, ${ETAGS}): New targets.
(bootstrap-clean maintainer-clean): Delete TAGS.
* Makefile.in (TAGS tags): Make tags in doc/emacs, doc/lispintro,
doc/lispref and doc/misc.

3 years ago* src/image.c (image_set_transform): Don't use ! for Lisp object.
Philipp Stephani [Thu, 11 Mar 2021 10:05:32 +0000 (11:05 +0100)]
* src/image.c (image_set_transform): Don't use ! for Lisp object.

3 years ago* src/image.c (FRAME_SCALE_FACTOR): Define only when needed.
Philipp Stephani [Thu, 11 Mar 2021 10:04:57 +0000 (11:04 +0100)]
* src/image.c (FRAME_SCALE_FACTOR): Define only when needed.

3 years agoFix wording of a recently added documentation
Eli Zaretskii [Thu, 11 Mar 2021 06:37:29 +0000 (08:37 +0200)]
Fix wording of a recently added documentation

* etc/NEWS:
* doc/lispref/display.texi (Image Descriptors): Fix wording of the
description of :transform-smoothing.

3 years ago* lisp/gnus/nnmh.el (nnmh-newsgroup-articles): Declare var
Stefan Monnier [Thu, 11 Mar 2021 06:14:30 +0000 (01:14 -0500)]
* lisp/gnus/nnmh.el (nnmh-newsgroup-articles): Declare var

Reported by Barry Fishman <barry@ecubist.org>.

Along the way, I checked other variables which are similarly let-bound
to nil and then read with any intervening assignment, which found
another similar case of missing `defvar`s plus a bit of dead code.

* lisp/gnus/gnus-kill.el (gnus-apply-kill-file-internal):
Remove constant nil var `beg`.
* lisp/gnus/gnus-search.el (gnus-search-query-parse-kv):
Remove constant nil var `return`.
* lisp/gnus/gnus-start.el (gnus-ask-server-for-new-groups):
Remove constant nil var `group`.
(gnus-killed-assoc, gnus-marked-assoc, gnus-newsrc-assoc): Declare vars.
* lisp/gnus/gnus-sum.el (gnus-compute-read-articles):
Remove constant nil var `first`.
* lisp/gnus/nnbabyl.el (nnbabyl-request-accept-article):
Remove constant nil var `beg`.
* lisp/gnus/nnfolder.el (nnfolder-possibly-change-group):
Remove constant nil var `inf`.
* lisp/gnus/nnrss.el (nnrss-request-article):
Remove constant nil var `err`.

3 years ago; Fix US spelling in last change.
Basil L. Contovounesios [Wed, 10 Mar 2021 23:28:28 +0000 (23:28 +0000)]
; Fix US spelling in last change.

3 years agoEnable selectable image smoothing (bug#38394)
Alan Third [Tue, 9 Mar 2021 18:05:10 +0000 (18:05 +0000)]
Enable selectable image smoothing (bug#38394)

* lisp/doc-view.el (doc-view-insert-image): Always use smoothing in
docview.
* lisp/image-mode.el (image-transform-smoothing): New variable.
(image-mode-map): Add smoothing binding.
(image-transform-properties): Apply smoothing when requested.
(image-transform-set-smoothing): New function.
(image-transform-reset): Reset smoothing.
* src/image.c (image_set_transform): Use new :transform-smoothing
attribute.
(syms_of_image): Add :transform-smoothing attribute.
* doc/lispref/display.texi (Image Descriptors): Document new
:transform-smoothing property.

3 years ago* lisp/tab-bar.el (tab-bar-close-group-tabs): New command.
Juri Linkov [Wed, 10 Mar 2021 18:09:23 +0000 (20:09 +0200)]
* lisp/tab-bar.el (tab-bar-close-group-tabs): New command.

(tab-close-group): New alias.
(tab-bar-close-other-tabs): Rewrite to fix old bug where regardless of
the returned value from tab-bar-tab-prevent-close-functions,
only one tab was retained.

3 years ago* lisp/tab-bar.el: 'C-x t G' (tab-group) assigns a group name to the tab.
Juri Linkov [Wed, 10 Mar 2021 17:57:48 +0000 (19:57 +0200)]
* lisp/tab-bar.el: 'C-x t G' (tab-group) assigns a group name to the tab.

* lisp/tab-bar.el (tab-bar--tab, tab-bar--current-tab): Add tab group if any.
(tab-bar-change-tab-group): New command.
(display-buffer-in-new-tab): Handle tab-group alist entry.
(tab-group): New alias.
(tab-prefix-map): Bind "G" to 'tab-group'.

3 years agoHighlight the entire summary line for selected articles
Kévin Le Gouguec [Wed, 10 Mar 2021 15:15:01 +0000 (16:15 +0100)]
Highlight the entire summary line for selected articles

* lisp/gnus/gnus-sum.el (gnus-highlight-selected-summary):
Highlight the entire summary line (bug#47026).

3 years agoRemove Emacs 19 workaround from cperl-mode.el
Stefan Kangas [Wed, 10 Mar 2021 14:52:07 +0000 (15:52 +0100)]
Remove Emacs 19 workaround from cperl-mode.el

* lisp/progmodes/cperl-mode.el (cperl-make-indent): Remove Emacs 19
workaround.

3 years agoFix byte-compilation warning in benchmark-run
Lars Ingebrigtsen [Wed, 10 Mar 2021 14:52:36 +0000 (15:52 +0100)]
Fix byte-compilation warning in benchmark-run

* lisp/emacs-lisp/benchmark.el (benchmark-run): Avoid a
byte-compilation warning about an empty let body (bug#46819).

3 years ago* lisp/files.el (cd): Improve error message.
Stefan Kangas [Wed, 10 Mar 2021 14:10:24 +0000 (15:10 +0100)]
* lisp/files.el (cd): Improve error message.

3 years agoMark string predicates side-effect-free
Mattias Engdegård [Wed, 10 Mar 2021 13:08:41 +0000 (14:08 +0100)]
Mark string predicates side-effect-free

* lisp/emacs-lisp/byte-opt.el (side-effect-free-fns): Add string>,
string-greaterp, string-empty-p, string-prefix-p, string-suffix-p
and string-blank-p, all recently marked pure.

3 years agoRemove several references to Emacs 22 and earlier
Stefan Kangas [Wed, 10 Mar 2021 04:45:47 +0000 (05:45 +0100)]
Remove several references to Emacs 22 and earlier

* admin/charsets/mapfiles/README:
* doc/emacs/custom.texi (Saving Customizations):
* doc/lispintro/emacs-lisp-intro.texi (Simple Extension):
* doc/misc/efaq-w32.texi (Location of init file):
* doc/misc/gnus-faq.texi (FAQ 1-3):
* doc/misc/gnus.texi (Top, Various, Image Enhancements):
* lisp/erc/erc-menu.el (menu):
* lisp/progmodes/cfengine.el (cfengine-fill-paragraph):
Remove some references to Emacs 22 and earlier.

* doc/lispref/buffers.texi:
* doc/lispref/eval.texi:
* doc/lispref/files.texi:
* doc/lispref/keymaps.texi:
* doc/lispref/loading.texi:
* doc/lispref/minibuf.texi:
* doc/lispref/positions.texi:
* doc/lispref/variables.texi: Remove comments about "Emacs 19
specific" features.

3 years agoFix duplicate ":" in ert-find-test-other-window prompt
Stefan Kangas [Wed, 10 Mar 2021 03:34:53 +0000 (04:34 +0100)]
Fix duplicate ":" in ert-find-test-other-window prompt

* lisp/emacs-lisp/ert.el (ert-find-test-other-window): Don't insert
duplicate ":" in prompt.

3 years agoDo mode tagging in ert.el
Stefan Kangas [Wed, 10 Mar 2021 03:34:01 +0000 (04:34 +0100)]
Do mode tagging in ert.el

3 years agoUse proper command substitutions in some docstrings
Stefan Kangas [Mon, 8 Mar 2021 11:50:22 +0000 (12:50 +0100)]
Use proper command substitutions in some docstrings

* lisp/arc-mode.el (archive-mode):
* lisp/ibuffer.el (ibuffer):
* lisp/tar-mode.el (tar-mode):
* lisp/textmodes/table.el (table-insert): Use substitute-command-keys
instead of hardcoded keys in some docstrings.

3 years ago* lisp/userlock.el: Use lexical-binding.
Stefan Kangas [Wed, 10 Mar 2021 03:07:48 +0000 (04:07 +0100)]
* lisp/userlock.el: Use lexical-binding.

3 years agoUse 'help-key-binding' face in userlock.el
Stefan Kangas [Wed, 10 Mar 2021 02:29:50 +0000 (03:29 +0100)]
Use 'help-key-binding' face in userlock.el

* lisp/userlock.el (userlock--fontify-key): New function.
(ask-user-about-lock, ask-user-about-lock-help,
(ask-user-about-supersession-threat)
(ask-user-about-supersession-help): Add face 'help-key-binding' to
displayed keys.

3 years ago(project-switch-commands): Remove the ###autoload instruction
Dmitry Gutov [Wed, 10 Mar 2021 01:08:29 +0000 (03:08 +0200)]
(project-switch-commands): Remove the ###autoload instruction

* lisp/progmodes/project.el (project-switch-commands):
Remove the ###autoload instruction.  It's unnecessary and can
cause surprises in some circumstances (bug#46986).

3 years ago* lisp/help.el (help--describe-translation): Fix typo.
Stefan Kangas [Wed, 10 Mar 2021 00:20:58 +0000 (01:20 +0100)]
* lisp/help.el (help--describe-translation): Fix typo.

3 years ago* lisp/mail/rmailmm.el: Use `cl-defstruct` and `lexical-binding`
Stefan Monnier [Tue, 9 Mar 2021 21:17:31 +0000 (16:17 -0500)]
* lisp/mail/rmailmm.el: Use `cl-defstruct` and `lexical-binding`

Remove redundant `:group` args.
(rmail-mime-entity): Make it a `cl-defstruct`.
(rmail-mime-entity-set-truncated): Mark as obsolete.
(rmail-mime-display): New `cl-defstruct`.
(rmail-mime-shown-mode, rmail-mime-hidden-mode, rmail-mime-raw-mode)
(rmail-mime-toggle-hidden, rmail-mime-update-tagline)
(rmail-mime-text-handler, rmail-mime-bulk-handler)
(rmail-mime-process-multipart, rmail-mime-handle, rmail-mime-process)
(rmail-mime-parse, rmail-mime-insert, rmail-show-mime): Adjust accordingly.
(rmail-mime-toggle-raw): Apply de Morgan.
(rmail-mime-insert-text): Remove unused var `tagline`.
(rmail-mime-insert-image): Remove unused var `content-type`.
(shr-inhibit-images, shr-width): Declare vars.
(rmail-mime-insert-multipart): Remove unused vars `tagline` and `body`.
(rmail-mime-insert): Remove unused var `tagline`.
(rmail-search-mime-message): Remove unused var `body-end`.

3 years agoPort alternate signal stack to upcoming glibc 2.34
Paul Eggert [Tue, 9 Mar 2021 19:22:59 +0000 (11:22 -0800)]
Port alternate signal stack to upcoming glibc 2.34

* src/sysdep.c (sigsegv_stack): Increase size to 64 KiB and align
it to max_align_t.  This copies from Gnulib’s c-stack.c, and works
around a portability bug in draft glibc 2.34, which no longer
defines SIGSTKSZ when _GNU_SOURCE is defined.

3 years ago* src/buffer.c (Fbuffer_swap_text): Swap `mark-active` as well
Stefan Monnier [Tue, 9 Mar 2021 18:04:14 +0000 (13:04 -0500)]
* src/buffer.c (Fbuffer_swap_text): Swap `mark-active` as well

This avoids undesirable situations where `mark-active` is set even
though the `mark` isn't.

3 years ago* lisp/tab-bar.el (tab-bar-select-tab): Set window-state-put WINDOW arg to nil
Juri Linkov [Tue, 9 Mar 2021 17:27:31 +0000 (19:27 +0200)]
* lisp/tab-bar.el (tab-bar-select-tab): Set window-state-put WINDOW arg to nil

WINDOW arg nil will always create a new window regardless of the value
returned by 'frame-root-window' that is nondeterministic - it returns
an internal window when there are more than 1 window on the frame/tab,
otherwise it returns a live window that was reused between different tabs
(bug#46904)
(tab-prefix-map): Bind "u" to 'tab-undo'.

3 years ago* lisp/emacs-lisp/cconv.el: Don't confuse a string for a docstring
Stefan Monnier [Tue, 9 Mar 2021 16:04:03 +0000 (11:04 -0500)]
* lisp/emacs-lisp/cconv.el: Don't confuse a string for a docstring

(cconv--convert-funcbody): Check there's something after a docstring.

* test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-string-vs-docstring):
New corresponding test.

3 years agosmerge-vc-next-conflict: Move to conflict markers more reliably
Konstantin Kharlamov [Tue, 9 Mar 2021 02:47:49 +0000 (04:47 +0200)]
smerge-vc-next-conflict: Move to conflict markers more reliably

* lisp/vc/smerge-mode.el (smerge-vc-next-conflict): Search for a
conflict marker if call to (vc-find-conflicted-file) haven't resulted in
a jump to one.  And remove `buffer` variable that becomes unused.

3 years agoStrip text properties from the default string
Dmitry Gutov [Tue, 9 Mar 2021 02:06:01 +0000 (04:06 +0200)]
Strip text properties from the default string

* lisp/progmodes/project.el (project--read-regexp):
Strip text properties from the default string (bug#47012).

3 years agoMake semantic/idle not move point after last change
Lars Ingebrigtsen [Mon, 8 Mar 2021 19:37:31 +0000 (20:37 +0100)]
Make semantic/idle not move point after last change

* lisp/cedet/semantic/idle.el (semantic--eldoc-info): Don't move
point (bug#46999).

3 years ago; NEWS fix
Glenn Morris [Mon, 8 Mar 2021 17:50:43 +0000 (09:50 -0800)]
; NEWS fix

3 years ago* lisp/progmodes/xref.el (xref-after-update-hook): New defcustom (bug#46992).
Juri Linkov [Mon, 8 Mar 2021 17:48:28 +0000 (19:48 +0200)]
* lisp/progmodes/xref.el (xref-after-update-hook): New defcustom (bug#46992).

(xref--insert-xrefs): Use run-hooks on it.

3 years ago* lisp/faces.el (help-argument-name): Use grey background, not foreground
Juri Linkov [Mon, 8 Mar 2021 17:42:44 +0000 (19:42 +0200)]
* lisp/faces.el (help-argument-name): Use grey background, not foreground

https://lists.gnu.org/archive/html/emacs-devel/2021-03/msg00402.html

3 years ago* lisp/net/*.el: Use lexical-binding
Stefan Monnier [Mon, 8 Mar 2021 15:11:22 +0000 (10:11 -0500)]
* lisp/net/*.el: Use lexical-binding

Also remove some redundant `:group` arguments.

* lisp/net/eudc-export.el: Use lexical-binding.
(eudc-create-bbdb-record): Use `cl-progv` and `apply` to avoid `eval`.

* lisp/net/eudc-hotlist.el: Use lexical-binding.

* lisp/net/eudc.el (eudc-print-attribute-value): Use `funcall` to avoid
`eval`.

* lisp/net/eudcb-bbdb.el: Use lexical-binding.
(eudc-bbdb-filter-non-matching-record): Use `funcall` to avoid `eval`.
Move `bbdb-val` binding to avoid `setq`.
Use `seq-some` instead of `eval+or`.
(eudc-bbdb-format-record-as-result): Use `dolist` and `pcase`.
Use `funcall` to avoid `eval`.
(eudc-bbdb-query-internal): Simplify a bit.

* lisp/net/eudcb-ldap.el: Use lexical-binding.
(eudc-ldap-get-host-parameter): Use `defalias` to avoid `eval-and-compile`.

* lisp/net/telnet.el: Use lexical-binding.
* lisp/net/quickurl.el: Use lexical-binding.
* lisp/net/newst-ticker.el: Use lexical-binding.
* lisp/net/newst-reader.el: Use lexical-binding.
* lisp/net/goto-addr.el: Use lexical-binding.
* lisp/net/gnutls.el: Use lexical-binding.
* lisp/net/eudcb-macos-contacts.el: Use lexical-binding.
* lisp/net/eudcb-mab.el: Use lexical-binding.

* lisp/net/net-utils.el: Use lexical-binding.
(finger): Remove unused var `found`.

* lisp/net/network-stream.el (open-protocol-stream): Remove redundant
`defalias`.

* lisp/net/newst-plainview.el: Use lexical-binding.
(newsticker-hide-entry, newsticker-show-entry): Remove unused var
`is-invisible`.
(w3m-fill-column, w3-maximum-line-length): Declare vars.

* lisp/net/tramp.el (tramp-compute-multi-hops):
* lisp/net/tramp-compat.el (tramp-compat-temporary-file-directory):
* lisp/net/tramp-cmds.el (tramp-default-rename-file):
* lisp/net/webjump.el (webjump): Don't forget lexical-binding for `eval`.

3 years agoFix handling of `tramp-cache-{g,s}et-count-*'
Michael Albinus [Mon, 8 Mar 2021 14:44:38 +0000 (15:44 +0100)]
Fix handling of `tramp-cache-{g,s}et-count-*'

* lisp/net/tramp-cache.el (tramp-get-file-property)
(tramp-set-file-property): Fix handling of `tramp-cache-{g,s}et-count-*'.

3 years agoFix structure of condition object in nested 'ert-fail'.
Philipp Stephani [Mon, 8 Mar 2021 13:30:24 +0000 (14:30 +0100)]
Fix structure of condition object in nested 'ert-fail'.

See the test 'ert-test-fail' for the expected structure.

* lisp/emacs-lisp/ert.el (ert--should-signal-hook): Condition list
should be (SYMBOL . DATA), not (SYMBOL DATA).
* test/lisp/emacs-lisp/ert-tests.el (ert-test-fail-inside-should): Fix
unit test.

3 years agoUse `pop-to-buffer-same-window' in `project-eshell'
Simen Heggestøyl [Mon, 8 Mar 2021 11:38:41 +0000 (12:38 +0100)]
Use `pop-to-buffer-same-window' in `project-eshell'

* lisp/progmodes/project.el (project-eshell): Use
`pop-to-buffer-same-window' instead of `pop-to-buffer' to match the
behavior of `M-x eshell'.

3 years agoMake checkdoc--next-docstring use the doc-string-elt property
Mauro Aranda [Mon, 8 Mar 2021 11:11:38 +0000 (08:11 -0300)]
Make checkdoc--next-docstring use the doc-string-elt property

This follows from a fix for Bug#46918 and a discussion to use
doc-string-elt:
https://lists.gnu.org/archive/html/emacs-devel/2021-03/msg00232.html

* lisp/emacs-lisp/checkdoc.el (checkdoc--next-docstring): Check for a
non-nil doc-string-elt property, instead of hard-coding the
supported symbols.  Use that property to position point at the
doc-string.

3 years agoAdd Tramp sshfs method
Michael Albinus [Mon, 8 Mar 2021 11:05:29 +0000 (12:05 +0100)]
Add Tramp sshfs method

* doc/misc/tramp.texi (Top, Configuration): Insert sections 'FUSE-based
methods' and 'FUSE setup' in menu.
(Quick Start Guide): Fix @anchors.  Add doas.  Extend section
'Using @command{rclone}' to 'Using @acronym{FUSE}-based methods'.
(External methods): Remove rclone paragraph.
(FUSE-based methods, FUSE setup): New nodes.
(Predefined connection information): Mention "mount-point".

* etc/NEWS: Mention Tramp sshfs method.
Fix typos and other oddities.

* lisp/net/tramp-fuse.el: New file.

* lisp/net/tramp-rclone.el (tramp-fuse): Require.
(tramp-rclone-file-name-handler-alist): Replace `tramp-rclone-handle-*'
by `tramp-fuse-handle-*' where appropriate.
(tramp-rclone-handle-delete-directory)
(tramp-rclone-handle-delete-file)
(tramp-rclone-handle-directory-files)
(tramp-rclone-handle-file-attributes)
(tramp-rclone-handle-file-executable-p)
(tramp-rclone-handle-file-name-all-completions)
(tramp-rclone-handle-file-readable-p)
(tramp-rclone-handle-insert-directory)
(tramp-rclone-handle-insert-file-contents)
(tramp-rclone-handle-make-directory, tramp-rclone-mount-point)
(tramp-rclone-mounted-p, tramp-rclone-local-file-name):
Remove.  Functionality moved to tramp-fuse.el.
(tramp-rclone-remote-file-name)
(tramp-rclone-maybe-open-connection): Use `tramp-fuse-*' functions.

* lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band):
Simplify check.

* lisp/net/tramp-sshfs.el: New file.

* lisp/net/tramp.el: Remove TODO item.

* test/lisp/net/tramp-tests.el (tramp--test-sshfs-p): New defun.
(tramp-test14-delete-directory): Use it.

3 years agoDelete two more items obsoleted in Emacs 23.1
Stefan Kangas [Mon, 8 Mar 2021 04:25:18 +0000 (05:25 +0100)]
Delete two more items obsoleted in Emacs 23.1

* lisp/calendar/icalendar.el
(icalendar--datetime-to-noneuropean-date): Remove alias obsolete since
* lisp/obsolete/nnir.el (nnir-swish-e-index-file):
Delete items obsolete since Emacs 23.1.

; * etc/NEWS: List removed items.

3 years agoNormalize version specifiers for make-obsolete and friends
Stefan Kangas [Mon, 8 Mar 2021 04:09:27 +0000 (05:09 +0100)]
Normalize version specifiers for make-obsolete and friends

* lisp/auth-source.el (auth-source-forget-user-or-password)
(auth-source-user-or-password, auth-source-hide-passwords):
* lisp/calendar/icalendar.el (icalendar--datetime-to-noneuropean-date):
* lisp/cedet/semantic/db-el.el (semanticdb-elisp-sym-function-arglist):
* lisp/emacs-lisp/debug.el (debugger-insert-backtrace):
* lisp/obsolete/nnir.el (nnir-swish-e-index-file):
* lisp/obsolete/starttls.el (starttls-any-program-available):
Normalize version specifiers for make-obsolete and friends.

3 years ago* lisp/help-mode.el (help-mode-tool-bar-map): Fix tooltips.
Stefan Kangas [Mon, 8 Mar 2021 03:23:11 +0000 (04:23 +0100)]
* lisp/help-mode.el (help-mode-tool-bar-map): Fix tooltips.

3 years agoAdd new face 'help-key-binding' for keybindings in help
Stefan Kangas [Mon, 8 Mar 2021 02:29:42 +0000 (03:29 +0100)]
Add new face 'help-key-binding' for keybindings in help

* lisp/faces.el (help-key-binding): New face.
* lisp/help.el
(help-for-help): Rename from 'help-for-help-internal'.  Use
'substitute-command-keys' syntax.
(help): Make into alias for 'help-for-help'.
(help-for-help-internal): Make into obsolete alias for
'help-for-help'.
(help--key-description-fontified): New function to add the
'help-key-binding' face.
(help-key-description, substitute-command-keys)
(describe-map-tree, help--describe-command)
(help--describe-translation, describe-map):
* lisp/help-fns.el (help-fns--key-bindings, describe-mode):
Use above new function.
* lisp/isearch.el (isearch-help-for-help-internal): Use
`substitute-command-keys' syntax.
* lisp/help-macro.el (make-help-screen): Use
'substitute-command-keys' and 'help--key-description-fontified'.
Simplify.
* src/keymap.c (describe_key_maybe_fontify): New function to add
the 'help-key-binding' face to keybindings.
(describe_vector): Use above new keybinding.
(syms_of_keymap) <Qfont_lock_face, Qhelp_key_binding>: New
DEFSYMs.
(fontify_key_properties): New static variable.
* lisp/tooltip.el (tooltip-show): Avoid overriding faces in
specified tooltip text.
* test/lisp/help-tests.el (with-substitute-command-keys-test):
Don't test for text properties.
(help-tests-substitute-command-keys/add-key-face)
(help-tests-substitute-command-keys/add-key-face-listing):
New tests.

3 years agoSpeed up xref rendering for matches on very long lines
Dmitry Gutov [Mon, 8 Mar 2021 02:25:15 +0000 (04:25 +0200)]
Speed up xref rendering for matches on very long lines

* lisp/progmodes/xref.el (xref--insert-xrefs): Cut up the current
line into pieces here for multiple matches's summaries, so that
xref--insert-xrefs can do less work (bug#46859).
(xref--insert-xrefs): Do less work.
(xref--outdated-p):
Update accordingly to how the summary creation logic changed.
(xref--buf-pairs-iterator): Update to the new calling convention.
(xref-location-column): Effectively rename back to
xref-file-location-column since the generic version is now unused.

* 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):
Adjust to the xref-location-column change.
(xref-matches-in-files-trims-summary-for-matches-on-same-line):
New test.

* test/lisp/progmodes/xref-resources/file1.txt:
Change contents slightly to test the new xref--outdated-p code.

3 years agoXref test improvements
Dmitry Gutov [Mon, 8 Mar 2021 00:44:24 +0000 (02:44 +0200)]
Xref test improvements

* test/lisp/progmodes/xref-tests.el
(xref--xref-file-name-display-is-abs):
Fix not to rely on the default value.
(xref-matches-in-files-includes-matches-from-all-the-files):
New test.

3 years ago* lisp/net/tramp-cache.el: Fix misuse of bound-and-true-p
Stefan Monnier [Mon, 8 Mar 2021 00:07:27 +0000 (19:07 -0500)]
* lisp/net/tramp-cache.el: Fix misuse of bound-and-true-p

(tramp-get-file-property, tramp-set-file-property): Check the var's
value rather than its name.

3 years ago* lisp/net/ange-ftp.el: Fix problem pointed out by compiler warning
Stefan Monnier [Mon, 8 Mar 2021 00:06:45 +0000 (19:06 -0500)]
* lisp/net/ange-ftp.el: Fix problem pointed out by compiler warning

(ange-ftp-fix-name-for-bs2000): Remove redundant `boundp` test.

3 years ago* lisp/erc/erc.el: Fix problem pointed out by compiler warning
Stefan Monnier [Mon, 8 Mar 2021 00:06:06 +0000 (19:06 -0500)]
* lisp/erc/erc.el: Fix problem pointed out by compiler warning

[ Also use `read-string` instead of `read-from-minibuffer`.  ]

(erc-part-from-channel): Comment out improbable
reference to the formal argument from within the interactive spec.

3 years ago* lisp/cedet/semantic/fw.el (semantic-find-file-noselect): Fix warning
Stefan Monnier [Mon, 8 Mar 2021 00:05:02 +0000 (19:05 -0500)]
* lisp/cedet/semantic/fw.el (semantic-find-file-noselect): Fix warning

Remove ugly hack trying to warn the user about some unknown problem,
and which stopped working in 2013 when files.el started using
lexical-binding.

3 years ago* lisp/skeleton.el (skeleton-read): Silence compiler warning
Stefan Monnier [Mon, 8 Mar 2021 00:04:18 +0000 (19:04 -0500)]
* lisp/skeleton.el (skeleton-read): Silence compiler warning

3 years ago* lisp/cedet/semantic/bovine.el: Fix recent regression
Stefan Monnier [Mon, 8 Mar 2021 00:03:36 +0000 (19:03 -0500)]
* lisp/cedet/semantic/bovine.el: Fix recent regression

The conversion to `lexical-binding` introduced a regression because
`bovine/c.el` relied on inspecting the local variable `lse` in one of
its callers.

(semantic-bovinate-stream): Bind `lse` dynamically, because of
`semantic-parse-region-c-mode`.
(semantic-bovinate-nonterminal-check-map): Rename from
`semantic-bovinate-nonterminal-check-obarray` to hold some other kind
of table.
(semantic-bovinate-nonterminal-check): Use a hash-table instead of an obarray.

* lisp/cedet/semantic/bovine/c.el (semantic-parse-region-c-mode):
Declare use of `lse` via dynamic scoping.

* test/lisp/cedet/semantic-utest-c.el
(semantic-test-c-preprocessor-simulation): Re-enable test.

3 years ago* lisp/emacs-lisp/bytecomp.el: Warn about unprefixed vars in `boundp`
Stefan Monnier [Mon, 8 Mar 2021 00:00:47 +0000 (19:00 -0500)]
* lisp/emacs-lisp/bytecomp.el: Warn about unprefixed vars in `boundp`

(byte-compile--check-prefixed-var): New fun,
extracted from `byte-compile--declare-var`.
(byte-compile--declare-var): Use it.
(byte-compile-maybe-guarded): Use it as well.

3 years agoRemove outline-cycle-minor-mode and outline-cycle-highlight-minor-mode
Juri Linkov [Sun, 7 Mar 2021 18:52:39 +0000 (20:52 +0200)]
Remove outline-cycle-minor-mode and outline-cycle-highlight-minor-mode

* lisp/outline.el (outline-font-lock-keywords): Use OVERRIDE or
LAXMATCH depending on outline-minor-mode-highlight in outline-minor-mode.
(outline-minor-mode-cycle, outline-minor-mode-highlight): Promote
defvar to defcustom.
(outline-minor-mode-highlight-buffer): Don't override existing faces.
(outline-cycle-minor-mode, outline-cycle-highlight-minor-mode):
Remove minor modes.

* etc/compilation.txt:
* etc/grep.txt: Enable outline-minor-mode-cycle and
outline-minor-mode-highlight with outline-minor-mode.
https://lists.gnu.org/archive/html/emacs-devel/2021-03/msg00144.html

3 years ago* test/infra/Dockerfile.emba: Install texinfo.
Michael Albinus [Sun, 7 Mar 2021 17:55:44 +0000 (18:55 +0100)]
* test/infra/Dockerfile.emba: Install texinfo.

3 years agoTag a semantic test that seems to hang recently
Glenn Morris [Sun, 7 Mar 2021 17:27:27 +0000 (09:27 -0800)]
Tag a semantic test that seems to hang recently

* test/lisp/cedet/semantic-utest-c.el
(semantic-test-c-preprocessor-simulation): Mark as unstable.

3 years agoFix string-replace error data
Basil L. Contovounesios [Sun, 7 Mar 2021 14:55:15 +0000 (14:55 +0000)]
Fix string-replace error data

* lisp/subr.el (string-replace): Signal an error with data that is a
list, and whose contents are consistent with other uses of
wrong-length-argument.
* test/lisp/subr-tests.el (string-replace): Test for this.
(subr-test-define-prefix-command): Pacify byte-compiler warnings.

3 years ago; * test/infra/Dockerfile.emba: Fix last change.
Michael Albinus [Sun, 7 Mar 2021 10:43:27 +0000 (11:43 +0100)]
; * test/infra/Dockerfile.emba: Fix last change.

3 years ago* test/infra/Dockerfile.emba: Touch "info/emacs".
Michael Albinus [Sun, 7 Mar 2021 10:36:38 +0000 (11:36 +0100)]
* test/infra/Dockerfile.emba: Touch "info/emacs".

3 years agoAdapt Dockerfile.emba according to recent configure changes
Michael Albinus [Sun, 7 Mar 2021 09:44:12 +0000 (10:44 +0100)]
Adapt Dockerfile.emba according to recent configure changes

* test/infra/Dockerfile.emba: Remove "--without-makeinfo" from
configure.  Add "lisp" to make.

3 years ago* lisp/cedet/semantic/wisent: Use lexical-binding
Stefan Monnier [Sun, 7 Mar 2021 06:58:16 +0000 (01:58 -0500)]
* lisp/cedet/semantic/wisent: Use lexical-binding

* lisp/cedet/semantic/wisent/comp.el: lexical-binding.
(wisent-defcontext): Make sure the vars are also dynbound in the files
that `require` us.
(wisent-state-actions, wisent-automaton-lisp-form): Use `obarray-make`.
(wisent--compile-grammar): Rename from `wisent-compile-grammar`.
(wisent-compile-grammar): Redefine as an obsolete function.
(wisent-automaton-lisp-form): Avoid variable `state`.

* lisp/cedet/semantic/grammar.el: Use lexical-binding.
(semantic-grammar-require-form): New var.
(semantic-grammar-header): Use it to provide new element `require-form`.
(semantic-grammar-header-template): Use it.

* lisp/cedet/semantic/wisent.el (wisent-compiled-grammar): New macro.

* lisp/cedet/semantic/wisent/grammar.el (wisent-grammar-parsetable-builder):
Use it in the generated code instead of the `wisent-compile-grammar` function.
(wisent-grammar-mode): Set `semantic-grammar-require-form` so
the generated ELisp files require `semantic/wisent` rather than
`semantic/bovine`.

* lisp/cedet/semantic/wisent/wisent.el: Use lexical-binding.
* lisp/cedet/semantic/wisent/java-tags.el: Use lexical-binding.
* lisp/cedet/semantic/wisent/python.el: Use lexical-binding.
* lisp/cedet/semantic/wisent/javascript.el: Use lexical-binding.
(semantic-ctxt-current-symbol): Remove unused var `symlist`.

* admin/grammars/python.wy (wisent-python-EXPANDING-block):
Declare dynbound var.

* lisp/cedet/semantic/grammar-wy.el: Regenerate.

3 years agoRemove additional items obsolete since Emacs 22/23
Stefan Kangas [Sun, 7 Mar 2021 05:26:53 +0000 (06:26 +0100)]
Remove additional items obsolete since Emacs 22/23

* lisp/speedbar.el (speedbar-update-speed)
(speedbar-navigating-speed): Remove variables obsolete since Emacs 23.
(speedbar-dir-follow, speedbar-directory-buttons-follow): Don't use
above removed variables.

* lisp/erc/erc.el (erc-announced-server-name, erc-process)
(erc-default-coding-system, erc-send-command): Remove variables and
functions obsolete since Emacs 22.

; * etc/NEWS: List removed items.

3 years agoRemove some items obsolete since Emacs 22/23 from Gnus
Stefan Kangas [Sun, 7 Mar 2021 04:36:11 +0000 (05:36 +0100)]
Remove some items obsolete since Emacs 22/23 from Gnus

* lisp/gnus/gnus-art.el (gnus-article-hide-pgp-hook)
(gnus-treat-strip-pgp, gnus-treat-display-xface):
* lisp/gnus/gnus-msg.el (gnus-inews-mark-gcc-as-read):
* lisp/gnus/gnus-start.el (nnmail-spool-file):
* lisp/gnus/nnmail.el (nnmail-spool-file)
(nnmail-fix-eudora-headers): Remove items obsolete since 22.1.
* lisp/gnus/gnus-art.el (gnus-treat-display-x-face):
* lisp/gnus/gnus-msg.el (gnus-inews-do-gcc): Don't use above obsolete symbols.
* doc/misc/gnus.texi (Washing Mail, Not Reading Mail): Don't refer to
above obsolete variables.
; * etc/NEWS: List removed items.

* lisp/gnus/gnus.el (gnus-local-domain, gnus-carpal):
* lisp/gnus/nnimap.el (nnimap-split-rule):
* lisp/gnus/nntp.el (nntp-authinfo-file): Fix obsolete variable
version format.

3 years agoRemove some references to Emacs 21
Stefan Kangas [Sun, 7 Mar 2021 04:09:21 +0000 (05:09 +0100)]
Remove some references to Emacs 21

* lisp/erc/erc-track.el (erc-track-position-in-mode-line):
* lisp/erc/erc.el (erc-header-line-format):
* lisp/ibuffer.el (ibuffer-mode):
* lisp/ruler-mode.el: Remove some references to Emacs 21.

3 years ago* lisp/mouse-drag.el: Use lexical-binding.
Stefan Kangas [Sun, 7 Mar 2021 04:01:42 +0000 (05:01 +0100)]
* lisp/mouse-drag.el: Use lexical-binding.

3 years ago* lisp/mouse-copy.el: Use lexical-binding.
Stefan Kangas [Sun, 7 Mar 2021 03:33:45 +0000 (04:33 +0100)]
* lisp/mouse-copy.el: Use lexical-binding.

3 years ago* lisp/cedet/semantic/bovine/*.el: Use lexical-binding
Stefan Monnier [Sun, 7 Mar 2021 03:33:19 +0000 (22:33 -0500)]
* lisp/cedet/semantic/bovine/*.el: Use lexical-binding

* lisp/cedet/semantic/bovine/c.el: Use lexical-binding.
(semantic-lex-cpp-define): Remove unused var `name`.
(semantic-c-do-lex-if): Remove unused var `pt`.
(semantic-analyze-tag-references): Remove unused var `refs`.
(semantic-c-dereference-namespace): Remove unused vars `tmp` and
`usingname`.
(semantic-c-dereference-namespace-alias): Remove unused var `newtype`.
(semantic-c-check-type-namespace-using): Remove unused vars `tmp` and
`shortname`.
(semanticdb-find-table-for-include): Remove unused var `prefix`.
(semantic-default-c-setup, semantic-c-describe-environment):
Use `derived-mode-p`.

* lisp/cedet/semantic/bovine/debug.el: Use lexical-binding.

* lisp/cedet/semantic/bovine/make.el: Use lexical-binding.

* lisp/cedet/semantic/bovine/scm.el: Use lexical-binding.

* lisp/cedet/semantic/lex.el (define-lex-analyzer): Define the var (and
the function) in a single step.

3 years ago* lisp/obsolete/inversion.el: Use lexical-binding
Stefan Monnier [Sun, 7 Mar 2021 02:57:02 +0000 (21:57 -0500)]
* lisp/obsolete/inversion.el: Use lexical-binding

3 years ago* admin/admin.el (make-manuals-dist-output-variables): Update.
Glenn Morris [Sun, 7 Mar 2021 00:39:04 +0000 (16:39 -0800)]
* admin/admin.el (make-manuals-dist-output-variables): Update.

3 years agoSimplify silent-rules build machinery
Glenn Morris [Sun, 7 Mar 2021 00:28:46 +0000 (16:28 -0800)]
Simplify silent-rules build machinery

* src/verbose.mk.in: New file.
* configure.ac (AM_V, AM_DEFAULT_V): Remove output variables.
(src/verbose.mk): New output file.
* Makefile.in, admin/charsets/Makefile.in:
* admin/grammars/Makefile.in, admin/unidata/Makefile.in:
* doc/emacs/Makefile.in, doc/lispintro/Makefile.in:
* doc/lispref/Makefile.in, doc/misc/Makefile.in, leim/Makefile.in:
* lib-src/Makefile.in, lib/Makefile.in, lisp/Makefile.in:
* lwlib/Makefile.in, nt/Makefile.in, oldXMenu/Makefile.in:
* src/Makefile.in, src/verbose.mk.in, test/Makefile.in:
Include src/verbose.mk rather than repeatedly defining AM_V_at etc.

3 years ago* src/Makefile.in (base_obj): Remove GMP_OBJ, undefined since 202007.
Glenn Morris [Sat, 6 Mar 2021 19:37:11 +0000 (11:37 -0800)]
* src/Makefile.in (base_obj): Remove GMP_OBJ, undefined since 202007.

3 years agoDon't pass implicit flags to sub-makes
Glenn Morris [Sat, 6 Mar 2021 19:09:19 +0000 (11:09 -0800)]
Don't pass implicit flags to sub-makes

* Makefile.in (info_misc, uninstall, texi_misc):
Don't pass any implicit make flags to sub-makes.
Ref https://lists.gnu.org/r/help-make/2021-03/msg00007.html

3 years agoRemove the --without-makeinfo configure option (bug#46837)
Glenn Morris [Sat, 6 Mar 2021 18:38:07 +0000 (10:38 -0800)]
Remove the --without-makeinfo configure option (bug#46837)

* configure.ac (--without-makeinfo): Remove option.
(HAVE_MAKEINFO): Remove output variable.

* Makefile.in (HAVE_MAKEINFO): Remove.
(info_misc): Remove HAVE_MAKEINFO check.
(info-real): Remove target.
(info): Simplify.

; * etc/NEWS: Mention this.

3 years ago* lisp/cedet/srecode/compile.el: Fix last change
Stefan Monnier [Sat, 6 Mar 2021 18:31:58 +0000 (13:31 -0500)]
* lisp/cedet/srecode/compile.el: Fix last change

(srecode-compile-inserter): Call `make-instance` properly.

3 years agoSpeed up json.el encoding
Basil L. Contovounesios [Sun, 21 Feb 2021 20:10:08 +0000 (20:10 +0000)]
Speed up json.el encoding

This replaces most json-encode-* functions with similar
json--print-* counterparts that insert into the current buffer
instead of returning a string (bug#46761).

Some unused but useful json-encode-* functions are kept for backward
compatibility and as a public API, and the rest are deprecated.

* etc/NEWS: Announce obsoletions.

* lisp/json.el: Document organization of library.  Make subsection
headings more consistent.
(json--encoding-current-indentation): Rename...
(json--print-indentation-prefix): ...to this, to reflect new use.
(json--encode-stringlike, json--encode-alist): Rename...
(json--print-stringlike, json--print-alist): ...to these,
respectively, and encode argument into current buffer instead.  All
callers changed.

(json--print-string, json--print-unordered-map, json--print-array)
(json--print): New functions.
(json-encode-string, json-encode-plist, json-encode-array)
(json-encode): Use them, respectively.

(json-encode-number, json-encode-hash-table): Mark as obsolete
aliases of json-encode.
(json-encode-key, json-encode-list): Mark as obsolete in preference
for json-encode.

(json--print-indentation-depth, json--print-keyval-separator): New
variables.
(json--with-output-to-string): New macro.
(json--print-indentation, json--print-keyword, json--print-key)
(json--print-pair, json--print-map, json--print-list): New
functions.

(json--with-indentation): Use json--print-indentation-depth to avoid
unnecessary string allocation.
(json-encoding-default-indentation, json-pretty-print-max-secs):
Clarify docstrings.
(json--escape, json--long-string-threshold, json--string-buffer):
Remove; no longer used.

* lisp/progmodes/js.el (js--js-encode-value): Replace
json-encode-string and json-encode-number with json-encode.
(js-eval-defun): Use json--print-list to avoid
json-encode-list->insert roundtrip.

* test/lisp/json-tests.el (test-json-encode-number)
(test-json-encode-hash-table, test-json-encode-hash-table-pretty)
(test-json-encode-hash-table-lisp-style)
(test-json-encode-hash-table-sort,  test-json-encode-list):  Replace
uses of obsolete functions with the equivalent use of json-encode.
(test-json-encode-key): Suppress obsoletion warnings.
(test-json-encode-string): Check that text properties are stripped.

3 years ago* lisp/emacs-lisp/bindat.el (bindat-struct): Fix Edebug def
Stefan Monnier [Sat, 6 Mar 2021 18:19:46 +0000 (13:19 -0500)]
* lisp/emacs-lisp/bindat.el (bindat-struct): Fix Edebug def

3 years ago* lisp/emulation/: Use lexical-binding
Stefan Monnier [Sat, 6 Mar 2021 18:03:12 +0000 (13:03 -0500)]
* lisp/emulation/: Use lexical-binding

* lisp/emulation/cua-base.el: Use lexical-binding.
Remove redundant `:group` arguments.
(cua-mode): Don't use `:require` since the autoload on `define-minor-mode`
takes care of loading the mode when custom-setting it.

* lisp/emulation/cua-gmrk.el: Use lexical-binding.
(cua--copy-rectangle-to-global-mark): Remove unused var `src-buf`.

* lisp/emulation/edt-mapper.el: Use lexical-binding.

* lisp/emulation/edt.el: Use lexical-binding.
Remove redundant `:group` arguments.
(edt-with-position): Allow `top`, `left`, and `far` to be left unused
in `body`.

* lisp/emulation/keypad.el: Use lexical-binding.

* lisp/emulation/viper-cmd.el: Move `provide` to the end.
(viper-read-string-with-history): Strength reduce `eval` to `symbol-value`.

* lisp/emulation/viper-ex.el: Use lexical-binding.
Remove redundant `:group` arguments.
Move `provide` to the end.

* lisp/emulation/viper-init.el: Use lexical-binding.

* lisp/emulation/viper-keym.el (viper-toggle-key): Use `dolist`.
(viper-insert-diehard-map): Use `string`.
(viper-modify-major-mode): Use `alist-get` and `setf`.

* lisp/emulation/viper-macs.el (viper-ex-work-buf):
Move `provide` to the end.
(viper-record-kbd-macro): Strength reduce `eval` to `symbol-value`.
(viper-describe-kbd-macros): Return value is not significant.
(viper-keyseq-is-a-possible-macro): Use `seq-some`.
(viper-common-seq-prefix): Use `seq-every-p`.

* lisp/emulation/viper-mous.el: Use lexical-binding.
Remove redundant `:group` arguments.
Move `provide` to the end.
(viper-remember-current-frame): Accept arbitrary ignored args.
(viper-parse-mouse-key): Strength reduce `eval` to `symbol-value`.
Remove unused var `key-spec`.
(viper-bind-mouse-search-key, viper-bind-mouse-insert-key):
Apply de Morgan.

* lisp/emulation/viper-util.el: Move `provide` to the end.
(viper-move-marker-locally, viper-push-onto-ring, viper-save-setting):
Strength reduce `eval` to `symbol-value`.
(viper-event-vector-p, viper-char-symbol-sequence-p, viper-char-array-p):
Use `seq-every-p`.

* lisp/emulation/viper.el (viper-non-hook-settings): Eta-reduce use of
`viper-remember-current-frame`.

3 years agoVarious map.el improvements
Basil L. Contovounesios [Wed, 24 Feb 2021 00:53:05 +0000 (00:53 +0000)]
Various map.el improvements

* lisp/emacs-lisp/seq.el (seq-do-indexed): Return nil as per doc.

* lisp/emacs-lisp/map.el: Require Emacs >= 26 due to dependence on
5-arg alist-get.  Bump package to version 3.0.  Fix other
headers.  (Bug#46754)
(map--plist-p): Detect list starting with nil as plist, not alist.
(map-elt, map-filter, map-apply, map--make-pcase-bindings)
(map--make-pcase-patterns): Simplify.
(map-let, map-put, map-nested-elt, mapp): Update docstring for plist
support.
(map-delete): Fix OBOE on arrays.  Split into cl-defmethods.
(map-values, map-values-apply): Specialize for arrays.
(map-pairs, map-keys-apply, map-put!): Improve docstring.
(map-length): Clarify docstring w.r.t. duplicate keys.  Split into
cl-defmethods.  Optimize default implementation.
(map-copy): Use copy-alist on alists.  Split into cl-defmethods.
(map-contains-key): Add plist support.  Clarify docstring
w.r.t. optional argument.  Simplify default implementation.
(map-some, map-every-p, map-merge, map-merge-with, map--into-hash):
Don't use map-apply for side effects.
(map-into): Preserve plist ordering.  Improve docstrings.
(map-insert): Add hash-table and array support.
(map-inplace): Remove unused error symbol.
(map-do): Return nil as per doc.

* etc/NEWS: Announce new user-visible behavior.

* test/lisp/emacs-lisp/map-tests.el: Prefer should-not
over (should (not ...)) in general.
(with-maps-do): Fix docstring.
(with-empty-maps-do): New macro.
(test-map-elt-default, test-mapp, test-map-keys, test-map-values)
(test-map-pairs, test-map-length, test-map-copy, test-map-apply)
(test-map-do, test-map-keys-apply, test-map-values-apply)
(test-map-filter, test-map-remove, test-map-empty-p)
(test-map-contains-key, test-map-some, test-map-every-p):
Use it.

(test-map-plist-p, test-map-put!-new-keys, test-map-insert-empty)
(test-map-insert, test-map-delete-empty, test-map-copy-alist)
(test-map-contains-key-testfn, test-map-into-hash-test)
(test-map-into-empty, test-map-merge, test-map-merge-empty):
New tests.

(test-map-elt): Test array key that is within bounds but not fixnum.
(test-map-put!): Use map--plist-p.  Remove redundant tests.
(test-map-put-alist-new-key): Don't modify list literal.
(test-map-put-testfn-alist, test-map-put-return-value): Silence
obsoletion warnings.
(test-map-delete): Check for OBOE on arrays.
(test-map-delete-return-value): Remove test made redundant by
test-map-delete.
(test-map-nested-elt, test-map-into): Test plists too.

3 years agoCC Mode: Fix calculation of c-parse-state when there're macros with braces
Alan Mackenzie [Sat, 6 Mar 2021 15:22:25 +0000 (15:22 +0000)]
CC Mode: Fix calculation of c-parse-state when there're macros with braces

This fixes bug #46951.

* lisp/progmodes/cc-engine.el (c-append-lower-brace-pair-to-state-cache):
Ensure the starting point for backward scanning is not within a macro which
doesn't contain HERE.

3 years ago* lisp/progmodes/flymake.el (flymake-log): Push the right code
Stefan Monnier [Sat, 6 Mar 2021 14:56:43 +0000 (09:56 -0500)]
* lisp/progmodes/flymake.el (flymake-log): Push the right code

3 years ago* lisp/progmodes/flymake.el (flymake-log): Simplify
Stefan Monnier [Sat, 6 Mar 2021 14:55:30 +0000 (09:55 -0500)]
* lisp/progmodes/flymake.el (flymake-log): Simplify

3 years agoRevert "Fix Makefile subshell output when run in parallel"
Eli Zaretskii [Sat, 6 Mar 2021 14:49:00 +0000 (16:49 +0200)]
Revert "Fix Makefile subshell output when run in parallel"

This reverts commit 117505454ce04c0c0ce2c2b4058823cf764fc2eb.
It breaks the build for versions of GNU Make that don't support -O.

3 years agoFix Makefile subshell output when run in parallel
Basil L. Contovounesios [Sat, 6 Mar 2021 11:40:48 +0000 (11:40 +0000)]
Fix Makefile subshell output when run in parallel

For discussion, see the following thread:
https://lists.gnu.org/r/emacs-devel/2021-03/msg00255.html

* Makefile.in (texi_misc): Avoid interspersing parallel Make output
with that from subshell.

3 years agoPacify some semantic-tag-make-plist warnings
Basil L. Contovounesios [Sat, 6 Mar 2021 13:13:40 +0000 (13:13 +0000)]
Pacify some semantic-tag-make-plist warnings

* lisp/cedet/semantic/tag.el (semantic-tag-make-plist): Define
before its first use to pacify some recent "may not be defined at
runtime" warnings after turning on lexical-binding.

3 years agoRemove mention of using defun- and defvar- as prefixes
Lars Ingebrigtsen [Sat, 6 Mar 2021 12:27:34 +0000 (13:27 +0100)]
Remove mention of using defun- and defvar- as prefixes

* doc/lispref/tips.texi (Coding Conventions): Remove mention of
using defun- and defvar- as prefixes, as this is something that we
rarely do in Emacs (bug#46899).

3 years ago; Fix last change.
Eli Zaretskii [Sat, 6 Mar 2021 10:16:37 +0000 (12:16 +0200)]
; Fix last change.

3 years agoImprove documentation of Bindat
Eli Zaretskii [Sat, 6 Mar 2021 10:12:44 +0000 (12:12 +0200)]
Improve documentation of Bindat

* doc/lispref/processes.texi (Bindat Types, Bindat Functions)
(Bindat Computed Types): Improve wording and add indexing.

* etc/NEWS: Add a pointer to the ELisp manual for "Bindat".

3 years agoPull Modus themes version 1.2.3 from upstream
Protesilaos Stavrou [Fri, 5 Mar 2021 18:31:08 +0000 (18:31 +0000)]
Pull Modus themes version 1.2.3 from upstream

This syncs with the following upstream revision:

Update to version 1.2.3
0a36239 2021-03-05 19:43:30 +0200
https://gitlab.com/protesilaos/modus-themes/-/commit/0a36239baf908585cdf32c6188eb86713d9bf6c6

For discussion, see bug#45068 and the following upstream issue:
https://gitlab.com/protesilaos/modus-themes/-/issues/162

* doc/misc/modus-themes.org:
* etc/themes/modus-operandi-theme.el:
* etc/themes/modus-themes.el:
* etc/themes/modus-vivendi-theme.el: Update to version 1.2.3.

3 years agoUpdate Modus themes to their version 1.2.0
Protesilaos Stavrou [Thu, 4 Mar 2021 14:20:15 +0000 (16:20 +0200)]
Update Modus themes to their version 1.2.0

* doc/misc/modus-themes.org: Add new version of the manual, with
changes to markup and references to the latest state of the project.

* etc/themes/modus-vivendi-theme.el:
* etc/themes/modus-operandi-theme.el: Provide updated version of each
theme, which expands the contents of 'modus-themes.el' (bug#45068).

* etc/themes/modus-themes.el: Add new supportive file.  This is where
theme data, functions, and face definitions are defined.

3 years agoConditionally use macroexp-file-name in Flymake
Basil L. Contovounesios [Sat, 6 Mar 2021 09:05:49 +0000 (09:05 +0000)]
Conditionally use macroexp-file-name in Flymake

* lisp/progmodes/flymake.el (flymake-log): Reinstate Emacs 26
support by conditionally using macroexp-file-name which is new in
Emacs 28 (bug#46957).

3 years ago* * lisp/cedet/semantic: Use lexical-binding in the generated grammars
Stefan Monnier [Sat, 6 Mar 2021 04:33:21 +0000 (23:33 -0500)]
* * lisp/cedet/semantic: Use lexical-binding in the generated grammars

* admin/grammars/c.by (typesimple): Bind `semantic-c-classname` dynamically.

* lisp/cedet/semantic/bovine.el: Use lexical-binding.
(semantic-lambda): Silence warnings if the `vals` arg is not used.

* lisp/cedet/semantic/grammar-wy.el: Re-generate.

* lisp/cedet/semantic/bovine/grammar.el: Use lexical-binding.
(bovine-grammar-expand-action): Silence warnings if some of the
`vals`, `start`, or `end` args is not used.
(bovine--make-parser-1): Use lexical-binding in the generated files.

* lisp/cedet/semantic/wisent/grammar.el: Use lexical-binding.
(wisent--make-parser-1): Use lexical-binding in the generated files.

3 years ago; Fix typo.
Stefan Kangas [Sat, 6 Mar 2021 03:08:54 +0000 (04:08 +0100)]
; Fix typo.

3 years agoAdd some new tests for keymap.c
Stefan Kangas [Sat, 6 Mar 2021 02:17:23 +0000 (03:17 +0100)]
Add some new tests for keymap.c

* test/src/keymap-tests.el (keymap-define-key/undefined)
(keymap-define-key/keyboard-macro, keymap-define-key/lambda)
(keymap-define-key/keymap, keymap-define-key/menu-item)
(keymap-lookup-key/list-of-keymaps, keymap-lookup-key/too-long):
New tests.
(keymap-lookup-key): Extend test slightly.

3 years ago* lisp/cedet/srecode/*.el: Use lexical-binding
Stefan Monnier [Sat, 6 Mar 2021 02:00:00 +0000 (21:00 -0500)]
* lisp/cedet/srecode/*.el: Use lexical-binding

* lisp/cedet/srecode/compile.el (srecode-compile-inserter):
Use `make-instance` instead of the class name-as-function.

* lisp/cedet/srecode/fields.el (srecode-field-behind-hook):
Remove unused var `field`.

* lisp/cedet/srecode/find.el (srecode-load-tables-for-mode): Simplify.

* lisp/cedet/srecode/getset.el (srecode-semantic-selected-tag): Declare var.

* lisp/cedet/srecode/mode.el (srecode-minor-mode): Mark references to
non-existing `srecode-m3-items` function.

* lisp/cedet/srecode/srt-mode.el (srecode-parse-this-macro): Remove
unused var `raw`.

3 years agoBindat: new macro-expansion based data layout language
Stefan Monnier [Sat, 6 Mar 2021 00:56:31 +0000 (19:56 -0500)]
Bindat: new macro-expansion based data layout language

Thorough redesign of the Bindat system, which makes it possible
to define new Bindat type forms, define recursive types, control
the values returned when unpacking, freely mix arbitrary computations
with type definitions, as well as support for arbitrary sized
integers.

This also reverts the recent addition of the `bindat-spec` macro and
the support for 64bit integers in the old Bindat language since that
is now considered obsolete anyway.

* doc/lispref/processes.texi (Bindat Types): Rename from `Bindat Spec`
and rewrite for the new sublanguage.
(Bindat Functions): Adjust to the new terminology.
(Bindat Computed Types): New node.

* lisp/emacs-lisp/bindat.el (bindat--type): New type.
(bindat--unpack-u64, bindat--unpack-u64r): Delete functions.
(bindat--unpack-item, bindat--pack-item, bindat--fixed-length-alist):
Revert addition of support for 64bit integers.
(bindat--unpack-group, bindat--length-group, bindat--pack-group):
Handle the new `bindat--type` values.
(bindat-spec): Revert addition of this macro.
(bindat--unpack-uint, bindat--unpack-uintr, bindat--pack-uint)
(bindat--pack-uintr): New functions.
(bindat-type, bindat-defmacro, bindat--pcase): New macros.
(bindat-type): New Edebug elem.
(bindat--type): New generic function.
(bindat--primitives): New constant.
(bindat--macroenv, bindat--op): New vars.
(bindat--make-docstring, bindat--fun, bindat--makefun, bindat--toplevel):
New functions.

* test/lisp/emacs-lisp/bindat-tests.el: Use `bindat-type`.
(ip): New Bindat type.
(header-bindat-spec, data-bindat-spec, packet-bindat-spec): Adjust to
new `bindat-type` macro.
(bindat-test-unpack): Simplify now that the order of fields is preserved.
(bindat-test--int-websocket-type, bindat-test--LEB128): New consts.
(bindat-test--pack-val, bindat-test--sint, bindat-test--recursive):
New tests.

3 years agoMake lambda-lifting work again
Mattias Engdegård [Fri, 5 Mar 2021 19:21:01 +0000 (20:21 +0100)]
Make lambda-lifting work again

* lisp/emacs-lisp/cconv.el (cconv--analyze-use): Fix typo.
* test/lisp/emacs-lisp/cconv-tests.el (cconv-convert-lambda-lifted):
Add test case.

3 years agoImprove rcirc-authenticated-hook docstring
Tassilo Horn [Fri, 5 Mar 2021 19:53:18 +0000 (20:53 +0100)]
Improve rcirc-authenticated-hook docstring

* lisp/net/rcirc.el (rcirc-authenticated-hook): Improve docstring.

3 years ago* lisp/emacs-lisp/bindat.el: Minor refactoring
Stefan Monnier [Fri, 5 Mar 2021 18:31:16 +0000 (13:31 -0500)]
* lisp/emacs-lisp/bindat.el: Minor refactoring

(bindat--unpack-str, bindat--unpack-strz, bindat--unpack-bits):
New functions, extracted from `bindat--unpack-item`.
(bindat--unpack-item): Use them.
(bindat--align): New function.
(bindat--unpack-group, bindat--length-group, bindat--pack-group): Use it.
(bindat-get-field): Allow integers to index both lists (as returned by
`repeat`) and vectors (as returned by `vec`).
(bindat--pack-str, bindat--pack-bits): New functions, extracted from
`bindat--pack-item`.
(bindat--pack-item): Use them.

* test/lisp/emacs-lisp/bindat-tests.el (struct-bindat): Place the fields
in the order in which they appear in the structs.