1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-27 07:41:28 -08:00
Commit graph

159205 commits

Author SHA1 Message Date
Stefan Kangas
0b43ed4dbc ; * 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.
2022-08-18 19:22:48 +02:00
Stefan Kangas
f97668c38f 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
2022-08-18 19:21:32 +02:00
Stefan Kangas
ef1e68f11d * lisp/image-mode.el (image-mode-as-hex): Fix toggle instructions. 2022-08-18 18:43:29 +02:00
Michael Albinus
f98276f77b Fix encoding problem in tramp-sh.el
* lisp/net/tramp-sh.el (tramp-sh-handle-file-local-copy):
Compute inline coding only if needed.
2022-08-18 18:30:35 +02:00
Stefan Monnier
ca7c278e32 * doc/misc/cl.texi (Macro Bindings): Fix bug#57263
Update `cl-symbol-macrolet` according to the change in response to bug#26073.
2022-08-18 12:28:45 -04:00
Stefan Kangas
dc0fce3a7d ; lisp/image-mode.el: Fix typo. 2022-08-18 17:50:13 +02:00
Stefan Kangas
254ba1d3e5 * lisp/image-mode.el: Improve commentary. 2022-08-18 17:43:30 +02:00
Mattias Engdegård
1ad0d60740 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.
2022-08-18 17:25:41 +02:00
Andrea Corallo
67ec994180 * lisp/emacs-lisp/comp.el (comp-known-type-specifiers): Fix some type 2022-08-18 17:11:59 +02:00
Mattias Engdegård
9361c83318 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).
2022-08-18 17:10:46 +02:00
Mattias Engdegård
f33a429a53 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.
2022-08-18 17:10:46 +02:00
Eli Zaretskii
e75822fba6 ; Fix a typo in autoload.el
* lisp/obsolete/autoload.el (update-directory-autoloads): Fix
obsolescence version.  (Bug#57276)
2022-08-18 16:30:32 +03:00
kobarity
b9c6c0fb7b 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).
2022-08-18 15:16:08 +02:00
Lars Ingebrigtsen
74e830768d 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.
2022-08-18 15:12:55 +02:00
Colin Woodbury
ac43ac1af9 cl-reduce doc string improvement
* lisp/emacs-lisp/cl-seq.el (cl-reduce): Explain what happens when
using :from-end (bug#57273).
2022-08-18 15:07:08 +02:00
Gerd Möllmann
6d38ff1b9e 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.
2022-08-18 14:44:18 +02:00
Stefan Kangas
335bf5f55a Improve update-directory-autoloads deprecation message
* lisp/obsolete/autoload.el (update-directory-autoloads): Improve
deprecation message.  (Bug#57276)
2022-08-18 13:36:46 +02:00
Stefan Kangas
dae4fc3adf 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.
2022-08-18 13:19:42 +02:00
Andrea Corallo
842c641c57 * lisp/loadup.el: Always fix-up all loaded compilation units 2022-08-18 11:03:25 +02:00
Andrea Corallo
aea05a5dec * 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.
2022-08-18 11:03:25 +02:00
Po Lu
9f26a8d31b 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.
2022-08-18 14:24:43 +08:00
Paul Eggert
7406ae4c98 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.
2022-08-17 23:12:55 -07:00
Stefan Kangas
9a3f64f406 ; Merge from origin/emacs-28
The following commit was skipped:

21751f02d3 Backport tempname changes from master (bug#57129)
2022-08-18 06:30:28 +02:00
Paul Eggert
21751f02d3 Backport tempname changes from master (bug#57129)
* lib/tempname.c: Backport from master, which uses current Gnulib.
2022-08-17 20:31:39 -07:00
Po Lu
d0e126b6ed ; * src/xterm.c (xi_select_hierarchy_events): Fix typo. 2022-08-18 10:32:49 +08:00
Po Lu
79050eeeaf ; * src/xterm.c (xi_select_hierarchy_events): Fix typo. 2022-08-18 10:32:24 +08:00
Paul Eggert
b6b1911080 Update from Gnulib by running admin/merge-gnulib 2022-08-17 18:51:34 -07:00
Andrea Corallo
3e042c80ce * lisp/emacs-lisp/bytecomp.el (byte-compile-log-1): Create buffer if necessary 2022-08-17 23:35:46 +02:00
Alan Mackenzie
f0c5de7839 * lisp/progmodes/cc-defs.el (c-safe-scan-lists): Evaluate LIMIT just once 2022-08-17 20:34:43 +00:00
Basil L. Contovounesios
31f289625c 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.
2022-08-17 20:11:25 +03:00
Stefan Kangas
78460500c7 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.
2022-08-17 16:28:37 +02:00
Stefan Kangas
9dfabe0756 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.
2022-08-17 16:22:29 +02:00
Stefan Kangas
a6412b96e7 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.
2022-08-17 16:21:09 +02:00
Stefan Kangas
d214dd67cd Make compat function cperl-putback-char obsolete
* lisp/progmodes/cperl-mode.el (cperl-putback-char): Make
obsolete.  Update callers.
2022-08-17 16:09:31 +02:00
Stefan Kangas
8d4fe8356c * lisp/progmodes/cperl-mode.el: Improve commentary. 2022-08-17 16:02:59 +02:00
Stefan Kangas
6ad79488c9 ; Delete code in cperl-mode.el commented out since 1997
* lisp/progmodes/cperl-mode.el (cperl-menu): Delete some code
commented out since 1997.
2022-08-17 15:55:38 +02:00
Stefan Kangas
1288955d50 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.
2022-08-17 15:48:43 +02:00
Brendan O'Dea
deddd56e35 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.
2022-08-17 13:20:15 +02:00
kobarity
4915ca5dd4 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'.
2022-08-17 13:10:16 +02:00
Lars Ingebrigtsen
31e3221267 Revert "Add Python blocks support for hideshow"
This reverts commit af4cfb5194.

This led to test failures.
2022-08-17 13:09:39 +02:00
Stefan Kangas
a631067fba 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.
2022-08-17 12:52:56 +02:00
kobarity
af4cfb5194 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).
2022-08-17 12:44:56 +02:00
Stefan Kangas
8f784a2766 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.
2022-08-17 06:30:25 +02:00
Po Lu
ed9adafc0b 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.
2022-08-17 10:20:25 +08:00
Stefan Monnier
b24f7667ad * src/buffer.c (Frename_buffer): Fix bug#56693 2022-08-16 17:29:26 -04:00
Mattias Engdegård
8517d1e9aa * lisp/dired.el (dired-mark-if): Evaluate MSG once to avoid warning. 2022-08-16 20:44:50 +02:00
Mattias Engdegård
fb98c4a406 Improved null (alias not) optimisation
Take static boolean information of the argument into account.

* lisp/emacs-lisp/byte-opt.el (byte-optimize-not): New.
2022-08-16 20:44:50 +02:00
Mattias Engdegård
621550c076 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.
2022-08-16 20:44:50 +02:00
Mattias Engdegård
e618b6faee 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.
2022-08-16 20:44:50 +02:00
Mattias Engdegård
869db699ee 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.
2022-08-16 20:44:50 +02:00