Copy-edit doc strings and comments wrt bignum and fixnum
Don't say that a value is a fixnum if small enough and a bignum
otherwise, because that is now how Lisp integers always work,
and we generally don't expose the fixnum/bignum difference to the user
unless really necessary.
* lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate): Shorten the
informational GEN file relative to the stated directory
(bug#57265). This makes the message nicer for ELPA packages.
Stefan Kangas [Thu, 18 Aug 2022 11:17:11 +0000 (13:17 +0200)]
Improve cryptic syntax switch message in re-builder
* lisp/emacs-lisp/re-builder.el (reb-restart-font-lock): Move message
from here...
* lisp/emacs-lisp/re-builder.el (reb-change-syntax): ...to here.
Change it to be less cryptic.
Stefan Kangas [Tue, 16 Aug 2022 17:52:48 +0000 (19:52 +0200)]
Assume dired-guess is now always available
* lisp/dired-aux.el (dired-read-shell-command): Use
dired-guess-shell-command unconditionally, as it is now always
available.
(dired-do-shell-command): Doc fix; dired-guess is always available.
* lisp/dired.el (dired-do-man): Don't require dired-x.
kobarity [Wed, 17 Aug 2022 11:10:16 +0000 (13:10 +0200)]
Enhance Python font-lock to support multilines
* test/lisp/progmodes/python-tests.el
(python-tests-assert-faces-after-change): New helper function.
(python-font-lock-keywords-level-1-3)
(python-font-lock-assignment-statement-multiline-*): New tests.
* lisp/progmodes/python.el (python-rx): Add `sp-nl' to represent
space or newline (with/without backslash).
(python-font-lock-keywords-level-1)
(python-font-lock-keywords-maximum-decoration): Allow newlines
where appropriate.
(python-font-lock-extend-region): New function.
(python-mode): Set `python-font-lock-extend-region' to
`font-lock-extend-after-change-region-function'.
kobarity [Wed, 17 Aug 2022 10:44:56 +0000 (12:44 +0200)]
Add Python blocks support for hideshow
* lisp/progmodes/python.el (python-nav-beginning-of-block-regexp):
New variable.
(python-hideshow-forward-sexp-function): Change to call
`python-nav-end-of-block'.
(python-hideshow-find-next-block): New function to be used as
FIND-NEXT-BLOCK-FUNC in `hs-special-modes-alist'.
(python-info-looking-at-beginning-of-block): New function to be
used as LOOKING-AT-BLOCK-START-P-FUNC in `hs-special-modes-alist'.
(python-mode): Change settings of `hs-special-modes-alist'.
* test/lisp/progmodes/python-tests.el
(python-hideshow-hide-levels-1): Fix to keep empty lines.
(python-info-looking-at-beginning-of-block-1)
(python-hideshow-hide-levels-3, python-hideshow-hide-levels-4)
(python-hideshow-hide-all-1, python-hideshow-hide-all-2)
(python-hideshow-hide-all-3, python-hideshow-hide-block-1): New
tests (bug#56635).
* lisp/emacs-lisp/byte-opt.el (byte-optimize-and, byte-optimize-or):
Rewrite. Avoid branching on arguments statically known to be true or
false, and hoist code out to an unconditional prefix when possible.
Improved static detection of nil and non-nil expressions
* lisp/emacs-lisp/byte-opt.el (byte-opt--bool-value-form): New.
(byte-compile-trueconstp, byte-compile-nilconstp): Determine a static
nil or non-nil result in more cases. These functions have grown and
are no longer defsubst.
Michael Albinus [Tue, 16 Aug 2022 17:41:00 +0000 (19:41 +0200)]
Handle root permissions on remote files
* lisp/net/tramp.el (tramp-check-cached-permissions): Check also
for remote uid/gid being 0. (Bug#57238)
* lisp/net/tramp-sh.el (tramp-do-file-attributes-with-ls):
Convert numeric uid/gid strings into real strings.
(tramp-sh-get-signal-strings): Use `zerop'.
* lisp/net/tramp.el (tramp-root-id-string, tramp-root-id-integer):
New defconsts.
(tramp-handle-find-backup-file-name, tramp-handle-lock-file)
(tramp-local-host-p, tramp-handle-make-auto-save-file-name)
* lisp/net/tramp-sh.el (tramp-default-method-alist)
(ramp-default-user-alist, tramp-find-shell):
* lisp/net/tramp-sudoedit.el (tramp-default-user-alist): Use them.
* lisp/mh-e/mh-identity.el (mh-identity-pgg-default-user-id): Rename
from 'mh-identity-gpg-default-user-id', and make the old name into
obsolete variable alias. Update all uses.
Stefan Kangas [Tue, 16 Aug 2022 08:14:52 +0000 (10:14 +0200)]
Modernize spam section in Gnus manual slightly
* doc/misc/gnus.texi (The problem of spam): Don't explain what
spam is; there is no need for that in 2022. Don't explain
limitations of obsolete software TMDA; it's website has stopped
working but seems to have been updated last in 2007.
(Thwarting Email Spam, Anti-Spam Basics)
(Spam Package Configuration Examples): Prefer "spam" to "UCE".
(The problem of spam): Use example.org in example.
(SpamAssassin, Hashcash): Improve wording.
Jim Porter [Tue, 2 Aug 2022 18:40:43 +0000 (11:40 -0700)]
Make the bookmark fringe icon look like a bookmark
* src/fringe.c (large_circle_bits): New variable.
(standard_bitmaps): Add large_circle_bits.
* lisp/fringe.el (fringe-bitmaps): Add 'large-circle'.
(fringe-custom-set-bitmap): New function.
* lisp/cus-edit.el (widget-fringe-bitmap-prompt-value-history): New
variable.
(fringe-bitmap): New widget.
* lisp/bookmark.el (bookmark-set-fringe-mark): Obsolete in favor of...
(bookmark-fringe-mark): ... this.
(bookmark-fringe-mark): Rename this fringe bitmap to...
(bookmark-mark): ... and change it to look like a bookmark.
(bookmark-face): Don't set the ':background' of the face. Instead,
set ':distant-foreground'.
(bookmark--set-fringe-mark, bookmark--remove-fringe-mark)
(bookmark-store, bookmark--jump-via): Consult the
'bookmark-fringe-mark' option.
Jim Porter [Sun, 14 Aug 2022 20:48:22 +0000 (13:48 -0700)]
Fix non-interactive use of conditionals in Eshell
* lisp/eshell/esh-cmd.el (eshell-rewrite-if-command): Fix misplaced
't' symbol; it should be passed to 'eshell-invokify-arg'.
(eshell-do-eval): Pass 'synchronous-p' to recursive calls in some
missing cases.
Jim Porter [Sun, 14 Aug 2022 03:31:11 +0000 (20:31 -0700)]
Provide ERT explainer for 'eshell-match-command-output'
This was formerly named 'eshell-command-result-p', but "result" isn't
quite the right terminology, since this function specifically tested
the output of a command, not its Lisp result (as
'eshell-command-result' would return).
* test/lisp/eshell/eshell-tests-helpers.el (eshell-insert-command):
Provide a more-complete docstring.
(eshell-match-result): Rename to...
(eshell-match-output): ... this.
(eshell-match-output--explainer): New function.
(eshell-command-result-p): Rename to...
(eshell-match-command-output): ... this.
Alan Mackenzie [Mon, 15 Aug 2022 12:18:01 +0000 (12:18 +0000)]
Enhance safe_run_hooks_1 and safe_run_hook_funcall to handle more arguments
This fixes bug #57179.
* src/keyboard.c (safe_run_hooks_1, safe_run_hook_funcall): Enhance these
functions so that nargs == 3 or 4 is handled as well as nargs == 2. This
allows them to be used to call hooks with 1 or 2 arguments.
Matt Armstrong [Mon, 15 Aug 2022 06:56:57 +0000 (08:56 +0200)]
Pacify warnings from gcc 12 in encode_coding_object
* src/coding.c (encode_coding_object): Mark saved_pt_byte with UNINIT
to silence a false alarm from -Wmaybe-uninitialized. This was already
done in decode_coding_object. The fix is correct because saved_pt is
used as a sentinel before saved_pt_byte is used (bug#57219).
Tweak autoloads of defsubsts containing spaces/control chars
* lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate--print-form):
Escape control chars in bodies so that we don't end up with
trailing spaces if we're autoloading a defsubst containing
"\\`[ \t\n\r]*\\'".
* lisp/emacs-lisp/lisp-mode.el (lisp-current-defun-name): Further
tweaks to make (autoload 'foo) work again. Perhaps this should
all be reverted to the original version and then given a new rething.
Stefan Kangas [Sun, 14 Aug 2022 14:37:11 +0000 (16:37 +0200)]
Make gnus-iswitchb-completing-read obsolete
* lisp/gnus/gnus-util.el (gnus-iswitchb-completing-read): Make
obsolete. It depends on the obsolete library iswitchb.el.
(gnus-completing-read-function): Don't advertise above obsolete
function.
Paul Eggert [Sun, 14 Aug 2022 20:48:11 +0000 (13:48 -0700)]
Improve timefns speed on integers
* src/timefns.c (decode_lisp_time) [FASTER_TIMEFNS]:
Speed up when SPECIFIED_TIME is an integer.
(time_cmp) [FASTER_TIMEFNS]: Speed up when comparing integers.