Eli Zaretskii
0273914921
Merge from origin/emacs-29
...
bc56da92d8
; Fix error in 'tex-recenter-output-buffer'
d17c5adc05
Fix regexp for recognizing PBM images
9e9f61866e
Improve wording in ELisp manual
7427efa033
Fix typo (Bug#65764)
59c6624408
; * lisp/ido.el (ido-completion-buffer): Fix :type (bug#6...
4ec4b18c2a
Fix libgccjit build on Haiku
80bdcf8f35
(regexp-tests-backtrack-optimization): Mark it as failing
8a9e653cc8
; Add regression test for bug#65726
6fad73d7cc
* src/regex-emacs.c (mutually_exclusive_p): Fix inf-loop ...
1d3d419607
; * lisp/files.el (save-some-buffers-functions): Doc fix ...
42b14c6e5b
Bump seq version to 2.24
ff5190a174
Add note on ELPA to admin/notes/bug-triage
f1e4cbe72a
; * etc/PROBLEMS: Minor wording fix.
fd5593c7f2
* etc/PROBLEMS: Mention bug#65432 and its remedy.
dd896ea1e6
Ignore errors when checking for object initializers (bug#...
3550f44c17
; Fix typos
5b246b9b81
* CONTRIBUTE: Document making ChangeLogs with Magit.
0bd4661941
Doc fixes for obsolete functions and variables
524c0c34f2
; * lisp/ffap.el (ffap-rfs-regexp): Fix :type (bug#65698).
f48dccc467
Merge branch 'emacs-29' of git.savannah.gnu.org:/srv/git/...
71a85e2266
A revision to the Widget manual
dbbcf4a659
Fix fontification of " in edit-kbd-macro
# Conflicts:
# test/src/regex-emacs-tests.el
2023-09-09 04:32:45 -04:00
Stefan Kangas
331dee7e4a
Add note regarding seq
on GNU ELPA
...
* lisp/emacs-lisp/seq.el: Add note regarding seq on GNU ELPA.
Co-authored-by: Stefan Monnier <monnier@iro.umontreal.ca>
2023-09-07 23:57:20 +02:00
Stefan Kangas
42b14c6e5b
Bump seq version to 2.24
...
* lisp/emacs-lisp/seq.el: Bump version to 2.24. (Bug#60990)
2023-09-04 17:29:04 +02:00
Eli Zaretskii
cae528457c
; Add 2023 to copyright years.
2023-01-01 05:31:12 -05:00
Eli Zaretskii
43cca14a9e
; * lisp/emacs-lisp/seq.el (seq-filter): Fix typo in doc string.
2022-11-17 08:48:14 +02:00
Eli Zaretskii
3b137bcbe8
; Improve doc strings in seq.el
...
* lisp/emacs-lisp/seq.el (seq-doseq, seq-setq, seq-elt)
(seq-length, seq-rest, seq-do, seq-mapn, seq-drop, seq-take)
(seq-drop-while, seq-take-while, seq-sort, seq-sort-by)
(seq-concatenate, seq-into, seq-filter, seq-remove)
(seq-remove-at-position, seq-every-p, seq-some, seq-find)
(seq-count, seq-contains, seq-contains-p, seq-set-equal-p)
(seq-position, seq-positions, seq-uniq, seq-mapcat)
(seq-partition, seq-union, seq-intersection, seq-difference)
(seq--count-successive, seq--elt-safe, seq-random-elt)
(seq-split, seq-keep): Doc fixes.
2022-11-15 19:36:49 +02:00
Lars Ingebrigtsen
92df7cd923
Add 'seq-keep'
...
* doc/lispref/sequences.texi (Sequence Functions): Document it.
* lisp/emacs-lisp/seq.el (seq-keep): New function (bug#58278).
2022-10-04 21:44:52 +02:00
Damien Cassou
4751b51d5e
Add new function `seq-positions'
...
* doc/lispref/sequences.texi (Sequence Functions): Document it.
* lisp/emacs-lisp/seq.el (seq-positions): New function.
* lisp/emacs-lisp/shortdoc.el (sequence): Mention it.
* test/lisp/emacs-lisp/seq-tests.el (test-seq-positions): Test it
(bug#57548).
2022-09-04 13:21:59 +02:00
Damien Cassou
2db8b0e12f
Add new function `seq-remove-at-position'
...
* doc/lispref/sequences.texi (Sequence Functions): Document it.
* lisp/emacs-lisp/seq.el (seq-remove-at-position): New function.
* lisp/emacs-lisp/shortdoc.el (sequence): Mention it.
* test/lisp/emacs-lisp/seq-tests.el (test-seq-remove-at-position):
Test it.
2022-09-04 13:07:18 +02:00
Damien Cassou
77b761dafa
Improve documentation of several functions in seq.el
...
* doc/lispref/sequences.texi (Sequence Functions):
* lisp/emacs-lisp/seq.el (seq-contains):
(seq-contains-p):
(seq-set-equal-p):
(seq-position):
(seq-union):
(seq-intersection):
(seq-difference): Use more standard wording in the docstrings
(bug#57561).
2022-09-04 13:00:22 +02:00
Mattias Engdegård
99a5a72537
lisp/emacs-lisp/seq.el: remove unnecessary compatibility code
...
* lisp/emacs-lisp/seq.el (seq-take, seq--activate-font-lock-keywords):
Simplify unnecessarily guarded code, as this file will only ever be
used with the same version of Emacs.
2022-09-03 17:59:42 +02:00
Lars Ingebrigtsen
c0d761bf7f
Further seq-uniq speed-ups for lists
...
* lisp/emacs-lisp/seq.el (seq-uniq): Speed up more for long lists
(bug#57079).
2022-08-12 15:16:39 +02:00
Lars Ingebrigtsen
5269842833
Add a faster seq-uniq for lists
...
* lisp/emacs-lisp/seq.el (seq-uniq): Add a faster method for lists
(bug#57079).
2022-08-09 19:21:36 +02:00
Mattias Engdegård
6f7941272b
Speed up seq-subseq
for lists (bug#56521)
...
* lisp/emacs-lisp/seq.el (seq-subseq):
Make faster by using `take` instead of a lisp loop,
and more importantly by not front-loading the error text formatting.
* test/lisp/emacs-lisp/seq-tests.el (seq-tests--list-subseq-ref)
(test-seq-subseq): Test `seq-subseq` for lists more thoroughly.
2022-07-18 12:49:29 +02:00
Mattias Engdegård
5ad8f3e570
Use take
where clearly safe to do so (bug#56521)
...
* lisp/emacs-lisp/seq.el (seq-take):
* lisp/auth-source.el (auth-source-secrets-search)
(auth-source-plstore-search):
* lisp/gnus/message.el (message-insert-formatted-citation-line):
* lisp/net/dbus.el (dbus-unregister-object):
* lisp/replace.el (occur-context-lines):
* test/src/print-tests.el (print-circular): Replace hand-written loop
or `butlast` call with `take` for clarity, performance and validation.
We have the equivalence
(take N LIST) = (butlast LIST (- (length LIST) N)).
2022-07-18 12:49:29 +02:00
Lars Ingebrigtsen
b31680ef04
Add new function `seq-split'
...
* doc/lispref/sequences.texi (Sequence Functions): Document it.
* lisp/emacs-lisp/seq.el (seq-split): New function.
* lisp/emacs-lisp/shortdoc.el (sequence): Mention it.
2022-07-03 12:55:00 +02:00
Lars Ingebrigtsen
0c784a483f
Update seq.el comment
...
* lisp/emacs-lisp/seq.el: Update comment.
2022-06-24 11:15:19 +02:00
Stefan Monnier
6cb6886840
cl-generic: Rework obsolescence checks for defmethod
...
* lisp/emacs-lisp/cl-generic.el (cl-defgeneric): Silence obsolescence
warnings in the included methods.
(cl-defmethod): Reuse standard obsolescence checks.
* lisp/emacs-lisp/seq.el (seq-contains): Remove redundant
`with-suppressed-warnings`.
2022-04-01 10:02:32 -04:00
Stefan Monnier
81bcad03e9
(seq-contains-p): Refine the non-nil returned value
...
* lisp/emacs-lisp/seq.el (seq-contains-p): Like `cl-some` return the
value returned by the test function rather than t.
2022-03-17 09:54:41 -04:00
Stefan Monnier
d67ca6739c
* lisp/emacs-lisp/seq.el (seq-concatenate): Accept non-sequencep
sequences
2022-03-07 09:59:43 -05:00
Eli Zaretskii
19dcb237b5
; Add 2022 to copyright years.
2022-01-01 02:45:51 -05:00
Lars Ingebrigtsen
b4b4cc98ac
Revert "Obsolete local set difference functions in favor of seq-difference"
...
This reverts commit 20f7fa691b
.
gnus-set-difference is orders of magnitude faster than seq-difference
(on these sets), and using seq-difference makes nnimap too
slow.
2021-09-29 17:28:02 +02:00
Stefan Kangas
c78e16962e
; Adjust overly long docstrings to fit 80 characters
2021-09-26 13:23:57 +02:00
Stefan Kangas
c92444b4ba
; Bump seq version to 2.23
2021-09-25 21:44:55 +02:00
Stefan Kangas
35d0675467
Prefer seq-random-elt to nth+random
...
* lisp/emacs-lisp/seq.el (seq-random-elt): Autoload.
* lisp/avoid.el (mouse-avoidance-random-shape):
* lisp/epa-ks.el (epa-ks--query-url):
* lisp/erc/erc-networks.el (erc-server-select):
* lisp/gnus/gnus-fun.el (gnus--random-face-with-type)
(gnus-fun-ppm-change-string):
* lisp/net/soap-inspect.el (soap-sample-value-for-xs-simple-type):
* lisp/obsolete/landmark.el (landmark-random-move):
* lisp/play/mpuz.el (mpuz-build-random-perm):
* lisp/play/zone.el (zone-pgm-stress):
* lisp/vc/add-log.el (add-change-log-entry):
* test/lisp/net/tramp-tests.el
(tramp-test44-asynchronous-requests): Prefer seq-random-elt to
nth+random.
2021-09-24 19:41:03 +02:00
Stefan Kangas
3e5298fc96
Improve performance of seq-union
...
* lisp/emacs-lisp/seq.el (seq-union): Improve performance by using
nreverse instead of seq-reverse.
2021-09-17 14:01:20 +02:00
Stefan Kangas
fb9df9b883
Make ediff-union into obsolete alias for seq-union
...
* lisp/emacs-lisp/seq.el (seq-union): Autoload.
* lisp/vc/ediff-util.el (ediff-union): Make into obsolete function
alias for 'seq-union'.
* lisp/vc/ediff-mult.el (ediff-intersect-directories): Update single
caller.
2021-09-17 11:05:06 +02:00
Stefan Kangas
0cf0a2b986
Add new sequence function 'seq-union'
...
* lisp/emacs-lisp/seq.el (seq-union): New function.
* doc/lispref/sequences.texi (Sequence Functions):
* lisp/emacs-lisp/shortdoc.el (sequence): Document above new
function.
* test/lisp/emacs-lisp/seq-tests.el (test-seq-union): New test.
2021-09-17 11:03:39 +02:00
Earl Hyatt
c58f8dda2b
Add macro seq-setq
.
...
* doc/lispref/sequences.texi (seq-setq): Document this macro.
* lisp/emacs-lisp/seq.el (seq-setq): New macro.
* test/lisp/emacs-lisp/seq-tests.el (test-seq-setq):
Test this macro (bug#50053).
2021-08-14 14:17:12 +02:00
Lars Ingebrigtsen
4053bd5201
Work around long-standing seq.el compilation warning
...
* lisp/emacs-lisp/seq.el (seq-contains): When using cl-defgeneric
to define an obsolete function, it'll complain about it being
obsolete. Suppress that warning. (Should probably be fixed in
cl-defgeneric instead.)
2021-07-30 13:13:46 +02:00
Stefan Kangas
6686a31591
Remove local uniquify functions in favour of seq-uniq
...
* lisp/emacs-lisp/seq.el (seq-uniq): Add autoload cookie.
* lisp/pcomplete.el: (pcomplete-uniquify-list): Use seq-uniq.
* lisp/eshell/esh-util.el (eshell-uniqify-list)
(eshell-uniquify-list):
* lisp/nxml/rng-util.el (rng-uniquify-equal):
* lisp/progmodes/idlwave.el (idlwave-uniquify):
* lisp/textmodes/artist.el (artist-uniq): Make into obsolete
function aliases for seq-uniq. Update callers.
* lisp/nxml/rng-util.el (rng-uniquify-eq): Make obsolete in favor
of seq-uniq. Update callers.
2021-04-05 15:14:19 +02:00
Stefan Kangas
20f7fa691b
Obsolete local set difference functions in favor of seq-difference
...
* lisp/emacs-lisp/seq.el (seq-difference): Add autoload cookie.
* lisp/gnus/gnus-range.el (gnus-set-difference):
* lisp/gnus/spam.el (spam-set-difference): Make obsolete in favor
of seq-difference. Update callers.
2021-04-05 14:24:00 +02:00
Stefan Kangas
cd5dfa086d
Replace two functions with seq-subseq
...
* lisp/emacs-lisp/seq.el (seq-subseq): Add autoload cookie.
* lisp/eshell/esh-util.el (eshell-sublist): Redefine using seq-subseq
and make obsolete. Update callers.
* lisp/wid-edit.el (widget-sublist): Redefine as obsolete function
alias for seq-subseq. Update callers.
2021-04-03 03:11:35 +02:00
Basil L. Contovounesios
d925121b1e
Various map.el improvements
...
* lisp/emacs-lisp/seq.el (seq-do-indexed): Return nil as per doc.
* lisp/emacs-lisp/map.el: Require Emacs >= 26 due to dependence on
5-arg alist-get. Bump package to version 3.0. Fix other
headers. (Bug#46754)
(map--plist-p): Detect list starting with nil as plist, not alist.
(map-elt, map-filter, map-apply, map--make-pcase-bindings)
(map--make-pcase-patterns): Simplify.
(map-let, map-put, map-nested-elt, mapp): Update docstring for plist
support.
(map-delete): Fix OBOE on arrays. Split into cl-defmethods.
(map-values, map-values-apply): Specialize for arrays.
(map-pairs, map-keys-apply, map-put!): Improve docstring.
(map-length): Clarify docstring w.r.t. duplicate keys. Split into
cl-defmethods. Optimize default implementation.
(map-copy): Use copy-alist on alists. Split into cl-defmethods.
(map-contains-key): Add plist support. Clarify docstring
w.r.t. optional argument. Simplify default implementation.
(map-some, map-every-p, map-merge, map-merge-with, map--into-hash):
Don't use map-apply for side effects.
(map-into): Preserve plist ordering. Improve docstrings.
(map-insert): Add hash-table and array support.
(map-inplace): Remove unused error symbol.
(map-do): Return nil as per doc.
* etc/NEWS: Announce new user-visible behavior.
* test/lisp/emacs-lisp/map-tests.el: Prefer should-not
over (should (not ...)) in general.
(with-maps-do): Fix docstring.
(with-empty-maps-do): New macro.
(test-map-elt-default, test-mapp, test-map-keys, test-map-values)
(test-map-pairs, test-map-length, test-map-copy, test-map-apply)
(test-map-do, test-map-keys-apply, test-map-values-apply)
(test-map-filter, test-map-remove, test-map-empty-p)
(test-map-contains-key, test-map-some, test-map-every-p):
Use it.
(test-map-plist-p, test-map-put!-new-keys, test-map-insert-empty)
(test-map-insert, test-map-delete-empty, test-map-copy-alist)
(test-map-contains-key-testfn, test-map-into-hash-test)
(test-map-into-empty, test-map-merge, test-map-merge-empty):
New tests.
(test-map-elt): Test array key that is within bounds but not fixnum.
(test-map-put!): Use map--plist-p. Remove redundant tests.
(test-map-put-alist-new-key): Don't modify list literal.
(test-map-put-testfn-alist, test-map-put-return-value): Silence
obsoletion warnings.
(test-map-delete): Check for OBOE on arrays.
(test-map-delete-return-value): Remove test made redundant by
test-map-delete.
(test-map-nested-elt, test-map-into): Test plists too.
2021-03-06 16:00:52 +00:00
Juri Linkov
6172454ff3
Small fixes
...
* lisp/emacs-lisp/seq.el (seq-contains): Move the ‘declare’ form
after the docstring.
* lisp/misc.el (copy-from-above-command): Fix whitespace regexp.
2021-02-23 21:05:30 +02:00
Lars Ingebrigtsen
c1ef7adeb6
Add 'read-extended-command-predicate'
...
* doc/emacs/m-x.texi (M-x): Document it.
* doc/lispref/commands.texi (Interactive Call): Document it further.
* lisp/simple.el (read-extended-command-predicate): New user option.
(read-extended-command-predicate): Use it.
(completion-in-mode-p): New function (the default predicate).
2021-02-14 13:56:53 +01:00
Glenn Morris
0a26f47915
* lisp/emacs-lisp/seq.el (seq-concatenate): Unautoload (merge fix).
...
gitmerge-skip-regexp does not handle line breaks.
2021-01-15 09:38:20 +00:00
Glenn Morris
c83590b121
Merge from origin/emacs-27
...
488204cdc6
(origin/emacs-27) Remove one of recently added warnings ab...
55bc1560ac
Fix assertion failure in window_box_height (Bug#45737)
27743e9e70
Fix cl-concatenate inlining
32a3758c84
Fix infloop in 'pixel-scroll-mode'
74d18957b8
Fix inhibiting the default.el loading in user init file
2021-01-14 07:50:28 -08:00
Eli Zaretskii
27743e9e70
Fix cl-concatenate inlining
...
* lisp/emacs-lisp/seq.el (seq-concatenate): Auto-load it. Do not
merge to master. (Bug#45610)
2021-01-09 14:07:13 +02:00
Paul Eggert
ba05d005e5
Update copyright year to 2021
...
Run "TZ=UTC0 admin/update-copyright".
2021-01-01 01:13:56 -08:00
Paul Eggert
8c1fe1e5ef
Update copyright year to 2021
...
Run "TZ=UTC0 admin/update-copyright $(git ls-files)".
2021-01-01 00:32:32 -08:00
Stefan Kangas
34a73666d9
Shorten some over-wide docstrings in functions and macros
...
* lisp/allout-widgets.el (allout-widgets-tally-string):
* lisp/array.el (array-mode):
* lisp/calc/calc-units.el (calc-spn):
* lisp/cedet/ede/generic.el (ede-generic-new-autoloader):
* lisp/cedet/semantic/analyze.el (semantic-analyze-find-tag-sequence-default)
(semantic-analyze-find-tag-sequence):
* lisp/cedet/semantic/bovine/c.el (semantic-c-evaluate-symbol-for-hideif):
* lisp/cedet/semantic/bovine/make.el (semantic-lex-make-command):
* lisp/cedet/semantic/db-typecache.el (semanticdb-typecache-include-tags):
* lisp/cedet/semantic/doc.el (semantic-documentation-for-tag):
* lisp/cedet/semantic/tag-ls.el (semantic--tag-attribute-similar-p):
* lisp/emacs-lisp/advice.el (ad-map-arglists):
* lisp/emacs-lisp/bytecomp.el (byte-constant2)
(byte-save-restriction, byte-catch-OBSOLETE, byte-unwind-protect):
* lisp/emacs-lisp/cl-generic.el (cl-generic-combine-methods):
* lisp/emacs-lisp/seq.el (seq-partition, seq-set-equal-p)
(seq-filter):
* lisp/faces.el (face-attribute-specified-or, face-equal):
* lisp/info.el (Info-prev-reference-or-link)
(Info-next-reference-or-link):
* lisp/isearch.el (with-isearch-suspended):
* lisp/kmacro.el (kmacro-step-edit-macro, kmacro-set-counter):
* lisp/org/org-agenda.el (org-agenda-filter-by-category):
* lisp/ses.el (ses-cell-symbol):
* lisp/w32-fns.el (w32-shell-dos-semantics): Shorten doc strings to
not exceed 80-column limits. (Bug#44858)
2020-12-19 18:21:06 +01:00
Lars Ingebrigtsen
117d58ace7
Preserve all `eval' elements from both .dir-locals files
...
* lisp/files.el (dir-locals-read-from-dir): Preserve all `eval'
elements from both .dir-locals files (bug#44066).
2020-10-20 13:07:25 +02:00
Glenn Morris
3ac3a6503e
Merge from origin/emacs-27
...
65078e0a76
* lisp/info.el (Info-hide-note-references): Doc fix. (Bug...
30305b543d
Make lisp/progmodes/js.el dependent on CC Mode in the Make...
c37b2a9b42
Yet another fix for 'set-minibuffer-message'
72dd911981
Fix posn-at-x-y in builds --without-x
ace25f2066
Clarify the seq-reduce documentation
7d598e281d
Make tramp-completion-reread-directory-timeout obsolete (B...
2c31ce18ea
Fix 'message' when there's active minibuffer on another frame
# Conflicts:
# doc/misc/tramp.texi
# etc/NEWS
2020-10-17 09:48:54 -07:00
Lars Ingebrigtsen
ace25f2066
Clarify the seq-reduce documentation
...
* doc/lispref/sequences.texi (Sequence Functions): Ditto.
* lisp/emacs-lisp/seq.el (seq-reduce): Clarify the order of the
arguments (bug#43995).
2020-10-15 09:37:44 +02:00
Stefan Kangas
a811a618e0
; Bump seq version to 2.22
2020-08-29 00:42:36 +02:00
Lars Ingebrigtsen
44b31c1ed7
Make the name column in 'list-buffers' have a dynamic width
...
* lisp/buff-menu.el (Buffer-menu--dynamic-name-width): New
function (bug#30692).
(Buffer-menu-name-width): Default to using it.
(list-buffers--refresh): Call it.
* lisp/emacs-lisp/seq.el (seq-max): Add autoload cookie.
2020-08-08 11:37:43 +02:00
Eli Zaretskii
be7a07f38d
Fix byte-compilation warning in project.el
...
* lisp/emacs-lisp/seq.el (seq-every-p): Autoload it. This fixes
byte-compilation warning in project.el.
2020-06-26 10:15:46 +03:00
Noam Postavsky
b16ba4041d
; lisp/emacs-lisp/seq.el: Explain why we don't use cl-lib here
2020-03-07 18:45:23 -05:00
Andrew Eggenberger
3cbf4cb796
Eliminate use of cl-concatenate in 'seq' package
...
Fixes (Bug#39761) by making cl-extra dependent on seq rather than
vice versa.
* lisp/emacs-lisp/seq.el (seq-concatenate): Move cl-concatenate's
code here instead of calling it.
* lisp/emacs-lisp/cl-extra.el (cl-concatenate): Use cl-concatenate.
Copyright-paperwork-exempt: yes
2020-03-07 18:39:01 -05:00