summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
Commit message (Collapse)AuthorAgeFilesLines
...
* * Fix `native-compile-target-directory' effectiveness for async compilation.Andrea Corallo2021-08-171-1/+2
| | | | | * lisp/emacs-lisp/comp.el (comp-run-async-workers): Forward to async workers `native-compile-target-directory'.
* Minor clarification for define-minor-mode :variableLars Ingebrigtsen2021-08-161-3/+3
| | | | | | * lisp/emacs-lisp/easy-mmode.el (define-minor-mode): * doc/lispref/modes.texi (Defining Minor Modes): Clarify what the setter function should do (bug#14875).
* Add new functions to replace strings/regexp in a regionLars Ingebrigtsen2021-08-161-0/+6
| | | | | | | | * doc/lispref/searching.texi (Search and Replace): Document them. * lisp/subr.el (replace-string-in-region) (replace-regexp-in-region): New functions. * lisp/emacs-lisp/shortdoc.el (regexp, buffer): Mention them.
* Mark up commands in shortdoc.el for modesMasahiro Nakamura2021-08-151-5/+6
| | | | | * lisp/emacs-lisp/shortdoc.el: Add command mode tagging (bug#50064).
* * lisp/emacs-lisp/easymenu.el (easy-menu-do-define): Fix bug#50051Stefan Monnier2021-08-141-8/+6
| | | | | This corrects the quite confused conversion to closure done in commit a070bd1c8b5213ad469d41dd80d392f924644aed.
* Make lm-crack-address less strictLars Ingebrigtsen2021-08-141-13/+5
| | | | | * lisp/emacs-lisp/lisp-mnt.el (lm-crack-address): Use mail-header-parse-address-lax (bug#50049).
* Add new functions for lax mail address splittingLars Ingebrigtsen2021-08-141-0/+1
| | | | | | * lisp/emacs-lisp/subr-x.el (string-clean-whitespace): Autoload. * lisp/mail/mail-parse.el (mail-header-parse-addresses-lax) (mail-header-parse-address-lax): New functions.
* Add macro `seq-setq`.Earl Hyatt2021-08-141-0/+8
| | | | | | | | | * 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).
* Fix memory-report counting of vector/hash table sizesYikai Zhao2021-08-141-4/+1
| | | | | | | * lisp/emacs-lisp/memory-report.el (memory-report--object-size-1): Count element values in vectors and hash tables. Copyright-paperwork-exempt: yes
* Fix merging of ambiguous nil mapsBasil L. Contovounesios2021-08-141-23/+37
| | | | | | | | | | | | | | | * lisp/emacs-lisp/map.el: Bump version to 3.1. (map--merge): New merging subroutine that uses a hash table in place of lists, for both efficiency and avoiding ambiguities (bug#49848). (map-merge): Rewrite in terms of map--merge. (map-merge-with): Ditto. This ensures that FUNCTION is called whenever two keys are merged, even if they are not eql (which could happen until now). It also makes map-merge-with consistent with map-merge, thus achieving greater overall predictability. * etc/NEWS: Announce this weakening of guarantees. * test/lisp/emacs-lisp/map-tests.el (test-map-merge) (test-map-merge-with): Don't depend on specific orderings. Test that nil is correctly merged into a plist.
* Make `debug' reset `inhibit-read-only' while runningLars Ingebrigtsen2021-08-131-1/+5
| | | | | * lisp/emacs-lisp/debug.el (debug): Bind `inhibit-read-only' to nil in case we're in a context that has bound it to t (bug#26947).
* * lisp/emacs-lisp/lisp-mnt.el (lm-crack-address): Handle multi-addressesStefan Monnier2021-08-121-14/+17
| | | | (lm-authors, lm-maintainers): Adjust accordingly.
* * lisp/emacs-lisp/pcase.el (pcase-setq): Align its semantics with `pcase-let`Stefan Monnier2021-08-121-8/+10
| | | | | * test/lisp/emacs-lisp/pcase-tests.el (pcase-tests-setq): Rename from pcase-setq and ajust accordingly.
* Clarify smie-indent-forward-token doc stringLars Ingebrigtsen2021-08-121-1/+3
| | | | | * lisp/emacs-lisp/smie.el (smie-indent-forward-token): Doc string clarification (bug#31948).
* * lisp/emacs-lisp/cl-macs.el (fixnum, bignum): Fix type definitionsStefan Monnier2021-08-111-3/+3
|
* Add a `pcase-setq' macroEarl Hyatt2021-08-111-0/+38
| | | | | | | | | | | * doc/lispref/control.texi (Destructuring with pcase Patterns): Document this macro. * lisp/emacs-lisp/pcase.el (pcase-setq): New macro. This macro is the 'setq' equivalent of 'pcase-let'. * test/lisp/emacs-lisp/pcase-tests.el (pcase-setq): Test this new macro. (bug#49809).
* * lisp/emacs-lisp/cl-generic.el: Try and fix bug#49866Stefan Monnier2021-08-091-12/+17
| | | | | | | | | (cl-generic-generalizers): Remember the specializers that match a given value. (cl--generic-eql-generalizer): Adjust accordingly. * test/lisp/emacs-lisp/cl-generic-tests.el (cl-generic-test-01-eql): Add corresponding test.
* * lisp/emacs-lisp/package.el (package-buffer-info): Fix typoStefan Monnier2021-08-091-1/+1
|
* * lisp/emacs-lisp/package.el (package-buffer-info): Use lm-maintainersStefan Monnier2021-08-091-2/+5
| | | | Avoid the now obsolete `lm-maintainer`.
* Further fixes for package-quickstart-refresh printingLars Ingebrigtsen2021-08-091-3/+5
| | | | | * lisp/emacs-lisp/package.el (package-quickstart-refresh): Really ensure that the structures aren't shortened (bug#49924).
* Use string-search instead of string-match[-p]Mattias Engdegård2021-08-094-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `string-search` is easier to understand, less error-prone, much faster, does not pollute the regexp cache, and does not mutate global state. Use it where applicable and obviously safe (erring on the conservative side). * admin/authors.el (authors-canonical-file-name) (authors-scan-change-log): * lisp/apropos.el (apropos-command) (apropos-documentation-property, apropos-symbols-internal): * lisp/arc-mode.el (archive-arc-summarize) (archive-zoo-summarize): * lisp/calc/calc-aent.el (math-read-factor): * lisp/calc/calc-ext.el (math-read-big-expr) (math-format-nice-expr, math-format-number-fancy): * lisp/calc/calc-forms.el (math-read-angle-brackets): * lisp/calc/calc-graph.el (calc-graph-set-range): * lisp/calc/calc-keypd.el (calc-keypad-press): * lisp/calc/calc-lang.el (tex, latex, math-read-big-rec): * lisp/calc/calc-prog.el (calc-fix-token-name) (calc-user-define-permanent, math-define-exp): * lisp/calc/calc.el (calc-record, calcDigit-key) (calc-count-lines): * lisp/calc/calcalg2.el (calc-solve-for, calc-poly-roots) (math-do-integral): * lisp/calc/calcalg3.el (calc-find-root, calc-find-minimum) (calc-get-fit-variables): * lisp/cedet/ede/speedbar.el (ede-tag-expand): * lisp/cedet/semantic/java.el (semantic-java-expand-tag): * lisp/cedet/semantic/sb.el (semantic-sb-show-extra) (semantic-sb-expand-group): * lisp/cedet/semantic/wisent/python.el (semantic-python-instance-variable-p): * lisp/cus-edit.el (get): * lisp/descr-text.el (describe-text-sexp): * lisp/dired-aux.el (dired-compress-file): * lisp/dired-x.el (dired-make-relative-symlink): * lisp/dired.el (dired-glob-regexp): * lisp/dos-fns.el (dos-convert-standard-filename, dos-8+3-filename): * lisp/edmacro.el (edmacro-format-keys): * lisp/emacs-lisp/eieio-opt.el (eieio-sb-expand): * lisp/emacs-lisp/eieio-speedbar.el (eieio-speedbar-object-expand): * lisp/emacs-lisp/lisp-mnt.el (lm-keywords-list): * lisp/emacs-lisp/warnings.el (display-warning): * lisp/emulation/viper-ex.el (viper-ex-read-file-name) (ex-print-display-lines): * lisp/env.el (read-envvar-name, setenv): * lisp/epa-mail.el (epa-mail-encrypt): * lisp/epg.el (epg--start): * lisp/erc/erc-backend.el (erc-parse-server-response): * lisp/erc/erc-dcc.el (erc-dcc-member): * lisp/erc/erc-speedbar.el (erc-speedbar-expand-server) (erc-speedbar-expand-channel, erc-speedbar-expand-user): * lisp/erc/erc.el (erc-send-input): * lisp/eshell/em-glob.el (eshell-glob-entries): * lisp/eshell/esh-proc.el (eshell-needs-pipe-p): * lisp/eshell/esh-util.el (eshell-convert): * lisp/eshell/esh-var.el (eshell-envvar-names): * lisp/faces.el (x-resolve-font-name): * lisp/ffap.el (ffap-file-at-point): * lisp/files.el (wildcard-to-regexp, shell-quote-wildcard-pattern): * lisp/forms.el (forms--update): * lisp/frameset.el (frameset-filter-unshelve-param): * lisp/gnus/gnus-art.el (article-decode-charset): * lisp/gnus/gnus-kill.el (gnus-kill-parse-rn-kill-file): * lisp/gnus/gnus-mlspl.el (gnus-group-split-fancy): * lisp/gnus/gnus-msg.el (gnus-summary-resend-message-insert-gcc) (gnus-inews-insert-gcc): * lisp/gnus/gnus-rfc1843.el (rfc1843-decode-article-body): * lisp/gnus/gnus-search.el (gnus-search-indexed-parse-output) (gnus-search--complete-key-data): * lisp/gnus/gnus-spec.el (gnus-parse-simple-format): * lisp/gnus/gnus-sum.el (gnus-summary-refer-article): * lisp/gnus/gnus-util.el (gnus-extract-address-components) (gnus-newsgroup-directory-form): * lisp/gnus/gnus-uu.el (gnus-uu-grab-view): * lisp/gnus/gnus.el (gnus-group-native-p, gnus-short-group-name): * lisp/gnus/message.el (message-check-news-header-syntax) (message-make-message-id, message-user-mail-address) (message-make-fqdn, message-get-reply-headers, message-followup): * lisp/gnus/mm-decode.el (mm-dissect-buffer): * lisp/gnus/nnheader.el (nnheader-insert): * lisp/gnus/nnimap.el (nnimap-process-quirk) (nnimap-imap-ranges-to-gnus-ranges): * lisp/gnus/nnmaildir.el (nnmaildir--ensure-suffix): * lisp/gnus/nnmairix.el (nnmairix-determine-original-group-from-path): * lisp/gnus/nnrss.el (nnrss-match-macro): * lisp/gnus/nntp.el (nntp-find-group-and-number): * lisp/help-fns.el (help--symbol-completion-table-affixation): * lisp/help.el (help-function-arglist): * lisp/hippie-exp.el (he-concat-directory-file-name): * lisp/htmlfontify.el (hfy-relstub): * lisp/ido.el (ido-make-prompt, ido-complete, ido-copy-current-word) (ido-exhibit): * lisp/image/image-converter.el (image-convert-p): * lisp/info-xref.el (info-xref-docstrings): * lisp/info.el (Info-toc-build, Info-follow-reference) (Info-backward-node, Info-finder-find-node) (Info-speedbar-expand-node): * lisp/international/mule-diag.el (print-fontset-element): * lisp/language/korea-util.el (default-korean-keyboard): * lisp/linum.el (linum-after-change): * lisp/mail/ietf-drums.el (ietf-drums-parse-address): * lisp/mail/mail-utils.el (mail-dont-reply-to): * lisp/mail/rfc2047.el (rfc2047-encode-1, rfc2047-decode-string): * lisp/mail/rfc2231.el (rfc2231-parse-string): * lisp/mail/rmailkwd.el (rmail-set-label): * lisp/mail/rmailsum.el (rmail-header-summary): * lisp/mail/smtpmail.el (smtpmail-maybe-append-domain) (smtpmail-user-mail-address): * lisp/mail/uce.el (uce-reply-to-uce): * lisp/man.el (Man-default-man-entry): * lisp/mh-e/mh-alias.el (mh-alias-gecos-name) (mh-alias-minibuffer-confirm-address): * lisp/mh-e/mh-comp.el (mh-forwarded-letter-subject): * lisp/mh-e/mh-speed.el (mh-speed-parse-flists-output): * lisp/mh-e/mh-utils.el (mh-collect-folder-names-filter) (mh-folder-completion-function): * lisp/minibuffer.el (completion--make-envvar-table) (completion-file-name-table, completion-flex-try-completion) (completion-flex-all-completions): * lisp/mpc.el (mpc--proc-quote-string, mpc-cmd-special-tag-p) (mpc-constraints-tag-lookup): * lisp/net/ange-ftp.el (ange-ftp-send-cmd) (ange-ftp-allow-child-lookup): * lisp/net/mailcap.el (mailcap-mime-types): * lisp/net/mairix.el (mairix-search-thread-this-article): * lisp/net/pop3.el (pop3-open-server): * lisp/net/soap-client.el (soap-decode-xs-complex-type): * lisp/net/socks.el (socks-filter): * lisp/nxml/nxml-outln.el (nxml-highlighted-qname): * lisp/nxml/rng-cmpct.el (rng-c-expand-name, rng-c-expand-datatype): * lisp/nxml/rng-uri.el (rng-uri-file-name-1): * lisp/obsolete/complete.el (partial-completion-mode) (PC-do-completion): * lisp/obsolete/longlines.el (longlines-encode-string): * lisp/obsolete/nnir.el (nnir-compose-result): * lisp/obsolete/terminal.el (te-quote-arg-for-sh): * lisp/obsolete/tpu-edt.el (tpu-check-search-case): * lisp/obsolete/url-ns.el (isPlainHostName): * lisp/pcmpl-unix.el (pcomplete/scp): * lisp/play/dunnet.el (dun-listify-string2, dun-get-path) (dun-unix-parse, dun-doassign, dun-cat, dun-batch-unix-interface): * lisp/progmodes/ebnf2ps.el: (ebnf-eps-header-footer-comment): * lisp/progmodes/gdb-mi.el (gdb-var-delete) (gdb-speedbar-expand-node, gdbmi-bnf-incomplete-record-result): * lisp/progmodes/gud.el (gud-find-expr): * lisp/progmodes/idlw-help.el (idlwave-do-context-help1): * lisp/progmodes/idlw-shell.el (idlwave-shell-mode) (idlwave-shell-filter-hidden-output, idlwave-shell-filter): * lisp/progmodes/idlwave.el (idlwave-skip-label-or-case) (idlwave-routine-info): * lisp/progmodes/octave.el (inferior-octave-completion-at-point): * lisp/progmodes/sh-script.el (sh-add-completer): * lisp/progmodes/sql.el (defun): * lisp/progmodes/xscheme.el (xscheme-process-filter): * lisp/replace.el (query-replace-compile-replacement) (map-query-replace-regexp): * lisp/shell.el (shell--command-completion-data) (shell-environment-variable-completion): * lisp/simple.el (display-message-or-buffer): * lisp/speedbar.el (speedbar-dired, speedbar-tag-file) (speedbar-tag-expand): * lisp/subr.el (split-string-and-unquote): * lisp/tar-mode.el (tar-extract): * lisp/term.el (term-command-hook, serial-read-name): * lisp/textmodes/bibtex.el (bibtex-print-help-message): * lisp/textmodes/ispell.el (ispell-lookup-words, ispell-filter) (ispell-parse-output, ispell-buffer-local-parsing): * lisp/textmodes/reftex-cite.el (reftex-do-citation): * lisp/textmodes/reftex-parse.el (reftex-notice-new): * lisp/textmodes/reftex-ref.el (reftex-show-entry): * lisp/textmodes/reftex.el (reftex-compile-variables): * lisp/textmodes/tex-mode.el (tex-send-command) (tex-start-tex, tex-append): * lisp/thingatpt.el (thing-at-point-url-at-point): * lisp/tmm.el (tmm-add-one-shortcut): * lisp/transient.el (transient-format-key): * lisp/url/url-auth.el (url-basic-auth) (url-digest-auth-directory-id-assoc): * lisp/url/url-news.el (url-news): * lisp/url/url-util.el (url-parse-query-string): * lisp/vc/vc-cvs.el (vc-cvs-parse-entry): * lisp/wid-browse.el (widget-browse-sexp): * lisp/woman.el (woman-parse-colon-path, woman-mini-help) (WoMan-getpage-in-background, woman-negative-vertical-space): * lisp/xml.el: * test/lisp/emacs-lisp/check-declare-tests.el (check-declare-tests-warn): * test/lisp/files-tests.el (files-tests-file-name-non-special-dired-compress-handler): * test/lisp/net/network-stream-tests.el (server-process-filter): * test/src/coding-tests.el (ert-test-unibyte-buffer-dos-eol-decode): Use `string-search` instead of `string-match` and `string-match-p`.
* Use string-replace instead of replace-regexp-in-stringMattias Engdegård2021-08-082-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `string-replace` is easier to understand, less error-prone, much faster, and results in shorter Lisp and byte code. Use it where applicable and obviously safe (erring on the conservative side). * admin/authors.el (authors-scan-change-log): * lisp/autoinsert.el (auto-insert-alist): * lisp/calc/calc-prog.el (calc-edit-macro-combine-alg-ent) (calc-edit-macro-combine-ext-command) (calc-edit-macro-combine-var-name): * lisp/calc/calc-units.el (math-make-unit-string): * lisp/calendar/cal-html.el (cal-html-comment): * lisp/calendar/cal-tex.el (cal-tex-comment): * lisp/calendar/icalendar.el (icalendar--convert-string-for-export) (icalendar--convert-string-for-import): * lisp/calendar/iso8601.el (iso8601--concat-regexps) (iso8601--full-time-match, iso8601--combined-match): * lisp/calendar/time-date.el (format-seconds): * lisp/calendar/todo-mode.el (todo-filter-items-filename): * lisp/cedet/cedet-files.el (cedet-directory-name-to-file-name) (cedet-file-name-to-directory-name): * lisp/comint.el (comint-watch-for-password-prompt): * lisp/dired-aux.el (dired-do-chmod): * lisp/dired-x.el (dired-man): * lisp/dired.el (dired-insert-directory, dired-goto-file-1): * lisp/emacs-lisp/comp.el (comp-c-func-name): * lisp/emacs-lisp/re-builder.el (reb-copy): * lisp/erc/erc-dcc.el (erc-dcc-unquote-filename): * lisp/erc/erc.el (erc-quit-reason-zippy, erc-part-reason-zippy) (erc-update-mode-line-buffer, erc-message-english-PART): * lisp/files.el (make-backup-file-name-1, files--transform-file-name) (read-file-modes): * lisp/fringe.el (fringe-mode): * lisp/gnus/gnus-art.el (gnus-button-handle-info-url): * lisp/gnus/gnus-group.el (gnus-group-completing-read): * lisp/gnus/gnus-icalendar.el (gnus-icalendar-event-from-ical): * lisp/gnus/gnus-mlspl.el (gnus-group-split-fancy): * lisp/gnus/gnus-search.el (gnus-search-query-parse-date) (gnus-search-transform-expression, gnus-search-run-search): * lisp/gnus/gnus-start.el (gnus-dribble-enter): * lisp/gnus/gnus-sum.el (gnus-summary-refer-article): * lisp/gnus/gnus-util.el (gnus-mode-string-quote): * lisp/gnus/message.el (message-put-addresses-in-ecomplete) (message-parse-mailto-url, message-mailto-1): * lisp/gnus/mml-sec.el (mml-secure-epg-sign): * lisp/gnus/mml-smime.el (mml-smime-epg-verify): * lisp/gnus/mml2015.el (mml2015-epg-verify): * lisp/gnus/nnmaildir.el (nnmaildir--system-name) (nnmaildir-request-list, nnmaildir-retrieve-groups) (nnmaildir-request-group, nnmaildir-retrieve-headers): * lisp/gnus/nnrss.el (nnrss-node-text): * lisp/gnus/spam-report.el (spam-report-gmane-internal) (spam-report-user-mail-address): * lisp/ibuffer.el (name): * lisp/image-dired.el (image-dired-pngnq-thumb) (image-dired-pngcrush-thumb, image-dired-optipng-thumb) (image-dired-create-thumb-1): * lisp/info.el (Info-set-mode-line): * lisp/international/mule-cmds.el (describe-language-environment): * lisp/mail/rfc2231.el (rfc2231-parse-string): * lisp/mail/rfc2368.el (rfc2368-parse-mailto-url): * lisp/mail/rmail.el (rmail-insert-inbox-text) (rmail-simplified-subject-regexp): * lisp/mail/rmailout.el (rmail-output-body-to-file): * lisp/mail/undigest.el (rmail-digest-rfc1153): * lisp/man.el (Man-default-man-entry): * lisp/mouse.el (minor-mode-menu-from-indicator): * lisp/mpc.el (mpc--debug): * lisp/net/browse-url.el (browse-url-mail): * lisp/net/eww.el (eww-update-header-line-format): * lisp/net/newst-backend.el (newsticker-save-item): * lisp/net/rcirc.el (rcirc-sentinel): * lisp/net/soap-client.el (soap-decode-date-time): * lisp/nxml/rng-cmpct.el (rng-c-literal-2-re): * lisp/nxml/xmltok.el (let*): * lisp/obsolete/nnir.el (nnir-run-swish-e, nnir-run-hyrex) (nnir-run-find-grep): * lisp/play/dunnet.el (dun-doassign): * lisp/play/handwrite.el (handwrite): * lisp/proced.el (proced-format-args): * lisp/profiler.el (profiler-report-header-line-format): * lisp/progmodes/gdb-mi.el (gdb-mi-quote): * lisp/progmodes/make-mode.el (makefile-bsdmake-rule-action-regex) (makefile-make-font-lock-keywords): * lisp/progmodes/prolog.el (prolog-guess-fill-prefix): * lisp/progmodes/ruby-mode.el (ruby-toggle-string-quotes): * lisp/progmodes/sql.el (sql-remove-tabs-filter, sql-str-literal): * lisp/progmodes/which-func.el (which-func-current): * lisp/replace.el (query-replace-read-from) (occur-engine, replace-quote): * lisp/select.el (xselect--encode-string): * lisp/ses.el (ses-export-tab): * lisp/subr.el (shell-quote-argument): * lisp/term/pc-win.el (msdos-show-help): * lisp/term/w32-win.el (w32--set-selection): * lisp/term/xterm.el (gui-backend-set-selection): * lisp/textmodes/picture.el (picture-tab-search): * lisp/thumbs.el (thumbs-call-setroot-command): * lisp/tooltip.el (tooltip-show-help-non-mode): * lisp/transient.el (transient-format-key): * lisp/url/url-mailto.el (url-mailto): * lisp/vc/log-edit.el (log-edit-changelog-ours-p): * lisp/vc/vc-bzr.el (vc-bzr-status): * lisp/vc/vc-hg.el (vc-hg--glob-to-pcre): * lisp/vc/vc-svn.el (vc-svn-after-dir-status): * lisp/xdg.el (xdg-desktop-strings): * test/lisp/electric-tests.el (defun): * test/lisp/term-tests.el (term-simple-lines): * test/lisp/time-stamp-tests.el (formatz-mod-del-colons): * test/lisp/wdired-tests.el (wdired-test-bug32173-01) (wdired-test-unfinished-edit-01): * test/src/json-tests.el (json-parse-with-custom-null-and-false-objects): Use `string-replace` instead of `replace-regexp-in-string`.
* Fix prin1 problem in package-quickstart-refreshLars Ingebrigtsen2021-08-071-1/+3
| | | | | * lisp/emacs-lisp/package.el (package-quickstart-refresh): Bind print-length/print-level before using prin1-to-string (bug#49924).
* Fix print-length issue in comp-run-async-workersLars Ingebrigtsen2021-08-071-1/+3
| | | | | * lisp/emacs-lisp/comp.el (comp-run-async-workers): Bind print-length/print-level to ensure there's no truncation (bug#49922).
* Cease attempts to const-propagate through setqMattias Engdegård2021-08-051-9/+3
| | | | | | | | | | | | | | | The current method of propagating constants through setq was unsound because it relied on each setq form only being traversed at most once during optimisation, which isn't necessarily true in general; it could be made to miscompile code in rare cases. Since it was only used in limited circumstances, disabling this optimisation doesn't cost us much. * lisp/emacs-lisp/byte-opt.el (byte-optimize-form-code-walker): Don't update the known value when traversing `setq`. * test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-tests--test-cases): Add test case.
* Package archive location needs to be absolute filenamedickmao2021-08-041-5/+3
| | | | | * lisp/emacs-lisp/package.el (package--with-response-buffer-1): Actually check that URL is absolute (bug#49788).
* Improve `define-globalized-minor-mode' doc stringsLars Ingebrigtsen2021-08-041-1/+4
| | | | | * lisp/emacs-lisp/easy-mmode.el (define-globalized-minor-mode): Copy the description from easy-mmode--arg-docstring (bug#49843).
* * lisp/emacs-lisp/cl-generic.el (cl-generic-generalizers): Don't emit warningStefan Monnier2021-08-031-6/+6
| | | | Also remove "WARNING" annotations after confirming that he code was right.
* Evaluate eql specializersakater2021-08-035-27/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/cl-generic.el (cl-generic-generalizers): Evaluate forms that are eql specializers. Provide backward compatibility with a warning. * test/lisp/emacs-lisp/cl-generic-tests.el: Add a test. * lisp/emacs-lisp/bindat.el (bindat--type): Adhere to the new rule. * lisp/emacs-lisp/edebug.el (edebug--match-&-spec-op): Adhere to the new rule. * lisp/emacs-lisp/map.el (map-into): Adhere to the new rule. * lisp/emacs-lisp/radix-tree.el (map-into): Adhere to the new rule. * lisp/frame.el (cl-generic-define-context-rewriter): Adhere to the new rule. * lisp/gnus/gnus-search.el (gnus-search-transform-expression): Adhere to the new rule. * lisp/image/image-converter.el (image-converter--probe image-converter--convert): Adhere to the new rule. * lisp/mail/smtpmail.el (smtpmail-try-auth-method): Adhere to the new rule. * lisp/progmodes/elisp-mode.el (xref-backend-definitions) (xref-backend-apropos): Adhere to the new rule. * lisp/progmodes/etags.el (xref-backend-identifier-at-point) (xref-backend-identifier-completion-table) (xref-backend-identifier-completion-ignore-case) (xref-backend-definitions)(xref-backend-apropos): Adhere to the new rule. * test/lisp/emacs-lisp/checkdoc-tests.el (checkdoc-cl-defmethod-with-types-ok) (checkdoc-cl-defmethod-qualified-ok) (checkdoc-cl-defmethod-with-extra-qualifier-ok): Adhere to the new rule. * etc/NEWS: Describe the change.
* file-name-concat is not error freeLars Ingebrigtsen2021-08-031-1/+1
| | | | | * lisp/emacs-lisp/byte-opt.el (side-effect-free-fns): Declare file-name-concat as side-effect free.
* Declare file-name-concat as side-effect freeLars Ingebrigtsen2021-08-031-0/+1
| | | | | * lisp/emacs-lisp/byte-opt.el (side-effect-free-fns): Declare file-name-concat as side-effect (and error) free.
* Declare `match-beginning` and `match-end` as side-effect-freeMattias Engdegård2021-08-031-0/+1
| | | | * lisp/emacs-lisp/byte-opt.el (side-effect-free-fns): Add functions.
* * Fix error while disassembling native code on macOSJimmy Yuen Ho Wong2021-08-031-0/+2
| | | | | | * lisp/emacs-lisp/disass.el (disassemble-internal): Make sure the regexp that searches for a symbol takes into account of llvm-objdump's output format.
* * lisp/emacs-lisp/autoload.el (autoload--make-defs-autoload): Display warning.Juri Linkov2021-08-011-2/+2
| | | | https://lists.gnu.org/archive/html/emacs-devel/2021-08/msg00007.html
* Revert "Allow nil initializers in define-minor-mode"Lars Ingebrigtsen2021-07-311-3/+1
| | | | | | This reverts commit 02cbb37de73d563149389615ee44741322007108. This was mistakenly commited and doesn't really make much sense.
* Allow nil initializers in define-minor-modeLars Ingebrigtsen2021-07-311-1/+3
| | | | | * lisp/emacs-lisp/easy-mmode.el (define-minor-mode): Make the meaning of :initialize nil and a missing :initialize the same.
* * lisp/emacs-lisp/cl-macs.el: Add cl-type patternAdam Porter2021-07-301-0/+8
| | | | | | | | | | | * lisp/emacs-lisp/cl-macs.el: ((pcase-defmacro type)): Add 'cl-type' pattern. * test/lisp/emacs-lisp/pcase-tests.el (pcase-tests-cl-type): Add test. * doc/lispref/control.texi (pcase Macro): Update manual. With thanks to Stefan Monnier and Eli Zaretskii for their guidance.
* Simplify lexical let-optimisationsMattias Engdegård2021-07-302-110/+99
| | | | | | | | | | | | | | | | | | Ensure in cconv that let-bindings have the normal form (VAR EXPR) where VAR is a valid variable name, so that we don't need to keep re-checking this all the time in the optimiser. * lisp/emacs-lisp/byte-opt.el (byte-optimize-enable-variable-constprop) (byte-optimize-warn-eliminated-variable): Remove; these were mainly used for debugging. * lisp/emacs-lisp/byte-opt.el (byte-optimize-let-form): Assume normalised let-bindings (with lexical-binding). Stop using the variables removed above. * lisp/emacs-lisp/cconv.el (cconv-convert): Ensure normalised let-bindings. Malformed bindings are dropped after warning. remove byte-optimize-warn-eliminated-variable
* Work around long-standing seq.el compilation warningLars Ingebrigtsen2021-07-301-7/+8
| | | | | | | * 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.)
* Optimise let and let* whose body is constant or the last variableMattias Engdegård2021-07-301-12/+25
| | | | | | | | | | | | | | | | | | Simplify (let ((X1 E1) ... (Xn En)) Xn) => (progn E1 ... En) and (let* ((X1 E1) ... (Xn En)) Xn) => (let* ((X1 E1) ... (Xn-1 En-1)) En) and similarly the case where the body is a constant, extending a previous optimisation that only applied to the constant nil. This reduces the number of bound variables, shortens the code, and enables further optimisations. * lisp/emacs-lisp/byte-opt.el (byte-optimize-letX): Rewrite using `pcase` and add the aforementioned transformations. * test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-tests--test-cases): Add test cases.
* Move warnings about bad let-bindings from source optimiser to cconvMattias Engdegård2021-07-302-10/+12
| | | | | | * lisp/emacs-lisp/byte-opt.el (byte-optimize-let-form): Move warnings... * lisp/emacs-lisp/cconv.el (cconv-convert): ...here, which is an overall better place (closer to the front-end).
* Optimise prog1 betterMattias Engdegård2021-07-301-5/+8
| | | | | | | | | | Rewrite (prog1 CONST FORMS...) => (progn FORMS... CONST) where CONST is a compile-time constant, because putting the value last allows the lapcode peephole pass to do important improvements like branch elimination. Also use progn instead of prog1 for `ignore`. * lisp/emacs-lisp/byte-opt.el (byte-optimize-form-code-walker): New `prog1` and `ignore` transforms.
* Elide lexical variables in for-effect context in source optimiserMattias Engdegård2021-07-301-10/+15
| | | | | | | | * lisp/emacs-lisp/byte-opt.el (byte-optimize-form-code-walker): Remove for-effect uses of lexical variables. We previously relied on this being done by the lapcode peephole optimiser but at source level it enables more optimisation opportunities. Keywords are elided for the same reason.
* Single source optimiser entry pointMattias Engdegård2021-07-302-4/+11
| | | | | | | | | | | | Make the optimiser aware of lexical arguments. Otherwise we cannot know for sure whether a variable is lexical or dynamic during traversal. * lisp/emacs-lisp/byte-opt.el (byte-optimize-one-form): New optimiser entry point, replacing the recursive byte-optimize-form. * lisp/emacs-lisp/bytecomp.el (byte-optimize-one-form): Autoload. (byte-compile-keep-pending, byte-compile-top-level): Use byte-optimize-one-form.
* Make byte-recompile-directory less brittleLars Ingebrigtsen2021-07-281-2/+2
| | | | | * lisp/emacs-lisp/bytecomp.el (byte-recompile-directory): Don't interpret files named "~" as $HOME (bug#49758).
* Fix mistake in switch-case generation of `null` (bug#49746)Mattias Engdegård2021-07-271-1/+2
| | | | | | | | | Reported by Gregor Zattler. * lisp/emacs-lisp/bytecomp.el (byte-compile--cond-switch-prefix): Be more careful in the selection of equality. * test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-tests--test-cases): Add test case.
* Add commands to move to next/previous column in tabulated-list-modePeter Feigl2021-07-251-0/+24
| | | | | | | * lisp/emacs-lisp/tabulated-list.el (tabulated-list-mode-map): Add keybindings M-left and M-right. (tabulated-list-previous-column tabulated-list-next-column): Implement commands (bug#44711).
* Rename directory-append to file-name-concatLars Ingebrigtsen2021-07-251-5/+5
| | | | | | | | * src/fileio.c (Ffile_name_concat): * lisp/files.el (move-file-to-trash): * lisp/emacs-lisp/shortdoc.el (file-name): * doc/lispref/files.texi (Directory Names): Rename `directory-append' to `file-name-concat'.
* Extend directory-append to take an arbitrary number of componentsLars Ingebrigtsen2021-07-241-0/+1
| | | | | | | | * doc/lispref/files.texi (Directory Names): Document it. * lisp/emacs-lisp/shortdoc.el (file-name): Add new example. * src/fileio.c (Fdirectory_append): Change the function to take an arbitrary number of components.
* Add new function `directory-append'Lars Ingebrigtsen2021-07-241-1/+8
| | | | | | | | | * doc/lispref/files.texi (Directory Names): Document it, and remove the concat-based file concatenation description. * lisp/emacs-lisp/shortdoc.el (file-name): Add. And add more expand-file-name examples. * src/fileio.c (Fdirectory_append): New function.