* doc/lispref/positions.texi (Text Lines): Document them
* lisp/emacs-lisp/shortdoc.el: Mention them, and also the
buffer/line predicates.
* src/editfns.c (bol): New function.
(Fbol): New defun.
(Fline_beginning_position): Use `bol'.
(eol): New function.
(Feol): New defun.
(Fline_end_position): Use `eol'.
Augusto Stoffel [Sat, 13 Aug 2022 15:39:57 +0000 (17:39 +0200)]
python.el: Adjustments to Flymake backend
* lisp/progmodes/python (python-flymake-command): Advertise possiblity
to use pylint.
(python-flymake-command-output-pattern): Make compatible with recent
versions of pyflakes. (Bug#53913)
This is of little consequence in practice since the input is always a
vector of keys representing a prefix, where bit 7 isn't likely to be
set when higher bits are set, but it silences a (justified) warning.
* doc/misc/modus-themes.org (Sample configuration with and without
use-package): Add missing parenthesis to the manual.
(Option for completion framework aesthetics)
(Custom Org emphasis faces): Minor rewording.
(Custom hl-todo colors): Add instructions on how to add user-level
support for the 'solaire' package, as the modus-themes no longer
support it.
(Full support for packages or face groups): Remove 'solaire' from the
list of supported packages.
(Note on git-gutter in Doom Emacs)
(Note on php-mode multiline comments)
(Note on highlight-parentheses.el): Clarify need to re-load the
theme for changes to take effect.
(Acknowledgements): Update acknowledgements.
* etc/themes/modus-themes.el (modus-themes-faces): Fix typo.
(modus-themes--version): Reword docstring and update to current value.
(modus-themes--weight): Stop using deprecated alias of symbol.
* etc/themes/modus-operandi-theme.el:
* etc/themes/modus-vivendi-theme.el: Bump version number.
Po Lu [Fri, 19 Aug 2022 02:06:29 +0000 (10:06 +0800)]
Fix more calls to XQueryPointer for MPX
* src/xterm.c (x_dnd_begin_drag_and_drop): Set DND devices to -1
if XI2 is not supported on the given display.
(x_query_pointer): Make wrapper around x_query_pointer_1.
(x_query_pointer_1): Split off most of x_query_pointer to this
function. Allow a specific client pointer to be specified.
(x_dnd_update_tooltip_now, x_dnd_update_state): Use
x_query_pointer_1 with the right device instead of
XQueryPointer.
Stefan Kangas [Thu, 18 Aug 2022 21:47:47 +0000 (23:47 +0200)]
Improve obsoletion of image-transform-fit-to-{height,width}
* lisp/image-mode.el (image-transform-fit-to-height)
(image-transform-fit-to-width): Change obsoletion to refer to new
command 'image-transform-fit-to-window'.
Stefan Kangas [Thu, 18 Aug 2022 16:46:10 +0000 (18:46 +0200)]
Make toggling between image, hex and text more consistent
* lisp/image-mode.el (image-toggle-hex-display, image-toggle-display):
Ensure commands work correctly also in `hexl-mode'.
(image-mode-to-text):
(image-mode-as-hex, image-mode-as-text): Enable image-minor-mode also
in hexl-mode, which adds the "C-c C-x" keybinding for easier toggling.
Stefan Kangas [Thu, 28 Oct 2021 01:36:28 +0000 (03:36 +0200)]
New command image-transform-set-percent
* lisp/image-mode.el (image-transform-set-percent): New command.
(image-mode-map): Bind above new command to "s p".
* doc/emacs/files.texi (Image Mode): Document it.
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.