Commit graph

9567 commits

Author SHA1 Message Date
Stefan Kangas
a579739e2b Make XEmacs compat aliases for timers obsolete
* lisp/emacs-lisp/timer.el (disable-timeout, add-timeout): Make
XEmacs compat aliases obsolete.  Update all callers.
2023-08-08 04:53:08 +02:00
Stefan Kangas
b48793253b Make Emacs 21 compat aliases easy-mmode-* obsolete
* lisp/emacs-lisp/easy-mmode.el (easy-mmode-define-minor-mode)
(easy-mmode-define-global-mode): Make Emacs 21 compatibility aliases
obsolete.
* doc/lispref/loading.texi (Autoload):
* doc/lispref/modes.texi (Defining Minor Modes): Don't document
above obsolete aliases.
2023-08-08 04:03:17 +02:00
Po Lu
072a8a434e Merge remote-tracking branch 'origin/master' into feature/android 2023-08-07 07:56:44 +08:00
Stefan Kangas
18e7bc8752 Mark Emacs 21 compat aliases lm-*-mark obsolete
* lisp/emacs-lisp/lisp-mnt.el (lm-section-mark, lm-code-mark)
(lm-commentary-mark, lm-history-mark): Mark Emacs 21 compatibility
aliases obsolete.  Update all callers to use the new name.
2023-08-06 20:39:10 +02:00
Po Lu
7ffc5f86e4 Merge remote-tracking branch 'origin/master' into feature/android 2023-08-06 21:45:44 +08:00
Eli Zaretskii
16205e8db6 ; Improve help-echo in package.el
* lisp/emacs-lisp/package.el (package-menu-mode-menu): Improve
help-echo descriptions.  (Bug#65094)
2023-08-06 10:02:11 +03:00
Arash Esbati
a95e700698 ; Filter packages available for upgrade via menu bar
* lisp/emacs-lisp/package.el (package-menu-mode-menu): Add entry
to filter packages available for upgrade via menu bar.  (bug#65094)
2023-08-06 09:42:57 +03:00
Jim Porter
0a6a25320e Merge from origin/emacs-29
1e8322bb26 Fix handling of 'byte-compile-ignore-files' when nil
2023-08-05 21:26:14 -07:00
Po Lu
2867f62484 Merge remote-tracking branch 'origin/master' into feature/android 2023-08-06 07:38:10 +08:00
Jim Porter
1e8322bb26 Fix handling of 'byte-compile-ignore-files' when nil
Before this fix, when 'byte-compile-ignore-files' was nil,
'byte-recompile-directory' would ignore every file (bug#64985).

* lisp/emacs-lisp/bytecomp.el (byte-recompile-directory): Handle case
when 'byte-compile-ignore-files' is nil.
2023-08-05 10:14:15 -07:00
Michael Albinus
479c0543b6 Merge from origin/emacs-29
f2b2c752a5 Fix documentation of saveplace facilities for Dired
4ed9d61c89 ; * lisp/tab-bar.el: Autoload cl--set-substring, as that ...
30976ecd8d ; * lisp/bindings.el (mode-line-modes): Fix typo (bug#650...
8574ef314c Fix loaddef generation with ";;;foo-autoload" cookies in ...
8cbd4a02a2 Delete comment saying that project.el is experimental
2023-08-05 18:18:30 +02:00
Po Lu
a5bbc51f47 Merge remote-tracking branch 'origin/master' into feature/android 2023-08-05 09:06:04 +08:00
Jim Porter
8574ef314c Fix loaddef generation with ";;;foo-autoload" cookies in external packages
This caused an issue where package-specific autoload cookies weren't
being correctly recognized, so they got dumped into the package's main
"<pkg>-autoloads.el" file, instead of "<pkg>-loaddefs.el" as they
should (bug#65023).

* lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate--parse-file):
Save match data when checking syntax.
2023-08-04 11:01:31 -07:00
Mattias Engdegård
44d7fd3805 Don't allow the eq and unbind byte-ops to commute (bug#65017)
* lisp/emacs-lisp/byte-opt.el (byte-after-unwind-ops):
Cease sinking `eq` past `unwind`, because that optimised away the
let-binding in

  (let ((symbols-with-pos-enabled nil))
    (eq x y))

and `eq` is currently sensitive to `symbols-with-pos-enabled`.
* test/lisp/emacs-lisp/bytecomp-tests.el
(bytecomp--eq-symbols-with-pos-enabled): New test.
2023-08-04 11:08:57 +02:00
Eli Zaretskii
54d7426428 Merge from origin/emacs-29
6eddbfe33f Clarify the meaning of the argument of ':align-to' space ...
5c6a51668b ; * doc/misc/eshell.texi (Argument Modifiers): Fix typo i...
da5e05a50e Fix handling of ".elpaignore" file when compiling packages
2023-08-04 03:17:50 -04:00
Eli Zaretskii
23f4999989 Merge from origin/emacs-29
0c29f53ab8 Fix 'string-pixel-width' under 'line-prefix'
7bbd7cae07 Fix find-dired-with-command for remote directories
c4a8572025 ; * etc/HISTORY: Fix Emacs 28.3 entry.
2023-08-04 03:17:49 -04:00
Stefan Monnier
27ed565ec6 * lisp/emacs-lisp/advice.el (defadvice): Mark as obsolete 2023-08-03 23:41:11 -04:00
Po Lu
60dda3105c Merge remote-tracking branch 'origin/master' into feature/android 2023-08-03 08:25:47 +08:00
Stefan Kangas
0910230be6 ; Prefer HTTPS to HTTP in more links 2023-08-02 23:32:28 +02:00
Stefan Kangas
9fe1bebd13 Add let-alist to alist shortdoc group
* lisp/emacs-lisp/shortdoc.el (alist): Add let-alist.
2023-08-02 21:49:19 +02:00
Mattias Engdegård
ece5ace4a5 rx: better not-wordchar and (syntax word) translation
* lisp/emacs-lisp/rx.el:
Add tables of legacy syntax.
(rx--translate-symbol):
Translate the legacy construct `not-wordchar` as (not wordchar), which
is more intuitively obvious.
* lisp/emacs-lisp/rx.el (rx--translate-syntax):
Generate the shorter \w and \W instead of \sw and \Sw.
* test/lisp/emacs-lisp/rx-tests.el (rx-atoms, rx-syntax, rx-not):
Adapt tests.
2023-08-02 18:32:54 +02:00
Mattias Engdegård
d167888c5b rx performance improvements
* lisp/emacs-lisp/rx.el (rx--generate-alt):
Treat the intervals and classes lists separately without joining,
to reduce allocation.  Handle special cases first.
(rx--union-intervals):
Implement directly instead of using intersection and complement.
* test/lisp/emacs-lisp/rx-tests.el (rx-any): Adapt test, as some
character alternatives are now slightly different.
(rx--complement-intervals, rx--union-intervals)
(rx--intersect-intervals): New unit tests.
2023-08-02 18:28:23 +02:00
Mattias Engdegård
cda4396ade ; * lisp/emacs-lisp/shortdoc.el (list): Move misplaced remq entry 2023-08-02 11:21:37 +02:00
Jim Porter
da5e05a50e Fix handling of ".elpaignore" file when compiling packages
* lisp/emacs-lisp/bytecomp.el (byte-recompile-directory): Treat
'byte-compile-ignore-files' as a list of regexps per its docstring
(bug#64985).
2023-08-01 18:14:35 -07:00
Po Lu
f705259987 Merge remote-tracking branch 'origin/master' into feature/android 2023-08-02 08:10:59 +08:00
Mattias Engdegård
ea0685e039 ; * lisp/emacs-lisp/package.el: doc string copy-edit 2023-08-01 19:27:28 +02:00
Eli Zaretskii
0c29f53ab8 Fix 'string-pixel-width' under 'line-prefix'
* lisp/emacs-lisp/subr-x.el (string-pixel-width): Disable
'line-prefix' and 'wrap-prefix' to avoid their effect on the
calculated string width.  (Bug#64971)
2023-07-31 21:50:45 +03:00
Po Lu
2ad50c7ff5 Merge remote-tracking branch 'origin/master' into feature/android 2023-07-31 08:42:03 +08:00
Mattias Engdegård
2b8796eea1 Fix rx wrong-code bug: ranges starting with ^
(rx (in (?^ . ?a))) was incorrectly translated to "[^-a]".
Change it so that we get "[_-a^]" instead.

* lisp/emacs-lisp/rx.el (rx--generate-alt): Split ranges starting with
`^` occurring first in a non-negated character alternative.
* test/lisp/emacs-lisp/rx-tests.el (rx-any): Add and adapt tests.

(cherry picked from commit 5f5d668ac7)
2023-07-30 18:12:19 +02:00
Mattias Engdegård
5f5d668ac7 Fix rx wrong-code bug: ranges starting with ^
(rx (in (?^ . ?a))) was incorrectly translated to "[^-a]".
Change it so that we get "[_-a^]" instead.

* lisp/emacs-lisp/rx.el (rx--generate-alt): Split ranges starting with
`^` occurring first in a non-negated character alternative.
* test/lisp/emacs-lisp/rx-tests.el (rx-any): Add and adapt tests.
2023-07-30 17:53:14 +02:00
Earl Hyatt
19777b7c86 Allow default values in 'map-let' and the pcase 'map' form
* lisp/emacs-lisp/map.el (map-let, map)
(map--make-pcase-bindings): Add a third argument for specifying a
default value, like in 'map-elt'. (Bug#49407)

* lisp/emacs-lisp/map.el (map--make-pcase-bindings): Clarify that keys
that aren't found aren't ignored, they actually get the value
nil (unless the new default value is given).  The overall pattern can
still fail to match if the sub-pattern for the unfound key doesn't
match nil.

* test/lisp/emacs-lisp/map-tests.el (test-map-let-default)
(test-map-plist-pcase-default, test-map-pcase-matches): Add tests,
including for the above item.
2023-07-30 15:20:27 +02:00
Po Lu
7c08995864 Merge remote-tracking branch 'origin/master' into feature/android 2023-07-28 08:22:01 +08:00
Mattias Engdegård
4336d7e44a * lisp/emacs-lisp/byte-opt.el (byte-compile-trueconstp): Extend
Add skip-chars-forward, skip-chars-backward, skip-syntax-forward,
skip-syntax-backward, current-column, current-indentation,
char-syntax, syntax-class-to-char, parse-partial-sexp, goto-char,
forward-line, next-window, previous-window, minibuffer-window,
selected-frame, selected-window, standard-case-table,
standard-syntax-table, syntax-table, frame-first-window,
frame-root-window and frame-selected-window as always-true functions.
2023-07-27 17:09:30 +02:00
Mattias Engdegård
93eccb5e04 Better compilation of char-before, backward-char and backward-word
Implement char-before, backward-char and backward-word as compiler
macros instead of byte-compile handlers so that the source-level
optimiser gets to simplify the result.  In particular, this removes
some branches.

* lisp/emacs-lisp/bytecomp.el (byte-compile-char-before)
(byte-compile-backward-char, byte-compile-backward-word): Remove.
(bytecomp--char-before, bytecomp--backward-char)
(bytecomp--backward-word): New.
2023-07-27 17:09:30 +02:00
Po Lu
24711be050 Merge remote-tracking branch 'origin/master' into feature/android 2023-07-27 17:14:58 +08:00
Mattias Engdegård
27944247d1 Fix broken byte-compilation of unary comparisons
* lisp/emacs-lisp/byte-opt.el (byte-opt--nary-comparison):
Fix a typo causing miscompilation of code such as (OP X),
where OP is <, >, <=, >= or =.
* test/lisp/emacs-lisp/bytecomp-tests.el
(bytecomp-tests--test-cases): Add test case.

Reported by Richard Copley.
2023-07-26 18:49:51 +02:00
Mattias Engdegård
b4063c399b * lisp/emacs-lisp/byte-opt.el (pure-fns): Add max-char 2023-07-26 17:34:03 +02:00
Neal Sidhwaney
8abe4ca83a Add 'define-error' to font lock keywords for emacs-lisp-mode
* lisp/emacs-lisp/lisp-mode.el (lisp-fdefs): Add 'define-error'.
(Bug#64824)

* test/lisp/emacs-lisp/lisp-mode-tests.el
(test-font-lock-keywords): New test.

Copyright-paperwork-exempt: yes
2023-07-26 17:22:05 +03:00
Brian Leung
bcadb728e2 lisp-mode.el: Add defvar-keymap to lisp-imenu-generic-expression
* lisp/emacs-lisp/lisp-mode.el (lisp-imenu-generic-expression):
Add defvar-keymap.  We do not ignore (defvar-keymap FOO)
constructs in imenu as we do with (defvar FOO) since the former
constructs are generally not vacuous whereas the latter ones
often are.  (Bug#64831)
2023-07-26 17:14:46 +03:00
Po Lu
95db5042d5 Merge remote-tracking branch 'origin/master' into feature/android 2023-07-22 07:59:17 +08:00
Stefan Monnier
ca4bc9baf9 macroexp.el: Fix missing warning for intermediate expansions
When a macro expanded to a call to an obsolete macro, we failed
to emit a warning for that use of the obsolete macro.

* lisp/emacs-lisp/macroexp.el (macroexp-macroexpand):
Use `macroexpand-1` to check obsolecence of intermediate expansions.

* test/lisp/emacs-lisp/macroexp-tests.el
(macroexp--test-obsolete-macro): New test.
2023-07-21 11:48:42 -04:00
Po Lu
7196d2d18e Merge remote-tracking branch 'origin/master' into feature/android 2023-07-20 19:52:01 +08:00
Po Lu
f9bbe3189b Merge from origin/emacs-29
4bd8e8c6d2 ; * src/xdisp.c: Fix wording in commentary.
3af27a4b81 Improve commentary in nsfns.m
5de5e4b4d0 Fix typos and ommissions in cus-edit.el
9d93c6ba14 ; * src/xdisp.c: Fix typos in the commentary.
86f2d6d62f ; * src/xdisp.c: Improve commentary.  (Bug#64596)
ac075176bf ; * admin/notes/bugtracker: Fix punctuation.
8151853447 ; * admin/notes/bugtracker: Use 'e.g.' throughout the doc...
f063f79a49 Convert NUL-containing NSString objects to Lisp strings c...
d172cd5985 ; * doc/lispref/keymaps.texi (Modifying Menus): Add cross...
927e8b470f ; * doc/lispref/keymaps.texi (Extended Menu Items): Add @...
77f489421e ; * src/xdisp.c: Minor improvements of the commentary.
ce3f9fba1a ; Improve accuracy of out-out-order message insertion
17073af84d ; Improve robustness of package-report-bug
2023-07-20 19:50:45 +08:00
Po Lu
4d3442ebad Merge remote-tracking branch 'origin/master' into feature/android 2023-07-20 09:23:06 +08:00
Alan Mackenzie
f9f9c95ab5 Fix native compilation in dynamically bound files.
This fixes bug#64642.

* lisp/emacs-lisp/comp.el (comp-spill-lap-function/symbol): Add
code for dynamically bound functions.

* test/src/comp-tests.el (comp-tests-result-lambda): New test.

* test/src/comp-resources/comp-test-funcs-dyn2.el: New test
file.

# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
#
# On branch master
# Your branch is up to date with 'origin/master'.
#
# Changes to be committed:
#	modified:   lisp/emacs-lisp/comp.el
#	new file:   test/src/comp-resources/comp-test-funcs-dyn2.el
#	modified:   test/src/comp-tests.el
#
# Changes not staged for commit:
#	modified:   .gitignore
#
# Untracked files:
#	.gitignore.acm
#	.gitignore.backup
#	.timestamps.txt
#	2021-01-03.err
#	2021-01-06.err
#	2021-12-16.make
#	2021-12-30.err
#	2021-12-31.err
#	2022-01-01.err
#	2022-01-02.check.err
#	2022-01-02.err
#	2022-01-04.err
#	2022-01-05.err
#	2022-01-06.err
#	2022-01-07.err
#	2022-01-07.outerr
#	2022-01-08.err
#	2022-01-09.err
#	2022-01-09b.err
#	2022-01-10.err
#	2022-01-11
#	2022-01-11.err
#	2022-02-22.err
#	2022-02-22.outerr
#	checkout.20220228.out
#	checkout.20220301.out
#	checkout.20220302.out
#	doc/lispref/syntax.20160318.techsi
#	doc/lispref/syntax.20160318b.techsi
#	lib/.deps/
#	lisp/2022-01-09.err
#	lisp/emacs-lisp/comp.el.rej
#	src/2021-12-20.err
#	src/globals.20211124.aitch
#	src/lisp.20211127.aitch
#	test/lisp/calendar/icalendar-tests.elcr5m9Wq
#
2023-07-19 11:26:11 +00:00
Po Lu
324d66e390 Merge remote-tracking branch 'origin/master' into feature/android 2023-07-18 08:09:01 +08:00
Mattias Engdegård
157e735ce8 Don't distort character ranges in rx translation
The Emacs regexp engine interprets character ranges from ASCII to raw
bytes, such as [a-\xfe], as not including non-ASCII Unicode at all;
ranges from non-ACII Unicode to raw bytes, such as [ü-\x91], are
ignored entirely.

To make rx produce a translation that works as intended, split ranges
that that go from ordinary characters to raw bytes. Such ranges may
appear from set manipulation and regexp optimisation.

* lisp/emacs-lisp/rx.el (rx--generate-alt): Split intervals that
straddle the char-raw boundary when rendering a string regexp from an
interval set.
* test/lisp/emacs-lisp/rx-tests.el (rx-char-any-raw-byte):
Add test cases.
2023-07-17 17:56:54 +02:00
Po Lu
d78d7aa783 Merge remote-tracking branch 'origin/master' into feature/android 2023-07-16 08:18:13 +08:00
Spencer Baugh
17073af84d ; Improve robustness of package-report-bug
* lisp/emacs-lisp/package.el (package-report-bug): Do not assume that
every entry in 'custom-current-group-alist' has a non-nil entry for a
filename.

It is possible for a group to not be associated with any file, e.g. when
a 'defgroup' form is evaluated using 'eval-expression'.  (bug#64543)
2023-07-16 00:27:40 +02:00
Eli Zaretskii
748d2ed515 Merge from origin/emacs-29
7ac947f34c ; * src/lisp.h (struct Lisp_Overlay): Update commentary (...
9bc93c7996 Replace duplicate text from epa.texi by a reference
74cc1d27f1 Add basic usage information and fix references
f24bdbfaf5 Add concept index, title-case structure titles
0165b50b0f ; * lisp/emacs-lisp/lisp.el (raise-sexp): Fix typo in doc...
4cf33b6bd0 ; * doc/misc/modus-themes.org: Fix whitespace (bug#64548).
4821da1ad7 Fix show-paren-mode when the parentheses is partially vis...
419b4d4491 ; Improve documentation of with-restriction
be34e8294a ; * admin/git-bisect-start: Update failing commits
8e06809fcc Merge branch 'scratch/bug64391' into emacs-29
dbac807605 * lisp/net/tramp.el (tramp-get-buffer-string): Stabilize.
01fb898420 Simplify after adding internal function to enter a labele...
b741dc7fcd Add internal function to enter a labeled restriction

# Conflicts:
#	doc/misc/modus-themes.org
2023-07-15 05:30:14 -04:00