]> git.eshelyaron.com Git - emacs.git/log
emacs.git
2 years agoFix underscores in argument names in ns-win
Lars Ingebrigtsen [Fri, 19 Aug 2022 13:37:35 +0000 (15:37 +0200)]
Fix underscores in argument names in ns-win

* lisp/term/ns-win.el (x-file-dialog): Don't use underscores in
argument names.

2 years agopython.el: Add completion-predicate symbol property to commands
Augusto Stoffel [Sat, 13 Aug 2022 16:10:14 +0000 (18:10 +0200)]
python.el: Add completion-predicate symbol property to commands

* lisp/progmodes/python.el: Add a completion-predicate property to
most commands defined in this file; some are only useful in
python-mode, others in inferior-python mode as well.  (Bug#53913)
(python-skeleton-define, python-define-auxiliary-skeleton): Add
appropriate completion-predicate properties.
(python--completion-predicate): New function.

2 years agoAdd new functions eol and bol
Lars Ingebrigtsen [Fri, 19 Aug 2022 13:22:29 +0000 (15:22 +0200)]
Add new functions eol and bol

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

2 years agopython-mode: Remove special outline-heading-end-regexp
Augusto Stoffel [Sat, 13 Aug 2022 16:55:48 +0000 (18:55 +0200)]
python-mode: Remove special outline-heading-end-regexp

It doesn't work well with the new type annotation syntax introduced in
Python 3.5.

* lisp/progmodes/python.el (python-mode): Remove buffer-local setting
of outline-heading-end-regexp.  (Bug#53913)

2 years agopython.el: Adjustments to Flymake backend
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)

2 years agopython-check-command: Don't use absolute file names
Augusto Stoffel [Sat, 13 Aug 2022 15:04:17 +0000 (17:04 +0200)]
python-check-command: Don't use absolute file names

Absolute executable file names are incompatible with Tramp and
packages that switch between virtualenvs.

* lisp/progmodes/python.el (python-check-command): Don't use absolute
file names.  (Bug#53913)

2 years agoFix mis-spelling of c-awk-old-ByLL and really make it buffer-local
Paul A. Patience [Fri, 19 Aug 2022 12:04:31 +0000 (14:04 +0200)]
Fix mis-spelling of c-awk-old-ByLL and really make it buffer-local

* lisp/progmodes/cc-awk.el (c-awk-old-ByLL): Make the
correct variable buffer-local (bug#57294).

Copyright-paperwork-exempt: yes

2 years ago* lisp/edmacro.el (edmacro-sanitize-for-string): Fix condition.
Mattias Engdegård [Fri, 19 Aug 2022 11:27:53 +0000 (13:27 +0200)]
* lisp/edmacro.el (edmacro-sanitize-for-string): Fix condition.

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.

2 years agoFix region-extract-function compilation warning
Lars Ingebrigtsen [Thu, 18 Aug 2022 21:05:17 +0000 (23:05 +0200)]
Fix region-extract-function compilation warning

* lisp/simple.el (region-extract-function): Clean up the logic
slightly to avoid a warning.

2 years agoFix ns-win.el (x-file-dialog) declaration
Lars Ingebrigtsen [Thu, 18 Aug 2022 20:58:39 +0000 (22:58 +0200)]
Fix ns-win.el (x-file-dialog) declaration

* lisp/term/ns-win.el (x-file-dialog): Give the function the same
signature here as other definitions.

2 years agoUpdate the modus-themes to their 2.6.0 version
Protesilaos Stavrou [Fri, 19 Aug 2022 09:40:47 +0000 (12:40 +0300)]
Update the modus-themes to their 2.6.0 version

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

Detailed release notes:
<https://protesilaos.com/codelog/2022-08-19-modus-themes-2-6-0/>.

2 years ago* src/pdumper.c (dump_native_comp_unit): Error if CU is not fixed-up
Andrea Corallo [Fri, 19 Aug 2022 08:21:38 +0000 (10:21 +0200)]
* src/pdumper.c (dump_native_comp_unit): Error if CU is not fixed-up

2 years ago* src/alloc.c (pure_alloc): Warn for pure space overflow
Andrea Corallo [Thu, 18 Aug 2022 14:41:26 +0000 (16:41 +0200)]
* src/alloc.c (pure_alloc): Warn for pure space overflow

2 years ago* src/pdumper.c (Fdump_emacs_portable): Check and warn for pure space overflow
Andrea Corallo [Wed, 17 Aug 2022 20:48:59 +0000 (22:48 +0200)]
* src/pdumper.c (Fdump_emacs_portable): Check and warn for pure space overflow

2 years agoSpeed up image-dired-display-image
Morgan Smith [Thu, 18 Aug 2022 23:51:42 +0000 (01:51 +0200)]
Speed up image-dired-display-image

* lisp/image-dired.el (image-dired-display-image): Open file literally
so we don't run image-mode twice.  (Bug#57281)

2 years agoMerge from origin/emacs-28
Stefan Kangas [Fri, 19 Aug 2022 04:30:21 +0000 (06:30 +0200)]
Merge from origin/emacs-28

e64d811b51 Improve image-mode-as-hex docstring

2 years agoFix more calls to XQueryPointer for MPX
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.

2 years agoImprove obsoletion of image-transform-fit-to-{height,width}
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'.

2 years ago* Rename `comp--typeof-builtin-types'
Andrea Corallo [Thu, 18 Aug 2022 21:41:39 +0000 (23:41 +0200)]
* Rename `comp--typeof-builtin-types'

* lisp/emacs-lisp/comp-cstr.el (comp--typeof-builtin-types): Rename.
(comp-normalize-valset, comp-common-supertype-2): Update.

2 years ago* lisp/emacs-lisp/comp-cstr.el (comp--all-builtin-types): Remove
Andrea Corallo [Thu, 18 Aug 2022 21:35:33 +0000 (23:35 +0200)]
* lisp/emacs-lisp/comp-cstr.el (comp--all-builtin-types): Remove

2 years agoAdjust the environment name for the minted package
Arash Esbati [Thu, 18 Aug 2022 20:55:18 +0000 (22:55 +0200)]
Adjust the environment name for the minted package

* lisp/textmodes/reftex-vars.el (reftex-label-alist-builtin): Fix
the name of the environment which can contain a \label macro.

2 years agoImprove image-mode-as-hex docstring
Stefan Kangas [Thu, 18 Aug 2022 18:13:34 +0000 (20:13 +0200)]
Improve image-mode-as-hex docstring

* lisp/image-mode.el: Fix typos.
(image-mode-as-hex): Doc fix; say that it uses 'hexl-mode' and reflow.

2 years agoDo interactive mode tagging in image-mode.el
Stefan Kangas [Thu, 18 Aug 2022 17:58:39 +0000 (19:58 +0200)]
Do interactive mode tagging in image-mode.el

* lisp/image-mode.el (image-forward-hscroll)
(image-backward-hscroll, image-next-line, image-previous-line)
(image-scroll-up, image-scroll-down, image-scroll-left)
(image-scroll-right, image-bol, image-eol, image-bob, image-eob)
(image-mode-fit-frame, image-kill-buffer, image-next-file)
(image-previous-file, image-mode-copy-file-name-as-kill)
(image-mode-mark-file, image-mode-unmark-file)
(image-transform-set-percent, image-transform-set-scale)
(image-transform-fit-to-height, image-transform-fit-to-width)
(image-transform-fit-both, image-transform-fit-to-window)
(image-transform-set-rotation, image-transform-set-smoothing)
(image-transform-original, image-transform-reset): Add interactive tag
for image-mode.

2 years agoMake toggling between image, hex and text more consistent
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.

2 years ago; * lisp/image-mode.el (image-minor-mode): Reflow docstring.
Stefan Kangas [Thu, 18 Aug 2022 16:06:56 +0000 (18:06 +0200)]
; * lisp/image-mode.el (image-minor-mode): Reflow docstring.

2 years agoNew command image-transform-set-percent
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.

2 years agoPrefer defvar-keymap in image-mode.el
Stefan Kangas [Thu, 18 Aug 2022 15:23:03 +0000 (17:23 +0200)]
Prefer defvar-keymap in image-mode.el

* lisp/image-mode.el (image-mode-map, image-minor-mode-map):
Prefer defvar-keymap.

2 years ago; * lisp/image-mode.el: Delete commented out image-transform-mode.
Stefan Kangas [Thu, 18 Aug 2022 15:29:53 +0000 (17:29 +0200)]
; * lisp/image-mode.el: Delete commented out image-transform-mode.

This mode was added in 2010 but never implemented.  It was
subsequently commented out in 2012.

2 years agoMerge from origin/emacs-28
Stefan Kangas [Thu, 18 Aug 2022 17:21:32 +0000 (19:21 +0200)]
Merge from origin/emacs-28

ef1e68f11d * lisp/image-mode.el (image-mode-as-hex): Fix toggle instr...
dc0fce3a7d ; lisp/image-mode.el: Fix typo.
254ba1d3e5 * lisp/image-mode.el: Improve commentary.
ac43ac1af9 cl-reduce doc string improvement

2 years ago* lisp/image-mode.el (image-mode-as-hex): Fix toggle instructions.
Stefan Kangas [Thu, 18 Aug 2022 16:41:18 +0000 (18:41 +0200)]
* lisp/image-mode.el (image-mode-as-hex): Fix toggle instructions.

2 years agoFix encoding problem in tramp-sh.el
Michael Albinus [Thu, 18 Aug 2022 16:30:35 +0000 (18:30 +0200)]
Fix encoding problem in tramp-sh.el

* lisp/net/tramp-sh.el (tramp-sh-handle-file-local-copy):
Compute inline coding only if needed.

2 years ago* doc/misc/cl.texi (Macro Bindings): Fix bug#57263
Stefan Monnier [Thu, 18 Aug 2022 16:28:26 +0000 (12:28 -0400)]
* doc/misc/cl.texi (Macro Bindings): Fix bug#57263

Update `cl-symbol-macrolet` according to the change in response to bug#26073.

2 years ago; lisp/image-mode.el: Fix typo.
Stefan Kangas [Thu, 18 Aug 2022 15:50:13 +0000 (17:50 +0200)]
; lisp/image-mode.el: Fix typo.

2 years ago* lisp/image-mode.el: Improve commentary.
Stefan Kangas [Thu, 18 Aug 2022 15:36:54 +0000 (17:36 +0200)]
* lisp/image-mode.el: Improve commentary.

2 years agoFix string-to-syntax signature in comp-known-type-specifiers
Mattias Engdegård [Thu, 18 Aug 2022 15:25:41 +0000 (17:25 +0200)]
Fix string-to-syntax signature in comp-known-type-specifiers

* lisp/emacs-lisp/comp.el (comp-known-type-specifiers):
`string-to-syntax` can return nil.

2 years ago* lisp/emacs-lisp/comp.el (comp-known-type-specifiers): Fix some type
Andrea Corallo [Thu, 18 Aug 2022 15:09:36 +0000 (17:09 +0200)]
* lisp/emacs-lisp/comp.el (comp-known-type-specifiers): Fix some type

2 years agoMore non-nil-returning functions in source optimisation
Mattias Engdegård [Thu, 18 Aug 2022 10:33:40 +0000 (12:33 +0200)]
More non-nil-returning functions in source optimisation

This change was partially generated and mechanically cross-validated
with function type information from comp-known-type-specifiers in
comp.el.

* lisp/emacs-lisp/byte-opt.el (byte-compile-trueconstp):
Extend list of functions and fix a typo (logxor).

2 years agoCopy-edit doc strings and comments wrt bignum and fixnum
Mattias Engdegård [Thu, 18 Aug 2022 10:08:24 +0000 (12:08 +0200)]
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.

* src/charset.c (Fencode_char):
* src/editfns.c (Fuser_uid, Fuser_real_uid, Fgroup_gid)
(Fgroup_real_gid, Femacs_pid):
* src/font.c (Ffont_variation_glyphs):
* src/process.c (Fprocess_id):
Edit doc strings.
* src/pgtkselect.c:
* src/xselect.c: Edit comments.

2 years ago; Fix a typo in autoload.el
Eli Zaretskii [Thu, 18 Aug 2022 13:30:32 +0000 (16:30 +0300)]
; Fix a typo in autoload.el

* lisp/obsolete/autoload.el (update-directory-autoloads): Fix
obsolescence version.  (Bug#57276)

2 years agoFix Python indentation of block continuation
kobarity [Thu, 18 Aug 2022 13:16:08 +0000 (15:16 +0200)]
Fix Python indentation of block continuation

* lisp/progmodes/python.el (python-indent--calculate-indentation):
Fix indentation of :after-backslash-block-continuation.

* test/lisp/progmodes/python-tests.el
(python-indent-after-backslash-6): New test (bug#57262).

2 years agoMake GEN message from loaddefs-generate nicer
Lars Ingebrigtsen [Thu, 18 Aug 2022 13:12:55 +0000 (15:12 +0200)]
Make GEN message from loaddefs-generate nicer

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

2 years agocl-reduce doc string improvement
Colin Woodbury [Thu, 18 Aug 2022 13:06:56 +0000 (15:06 +0200)]
cl-reduce doc string improvement

* lisp/emacs-lisp/cl-seq.el (cl-reduce): Explain what happens when
using :from-end (bug#57273).

2 years agoRebuild the Emacs executable if loaddefs.el has changed
Gerd Möllmann [Thu, 18 Aug 2022 12:44:11 +0000 (14:44 +0200)]
Rebuild the Emacs executable if loaddefs.el has changed

* Makefile.in (src-depending-on-lisp): Ensure that we check
whether we need to rebuild the Emacs executable if loaddefs.el has
been updated.

2 years agoImprove update-directory-autoloads deprecation message
Stefan Kangas [Thu, 18 Aug 2022 11:36:46 +0000 (13:36 +0200)]
Improve update-directory-autoloads deprecation message

* lisp/obsolete/autoload.el (update-directory-autoloads): Improve
deprecation message.  (Bug#57276)

2 years agoImprove cryptic syntax switch message in re-builder
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.

2 years ago* lisp/loadup.el: Always fix-up all loaded compilation units
Andrea Corallo [Wed, 17 Aug 2022 20:47:05 +0000 (22:47 +0200)]
* lisp/loadup.el: Always fix-up all loaded compilation units

2 years ago* Expose `comp-loaded-comp-units-h'
Andrea Corallo [Wed, 17 Aug 2022 20:29:33 +0000 (22:29 +0200)]
* Expose `comp-loaded-comp-units-h'

* src/comp.c : remove 'all_loaded_comp_units_h'.
(syms_of_comp): Define `comp-loaded-comp-units-h'.
(register_native_comp_unit, Fnative_elisp_load): Use it.

2 years agoFix the MS-DOS build
Po Lu [Thu, 18 Aug 2022 06:24:30 +0000 (14:24 +0800)]
Fix the MS-DOS build

* config.bat: Generate stdckdint.in.h
* msdos/sedlibmk.inp (STDCKDINT_H)
(GL_GENERATE_STDCKDINT_H_CONDITION): Update these variables too.

2 years agoFix broken build on Solaris 10 emacs_spawn
Paul Eggert [Thu, 18 Aug 2022 06:12:55 +0000 (23:12 -0700)]
Fix broken build on Solaris 10 emacs_spawn

* src/callproc.c (emacs_spawn) [SETUP_SLAVE_TTY]:
pty_flag no longer exists.  Use pty_in && std_in >= 0,
which at least compiles.

2 years ago; Merge from origin/emacs-28
Stefan Kangas [Thu, 18 Aug 2022 04:30:28 +0000 (06:30 +0200)]
; Merge from origin/emacs-28

The following commit was skipped:

21751f02d3 Backport tempname changes from master (bug#57129)

2 years agoBackport tempname changes from master (bug#57129)
Paul Eggert [Thu, 18 Aug 2022 03:30:26 +0000 (20:30 -0700)]
Backport tempname changes from master (bug#57129)

* lib/tempname.c: Backport from master, which uses current Gnulib.

2 years ago; * src/xterm.c (xi_select_hierarchy_events): Fix typo.
Po Lu [Thu, 18 Aug 2022 02:32:49 +0000 (10:32 +0800)]
; * src/xterm.c (xi_select_hierarchy_events): Fix typo.

2 years ago; * src/xterm.c (xi_select_hierarchy_events): Fix typo.
Po Lu [Thu, 18 Aug 2022 02:31:02 +0000 (10:31 +0800)]
; * src/xterm.c (xi_select_hierarchy_events): Fix typo.

2 years agoUpdate from Gnulib by running admin/merge-gnulib
Paul Eggert [Thu, 18 Aug 2022 01:50:06 +0000 (18:50 -0700)]
Update from Gnulib by running admin/merge-gnulib

2 years ago* lisp/emacs-lisp/bytecomp.el (byte-compile-log-1): Create buffer if necessary
Andrea Corallo [Wed, 17 Aug 2022 21:31:41 +0000 (23:31 +0200)]
* lisp/emacs-lisp/bytecomp.el (byte-compile-log-1): Create buffer if necessary

2 years ago* lisp/progmodes/cc-defs.el (c-safe-scan-lists): Evaluate LIMIT just once
Alan Mackenzie [Wed, 17 Aug 2022 20:34:43 +0000 (20:34 +0000)]
* lisp/progmodes/cc-defs.el (c-safe-scan-lists): Evaluate LIMIT just once

2 years agoFix Linux APM BIOS flag testing in battery.el
Basil L. Contovounesios [Wed, 17 Aug 2022 17:11:25 +0000 (20:11 +0300)]
Fix Linux APM BIOS flag testing in battery.el

Original sin detected by recent byte-compiler improvements; see:
https://lists.gnu.org/r/emacs-devel/2022-08/msg00611.html

* lisp/battery.el (battery-linux-proc-apm): Treat result of logand
as a number, not boolean.

2 years agoShorten new manual section "Shell Command Guessing"
Stefan Kangas [Tue, 16 Aug 2022 18:51:38 +0000 (20:51 +0200)]
Shorten new manual section "Shell Command Guessing"

* doc/emacs/dired.texi (Shell Command Guessing): Don't document
unimportant details, and improve wording to be shorter.

2 years agoAssume dired-guess is now always available
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.

2 years agoMove dired-guess commands from dired-x to dired
Stefan Kangas [Tue, 16 Aug 2022 15:14:33 +0000 (17:14 +0200)]
Move dired-guess commands from dired-x to dired

* lisp/dired-x.el (dired-shell-command-history)
(dired-guess-shell-alist-default, dired-guess-default)
(dired-guess-shell-command): Move from here...
* lisp/dired-aux.el (dired-shell-command-history)
(dired-guess-shell-alist-default, dired-guess-default)
(dired-guess-shell-command): ...to here.  (Bug#21981)

* lisp/dired-x.el (dired-guess-shell-gnutar)
(dired-guess-shell-gzip-quiet, dired-guess-shell-znew-switches)
(dired-guess-shell-case-fold-search, dired-guess-shell-alist-user):
Move from here...
* lisp/dired.el (dired-guess-shell-gnutar)
(dired-guess-shell-gzip-quiet, dired-guess-shell-znew-switches)
(dired-guess-shell-case-fold-search, dired-guess-shell-alist-user):
...to here.  Change :group to dired-guess.
(dired-guess): New defgroup.

* test/lisp/dired-x-tests.el (dired-guess-default): Move from here...
* test/lisp/dired-aux-tests.el (dired-guess-default): ...to here.

* doc/misc/dired-x.texi (Features, Technical Details, Installation):
Delete any mention of shell command guessing.
(Shell Command Guessing): Move from here...
* doc/emacs/dired.texi (Shell Command Guessing): ...to here.  Adapt to
better fit the Emacs Manual conventions.
* lisp/dired-aux.el (dired-do-shell-command): Doc fix to adjust for
above changes.
* etc/NEWS: Announce the above change.

2 years agoMake compat function cperl-putback-char obsolete
Stefan Kangas [Wed, 17 Aug 2022 14:09:31 +0000 (16:09 +0200)]
Make compat function cperl-putback-char obsolete

* lisp/progmodes/cperl-mode.el (cperl-putback-char): Make
obsolete.  Update callers.

2 years ago* lisp/progmodes/cperl-mode.el: Improve commentary.
Stefan Kangas [Wed, 17 Aug 2022 13:56:13 +0000 (15:56 +0200)]
* lisp/progmodes/cperl-mode.el: Improve commentary.

2 years ago; Delete code in cperl-mode.el commented out since 1997
Stefan Kangas [Wed, 17 Aug 2022 13:50:20 +0000 (15:50 +0200)]
; Delete code in cperl-mode.el commented out since 1997

* lisp/progmodes/cperl-mode.el (cperl-menu): Delete some code
commented out since 1997.

2 years agoDon't check if autoloaded functions are fboundp
Stefan Kangas [Wed, 17 Aug 2022 13:47:13 +0000 (15:47 +0200)]
Don't check if autoloaded functions are fboundp

* lisp/progmodes/cperl-mode.el (cperl-menu, cperl-init-faces):
Assume some autoloaded ps-print.el functions are always there.

2 years agoem-unix.el: only pass -H option to grep
Brendan O'Dea [Wed, 17 Aug 2022 11:20:15 +0000 (13:20 +0200)]
em-unix.el: only pass -H option to grep

* lisp/eshell/em-unix.el (eshell-grep): Don't add -H, because that
breaks agrep/glimpse etc (bug#57247).
(eshell/grep, eshell/egrep, eshell/fgrep): Instead add it here.

2 years agoEnhance Python font-lock to support multilines
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'.

2 years agoRevert "Add Python blocks support for hideshow"
Lars Ingebrigtsen [Wed, 17 Aug 2022 11:09:21 +0000 (13:09 +0200)]
Revert "Add Python blocks support for hideshow"

This reverts commit af4cfb519415ed3c1d6d036aac908e4f9ee383eb.

This led to test failures.

2 years agoFix some recently introduced byte-compiler warnings
Stefan Kangas [Wed, 17 Aug 2022 10:48:02 +0000 (12:48 +0200)]
Fix some recently introduced byte-compiler warnings

* lisp/emulation/viper-util.el (viper-key-to-character):
* lisp/vc/vc-svn.el (vc-svn-dir-extra-headers): Fix warnings.
* lisp/net/eudc-export.el (eudc-batch-export-records-to-bbdb):
Fix buglet.

2 years agoAdd Python blocks support for hideshow
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).

2 years agoMerge from origin/emacs-28
Stefan Kangas [Wed, 17 Aug 2022 04:30:25 +0000 (06:30 +0200)]
Merge from origin/emacs-28

a4078fa628 ; * lisp/vc/ediff.el: Improve wording in last change.
dd077ebded Revert "; * doc/lispintro/emacs-lisp-intro.texi: Fix typo."
362c9ab879 * doc/misc/gnus.texi (Article Washing): Fix Links URL.

2 years agoAvoid disabling device multiple times while handling XI attachment events
Po Lu [Wed, 17 Aug 2022 02:20:25 +0000 (10:20 +0800)]
Avoid disabling device multiple times while handling XI attachment events

* src/xterm.c (handle_one_xevent): Avoid disabling devices if we
notice it has been disabled while handling XISlaveDetached or
XISlaveAttached.

2 years ago* src/buffer.c (Frename_buffer): Fix bug#56693
Stefan Monnier [Tue, 16 Aug 2022 21:29:26 +0000 (17:29 -0400)]
* src/buffer.c (Frename_buffer): Fix bug#56693

2 years ago* lisp/dired.el (dired-mark-if): Evaluate MSG once to avoid warning.
Mattias Engdegård [Tue, 16 Aug 2022 18:37:02 +0000 (20:37 +0200)]
* lisp/dired.el (dired-mark-if): Evaluate MSG once to avoid warning.

2 years agoImproved `null` (alias `not`) optimisation
Mattias Engdegård [Tue, 16 Aug 2022 17:03:46 +0000 (19:03 +0200)]
Improved `null` (alias `not`) optimisation

Take static boolean information of the argument into account.

* lisp/emacs-lisp/byte-opt.el (byte-optimize-not): New.

2 years agoImproved `and` and `or` optimisation
Mattias Engdegård [Fri, 12 Aug 2022 18:12:54 +0000 (20:12 +0200)]
Improved `and` and `or` optimisation

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

2 years agoImproved `if` and `while` optimisation
Mattias Engdegård [Fri, 12 Aug 2022 18:12:25 +0000 (20:12 +0200)]
Improved `if` and `while` optimisation

Recognise some more special cases:

  (if X nil t)      -> (not X)
  (if X t)          -> (not (not X))
  (if X t nil)      -> (not (not X))
  (if VAR VAR X...) -> (or VAR (progn X...))

* lisp/emacs-lisp/byte-opt.el (byte-opt-negate): New.
(byte-optimize-if): Add transformations above and refactor.
(byte-optimize-while): Better static nil-detection.

2 years agoImproved static detection of nil and non-nil expressions
Mattias Engdegård [Fri, 12 Aug 2022 18:11:52 +0000 (20:11 +0200)]
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.

2 years agoFix autoload in tramp.el
Michael Albinus [Tue, 16 Aug 2022 18:32:58 +0000 (20:32 +0200)]
Fix autoload in tramp.el

2 years agoHandle root permissions on remote files
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.

2 years agodired-do-shell-command doc string clarification
Lars Ingebrigtsen [Tue, 16 Aug 2022 17:20:49 +0000 (19:20 +0200)]
dired-do-shell-command doc string clarification

* lisp/dired-aux.el (dired-do-shell-command): Clarify doc string
(bug#57228).

2 years ago; * lisp/vc/ediff.el: Improve wording in last change.
Stefan Kangas [Tue, 16 Aug 2022 14:38:33 +0000 (16:38 +0200)]
; * lisp/vc/ediff.el: Improve wording in last change.

2 years ago; * lisp/bookmark.el (fringe): Require. (Bug#57241)
Eli Zaretskii [Tue, 16 Aug 2022 13:40:49 +0000 (16:40 +0300)]
; * lisp/bookmark.el (fringe): Require.  (Bug#57241)

2 years agoAdvertise obsolete library pgg.el less
Stefan Kangas [Tue, 16 Aug 2022 13:29:30 +0000 (15:29 +0200)]
Advertise obsolete library pgg.el less

* doc/misc/gnus-faq.texi (FAQ 8-2):
* doc/misc/gnus.texi (Security):
* doc/misc/message.texi (Using OpenPGP, PGP Compatibility):
* doc/misc/mh-e.texi (Reading PGP, Sending PGP):
* lisp/gnus/mml2015.el (mml2015-use):
* lisp/info-look.el (mapc):
* lisp/mh-e/mh-e.el (mh-mml-method-default): Advertise obsolete
library pgg.el less.

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

2 years agoFix XInput hierarchy events not being delivered in daemon mode
Po Lu [Tue, 16 Aug 2022 13:11:03 +0000 (21:11 +0800)]
Fix XInput hierarchy events not being delivered in daemon mode

* src/xfns.c (setup_xi_event_mask): Stop selecting for device
hierarchy events.

* src/xterm.c (xi_select_hierarchy_events, x_term_init): Select
those here instead, on the default root window.

2 years agoMake message-delete-line obsolete
Lars Ingebrigtsen [Tue, 16 Aug 2022 13:01:16 +0000 (15:01 +0200)]
Make message-delete-line obsolete

* lisp/gnus/message.el (message-delete-line): Make obsolete.
(message-change-subject, message-cross-post-insert-note)
(message-reduce-to-to-cc, message-indent-citation)
(message-send-mail-with-mh, message-generate-headers)
(message-fill-field-general): Adjust callers.

2 years agoFix buffer-start cleanup in message-indent-citation
Lars Ingebrigtsen [Tue, 16 Aug 2022 12:58:43 +0000 (14:58 +0200)]
Fix buffer-start cleanup in message-indent-citation

* lisp/gnus/message.el (message-indent-citation): Fix thinko in loop.

2 years agoDon't look for long lines beyond the narrowed region
Eli Zaretskii [Tue, 16 Aug 2022 12:27:15 +0000 (15:27 +0300)]
Don't look for long lines beyond the narrowed region

* src/xdisp.c (redisplay_window): Don't scan for newlines outside
the current buffer's restriction.

2 years ago; Normalize my email
Stefan Kangas [Tue, 16 Aug 2022 11:41:08 +0000 (13:41 +0200)]
; Normalize my email

2 years agoRevert "; * doc/lispintro/emacs-lisp-intro.texi: Fix typo."
Stefan Kangas [Tue, 16 Aug 2022 11:38:22 +0000 (13:38 +0200)]
Revert "; * doc/lispintro/emacs-lisp-intro.texi: Fix typo."

This reverts commit 9d0dba44da7ac83d018fff3c26d33dac12ebd806.

This was not a typo, but incorrectly matching parens in Info-mode.

2 years ago; Don't mention obsolete libraries
Stefan Kangas [Tue, 16 Aug 2022 11:31:49 +0000 (13:31 +0200)]
; Don't mention obsolete libraries

* lisp/erc/erc-speedbar.el:
* etc/TODO (https): Don't mention obsolete libraries.

2 years agoModernize spam section in Gnus manual slightly
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.

2 years ago; * doc/misc/url.texi: Don't mention obsolete library url-ns.
Stefan Kangas [Tue, 16 Aug 2022 08:08:39 +0000 (10:08 +0200)]
; * doc/misc/url.texi: Don't mention obsolete library url-ns.

2 years ago* doc/misc/gnus.texi (Article Washing): Fix Links URL.
Stefan Kangas [Tue, 16 Aug 2022 06:08:36 +0000 (08:08 +0200)]
* doc/misc/gnus.texi (Article Washing): Fix Links URL.

2 years agoDelete implicit XEmacs references from Gnus manual
Stefan Kangas [Tue, 16 Aug 2022 06:03:22 +0000 (08:03 +0200)]
Delete implicit XEmacs references from Gnus manual

* doc/misc/gnus.texi (Group Buffer Format, Summary Buffer, RSS):
Delete some implicit references to XEmacs.
(RSS): Fix default value.

2 years agoMake the bookmark fringe icon look like a bookmark
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.

* doc/lispref/customize.texi (Simple Types): Document 'fringe-bitmap'
type.

* doc/lispref/display.texi (Fringe Bitmaps): Mention 'large-circle'.

* etc/NEWS: Announce this change (bug#56896).

2 years agoFix non-interactive use of conditionals in Eshell
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.

* test/lisp/eshell/esh-cmd-tests.el (esh-cmd-test/if-statement,
(esh-cmd-test/if-else-statement)
(esh-cmd-test/if-else-statement-lisp-form)
(esh-cmd-test/if-else-statement-lisp-form-2)
(esh-cmd-test/if-else-statement-ext-cmd)
(esh-cmd-test/unless-statement)
(esh-cmd-test/unless-else-statement)
(esh-cmd-test/unless-else-statement-lisp-form)
(esh-cmd-test/unless-else-statement-ext-cmd): Use
'eshell-command-result-equal'.

2 years agoAdd 'eshell-command-result-equal' with an ERT explainer
Jim Porter [Sun, 14 Aug 2022 20:44:04 +0000 (13:44 -0700)]
Add 'eshell-command-result-equal' with an ERT explainer

* test/lisp/eshell/eshell-tests-helpers.el
(eshell-command-result--equal, eshell-command-result--equal-explainer)
(eshell-command-result-equal): New functions.

* test/lisp/eshell/em-basic-tests.el
* test/lisp/eshell/em-dirs-tests.el
* test/lisp/eshell/esh-cmd-tests.el
* test/lisp/eshell/esh-proc-tests.el
* test/lisp/eshell/esh-var-tests.el
* test/lisp/eshell/eshell-tests.el: Use 'eshell-command-result-equal'.

2 years agoProvide ERT explainer for 'eshell-match-command-output'
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.

* test/lisp/eshell/em-alias-tests.el
* test/lisp/eshell/em-dirs-tests.el
* test/lisp/eshell/em-extpipe-tests.el
* test/lisp/eshell/em-script-tests.el
* test/lisp/eshell/esh-cmd-tests.el
* test/lisp/eshell/esh-proc-tests.el
* test/lisp/eshell/esh-var-tests.el
* test/lisp/eshell/eshell-tests-helpers.el
* test/lisp/eshell/eshell-tests.el: Use 'eshell-match-command-output'.

2 years agoAvoid lowering child frames below scroll bars on X
Po Lu [Tue, 16 Aug 2022 01:30:08 +0000 (09:30 +0800)]
Avoid lowering child frames below scroll bars on X

* src/xterm.c (x_lower_frame_1): New function.
(x_lower_frame): Avoid calling XLowerFrame when there is a
parent with scroll bars.

2 years ago* doc/misc/gnus.texi (Troubleshooting): Update section.
Stefan Kangas [Tue, 16 Aug 2022 00:39:27 +0000 (02:39 +0200)]
* doc/misc/gnus.texi (Troubleshooting): Update section.