summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/lisp-mode.el
Commit message (Collapse)AuthorAgeFilesLines
* Fix capitalization ELisp -> ElispSean Whitton2025-03-121-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * configure.ac (libgccjit_not_found_err) (libgccjit_dev_not_found_err): * doc/emacs/buffers.texi (List Buffers): * doc/lispref/elisp.texi (Tree-sitter C API): * doc/lispref/functions.texi (What Is a Function): * doc/lispref/parsing.texi (Parsing Program Source) (Tree-sitter C API): * doc/misc/gnus.texi (The Gnus Registry): * etc/DEBUG: * etc/NEWS: * etc/NEWS.25: * etc/NEWS.26: * etc/NEWS.28: * etc/NEWS.30: * etc/TODO: * lib-src/emacsclient.c (print_help_and_exit): * lisp/auth-source.el (auth-source-search): * lisp/cedet/semantic/bovine/el.el (emacs-lisp-mode): * lisp/cedet/semantic/wisent/comp.el (wisent-automaton-lisp-form): * lisp/cedet/srecode/el.el (srecode-semantic-apply-tag-to-dict): * lisp/editorconfig.el (editorconfig-get-local-variables-functions): * lisp/emacs-lisp/bindat.el (bindat-type): * lisp/emacs-lisp/byte-opt.el (byte-compile-inline-expand): * lisp/emacs-lisp/cconv.el (cconv-make-interpreted-closure): * lisp/emacs-lisp/cl-macs.el (cl--labels-convert): * lisp/emacs-lisp/lisp-mode.el (lisp-fdefs) (lisp-fill-paragraphs-as-doc-string): * lisp/emacs-lisp/macroexp.el (macroexp--fgrep): * lisp/emacs-lisp/oclosure.el (cconv--interactive-helper): * lisp/emacs-lisp/re-builder.el: * lisp/erc/erc-button.el (erc-emacswiki-lisp-url): * lisp/help-fns.el (help-fns--describe-function-or-command-prompt): * lisp/menu-bar.el (menu-bar-search-documentation-menu): * lisp/net/tramp-message.el (tramp-debug-font-lock-keywords): * lisp/org/org-capture.el (org-capture): * lisp/org/org.el (org-category, org-todo): * lisp/org/ox.el (org-export-async-start): * lisp/progmodes/elisp-mode.el (emacs-lisp-mode): * lisp/progmodes/peg.el (peg-translate-exp): * lisp/progmodes/ruby-ts-mode.el: * lisp/woman.el (woman-mode, woman-parse-numeric-arg): * src/chartab.c (map_char_table_for_charset): * src/fns.c (extract_data_from_object): * src/frame.c (do_switch_frame): * src/keyboard.c (make_lispy_event): * test/lisp/emacs-lisp/cl-macs-tests.el (cl-&key-arguments): * test/lisp/emacs-lisp/shortdoc-tests.el (shortdoc-help-fns-examples-function-test): * test/manual/etags/c-src/emacs/src/keyboard.c (make_lispy_event): Fix capitalization ELisp -> Elisp.
* ; Replace non-standard "CLisp" abbreviation for "Common Lisp"Sean Whitton2025-03-121-2/+2
|
* Make define-global-minor-mode alias obsoleteStefan Kangas2025-02-261-2/+1
| | | | | | | | | | | | | * lisp/emacs-lisp/easy-mmode.el (define-global-minor-mode): Make alias for old name obsolete, just in time for its 20th anniversary. * test/lisp/emacs-lisp/lisp-mode-tests.el (test-font-lock-keywords): * lisp/progmodes/subword.el (global-subword-mode) (global-superword-mode): Don't use above obsolete name. * lisp/emacs-lisp/lisp-mode.el (lisp-imenu-generic-expression) (lisp-fdefs): Remove syntax highlighting for obsolete name. * lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate--make-autoload): Add comment mentioning the obsolete status of above alias. * doc/lispref/loading.texi (Autoload): Don't document obsolete name.
* Highlight multiple symbols in single quotes in CL stringsThuna2025-02-121-1/+3
| | | | | | * lisp/emacs-lisp/lisp-mode.el (lisp-cl-font-lock-keywords-2): When multiple space-delimited symbols are single quoted together (e.g "`foo bar'"), highlight them. (Bug#59360)
* Rename a recently-added variable (bug#56197)Eli Zaretskii2025-02-011-6/+7
| | | | | | | | | * lisp/emacs-lisp/lisp-mode.el (lisp-fill-paragraphs-as-doc-string): Renamed from 'lisp-fill-paragraph-as-displayed' and default value reversed. (lisp-fill-paragraph): Adjust to the change. * test/lisp/emacs-lisp/lisp-mode-tests.el (lisp-fill-paragraph-as-displayed): Likewise.
* Revert "Don't use obsolete face variables in lisp-mode.el"Stefan Kangas2025-02-011-32/+32
| | | | This reverts commit ba60fa3deaa030eb4815caa8c180ac841709e86a.
* Merge branch 'scratch/no-purespace' into 'master'Stefan Kangas2025-02-011-55/+55
|\
| * Don't call purecopy in emacs-lisp/*.elStefan Kangas2024-12-121-55/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/byte-run.el (define-obsolete-face-alias) (make-obsolete-variable, make-obsolete): * lisp/emacs-lisp/cl-extra.el (cl-type-definition): * lisp/emacs-lisp/cl-preloaded.el (cl-assertion-failed): * lisp/emacs-lisp/cl-print.el (help-byte-code): * lisp/emacs-lisp/derived.el (define-derived-mode): * lisp/emacs-lisp/easy-mmode.el (define-minor-mode): * lisp/emacs-lisp/eldoc.el (eldoc-minor-mode-string): * lisp/emacs-lisp/gv.el (make-obsolete-generalized-variable): * lisp/emacs-lisp/lisp-mode.el (lisp-imenu-generic-expression): * lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate--parse-file): * lisp/emacs-lisp/warnings.el (warning-type-format): Remove calls to purecopy.
* | Don't use obsolete face variables in lisp-mode.elStefan Kangas2025-01-271-32/+32
| | | | | | | | | | | | * lisp/emacs-lisp/lisp-mode.el (lisp-el-font-lock-keywords-1) (lisp-cl-font-lock-keywords-1, lisp-el-font-lock-keywords-2) (lisp-cl-font-lock-keywords-2): Don't use obsolete face variables.
* | lisp: Introduce a `lisp-fill-paragraph-as-displayed' variable.Maxim Cournoyer2025-01-251-30/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Starting with Emacs 28, filling strings now happens in a narrowed scope, and looses the leading indentation and can cause the string to extend past the fill-column value. Introduce `lisp-fill-paragraph-as-displayed' as a new variable allowing opting out of this new behavior in specific scenarios (such as when using the Scheme major mode, say). * lisp/emacs-lisp/lisp-mode.el (lisp-fill-paragraph-as-displayed): New variable. (lisp-fill-paragraph): Honor it, by avoiding the logic narrow to strings before applying fill-paragraph. * test/lisp/emacs-lisp/lisp-mode-tests.el (lisp-fill-paragraph-respects-fill-column): Test it. (lisp-fill-paragraph-docstring-boundaries): New test, as a safeguard to avoid regressions. Fixes: bug#56197
* | Update copyright year to 2025Paul Eggert2025-01-011-1/+1
| | | | | | | | Run "TZ=UTC0 admin/update-copyright".
* | Make font-lock face variables obsoleteStefan Kangas2024-12-181-4/+4
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using these variables as "another mechanism for changing face appearance" never really worked, since mode authors were free to use the face instead of the variable (i.e. quoting the symbol). This means that when users customized the variables, it would change its appearance only in some cases, which is a rather surprising interface. Indeed, it turns out that some modes have not always been consistent, and mixed using the variable and the face, increasing the confusion even further. Thus, the only thing users could rely on to always work was to leave the variables at their default value, and to customize the face. We now recommend customizing the face, and are obsoleting these variables. This will lead to some minor code-churn, but it is believed that it will be ultimately worth it. To fix existing Lisp code, you should typically only need to quote the symbol, as this commit shows. It might be the case that we will have to keep the obsolete variables, that have been with us since Emacs 19, around for a longer time-period than normal, to allow package authors to adapt. * lisp/font-lock.el (font-lock-comment-face) (font-lock-comment-delimiter-face, font-lock-string-face) (font-lock-doc-face, font-lock-doc-markup-face, font-lock-keyword-face) (font-lock-builtin-face, font-lock-function-name-face) (font-lock-variable-name-face, font-lock-type-face) (font-lock-constant-face, font-lock-warning-face) (font-lock-negation-char-face, font-lock-preprocessor-face): Make face variables obsolete in favor of customizing the faces directly instead. (Bug#71469) * doc/lispref/modes.texi (Faces for Font Lock): Don't document above obsolete variables. * lisp/cedet/data-debug.el (data-debug-insert-hash-table) (data-debug-insert-widget-properties, data-debug-insert-string) (data-debug-insert-number): * lisp/emacs-lisp/lisp-mode.el (elisp--font-lock-backslash) (lisp-font-lock-syntactic-face-function): * lisp/emacs-lisp/package.el (describe-package-1): * lisp/generic-x.el (rc-generic-mode, rul-generic-mode): * lisp/org/org-table.el (org-table-edit-formulas): * lisp/progmodes/cc-fonts.el (c-font-lock-invalid-single-quotes) (c-maybe-font-lock-wrong-style-comments, c-font-lock-declarators) (c-font-lock-c++-lambda-captures, c-font-lock-c++-modules): * lisp/progmodes/cperl-mode.el (cperl-find-sub-attrs) (cperl-look-at-leading-count, cperl-process-here-doc) (cperl-find-pods-heres): * lisp/progmodes/gdb-mi.el (gdb-init-1, gdb-update, gdb-running) (gdb-starting, gdb-stopped, gdb-internals) (gdb-breakpoints--add-breakpoint-row, gdb-locals-handler-custom) (gdb-registers-handler-custom, gdb-get-source-file): * lisp/progmodes/js.el (js--font-lock-keywords-1) (js--font-lock-keywords-2, js-font-lock-syntactic-face-function): * lisp/progmodes/lua-ts-mode.el (lua-ts--comment-font-lock): * lisp/progmodes/meta-mode.el (meta-indent-in-string-p): * lisp/progmodes/prolog.el (prolog-font-lock-keywords): * lisp/progmodes/python.el (python-font-lock-syntactic-face-function): * lisp/progmodes/ruby-ts-mode.el (ruby-ts--comment-font-lock): * lisp/progmodes/sh-script.el (sh-font-lock-syntactic-face-function): * lisp/textmodes/tex-mode.el (doctex-font-lock-syntactic-face-function): * test/lisp/faces-tests.el (faces--test-color-at-point): * test/lisp/progmodes/cperl-mode-tests.el (cperl-test-extra-delimiters) (cperl-test-bug-47112, cperl-test-bug-65834, cperl-test-bug-66145) (cperl-test-bug-66161, cperl-test-bug-69604): * test/lisp/progmodes/python-tests.el (python-ts-mode-compound-keywords-face) (python-ts-mode-named-assignment-face-1) (python-ts-mode-assignment-face-2, python-ts-mode-nested-types-face-1) (python-ts-mode-union-types-face-1, python-ts-mode-union-types-face-2) (python-ts-mode-types-face-1, python-ts-mode-types-face-2) (python-ts-mode-types-face-3, python-ts-mode-isinstance-type-face-1) (python-ts-mode-isinstance-type-face-2) (python-ts-mode-isinstance-type-face-3) (python-ts-mode-superclass-type-face, python-ts-mode-class-patterns-face) (python-ts-mode-dotted-decorator-face-1) (python-ts-mode-dotted-decorator-face-2) (python-ts-mode-builtin-call-face) (python-ts-mode-interpolation-nested-string) (python-ts-mode-level-fontification-wo-interpolation) (python-ts-mode-disabled-string-interpolation) (python-ts-mode-interpolation-doc-string): * test/lisp/progmodes/ruby-mode-tests.el (ruby-heredoc-font-lock, ruby-heredoc-highlights-interpolations) (ruby-exit!-font-lock, ruby-regexp-interpolation-is-highlighted) (ruby-recognize-symbols-starting-with-at-character) (ruby-hash-character-not-interpolation) (ruby-interpolation-suppresses-quotes-inside) (ruby-interpolation-suppresses-one-double-quote) (ruby-interpolation-inside-percent-literal) (ruby-interpolation-inside-percent-literal-with-paren) (ruby-interpolation-inside-another-interpolation) (ruby-interpolation-inside-double-quoted-percent-literals) (ruby-no-interpolation-in-single-quoted-literals): Don't use above obsolete variables. * lisp/progmodes/cc-fonts.el (font-lock-constant-face): Don't declare now-unused variable.
* * lisp/emacs-lisp/lisp-mode.el (lisp-fdefs): Fix font-lock (bug#74307).Juri Linkov2024-12-051-3/+3
| | | | | Move '(not "\\")' inside the group to not exclude the last character for "\\<>" and similar constructs.
* Fix font-lock in 'lisp-mode'Eli Zaretskii2024-11-161-3/+6
| | | | | * lisp/emacs-lisp/lisp-mode.el (lisp-fdefs): Fix regexps for "\\<>" and similar constructs. (Bug#74307)
* Mark if-let and when-let obsoleteSean Whitton2024-10-241-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/subr.el (if-let*, when-let*, if-let, when-let): Mark if-let and when-let obsolete (bug#73853 and elsewhere). Move docstring text around so that if-let* and when-let* descriptions no longer refer to if-let and when-let. * etc/NEWS: Announce the change. * admin/admin.el (reminder-for-release-blocking-bugs): * doc/misc/erc.texi (display-buffer): * lisp/ansi-color.el (ansi-color-apply) (ansi-color--face-vec-face): * lisp/ansi-osc.el (ansi-osc-apply-on-region) (ansi-osc-hyperlink): * lisp/arc-mode.el (archive-goto-file) (archive-next-file-displayer): * lisp/auth-source-pass.el (auth-source-pass-search) (auth-source-pass--parse-data) (auth-source-pass--find-match-many): * lisp/autorevert.el (auto-revert-notify-rm-watch): * lisp/buff-menu.el (Buffer-menu-unmark-all-buffers) (Buffer-menu-group-by-root): * lisp/calendar/parse-time.el (parse-iso8601-time-string): * lisp/cedet/pulse.el (pulse-tick): * lisp/comint.el (comint--fontify-input-ppss-flush-indirect) (comint--intersect-regions): * lisp/completion-preview.el (completion-preview--try-table) (completion-preview--capf-wrapper, completion-preview--update): * lisp/cus-edit.el (setopt--set) (custom-dirlocals-maybe-update-cons, custom-dirlocals-validate): * lisp/custom.el (load-theme): * lisp/descr-text.el (describe-char): * lisp/desktop.el (desktop--emacs-pid-running-p): * lisp/dired-x.el (menu): * lisp/dired.el (dired-font-lock-keywords) (dired-insert-directory, dired--insert-disk-space, dired-mode): * lisp/dnd.el (dnd-handle-multiple-urls): * lisp/dom.el (dom-remove-attribute): * lisp/emacs-lisp/byte-opt.el (byte-optimize-form-code-walker): * lisp/emacs-lisp/bytecomp.el (bytecomp--custom-declare): * lisp/emacs-lisp/comp-common.el (comp-function-type-spec): * lisp/emacs-lisp/comp-cstr.el (comp--all-classes) (comp-cstr-set-range-for-arithm, comp--cstr-union-1-no-mem) (comp-cstr-intersection-no-mem, comp-cstr-fixnum-p) (comp-cstr-type-p): * lisp/emacs-lisp/comp-run.el (comp-subr-trampoline-install) (native--compile-async): * lisp/emacs-lisp/comp.el (comp--get-function-cstr) (comp--function-pure-p, comp--intern-func-in-ctxt) (comp--addr-to-bb-name, comp--emit-assume, comp--maybe-add-vmvar) (comp--add-call-cstr, comp--compute-dominator-tree) (comp--dom-tree-walker, comp--ssa-rename) (comp--function-call-maybe-fold, comp--fwprop-call) (comp--call-optim-func): * lisp/emacs-lisp/edebug.el (edebug-global-prefix) (edebug-remove-instrumentation): * lisp/emacs-lisp/eieio.el (initialize-instance): * lisp/emacs-lisp/ert-x.el (ert-resource-directory): * lisp/emacs-lisp/ert.el (ert--expand-should-1) (ert-test-location, ert-write-junit-test-report) (ert-test--erts-test): * lisp/emacs-lisp/icons.el (icon-complete-spec, icon-string) (icons--create): * lisp/emacs-lisp/lisp-mode.el (lisp--local-defform-body-p): * lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate--make-autoload) (loaddefs-generate--parse-file): * lisp/emacs-lisp/multisession.el (multisession-edit-mode--revert, multisession-edit-value): * lisp/emacs-lisp/package-vc.el (package-vc--read-archive-data) (package-vc--version, package-vc--clone): * lisp/emacs-lisp/package.el (package--reload-previously-loaded): * lisp/emacs-lisp/pp.el (pp--insert-lisp): * lisp/emacs-lisp/subr-x.el (add-display-text-property): * lisp/emacs-lisp/tabulated-list.el (tabulated-list-print): * lisp/emacs-lisp/timer.el (run-at-time): * lisp/emacs-lisp/vtable.el (vtable-goto-table) (vtable-goto-column, vtable-update-object, vtable--insert-line) (vtable--compute-widths, vtable--make-keymap): * lisp/emacs-lisp/warnings.el (display-warning): * lisp/epa-file.el (epa-file-insert-file-contents): * lisp/epa.el (epa-show-key): * lisp/erc/erc-backend.el (erc--split-line, erc--conceal-prompt) (PRIVMSG, erc--get-isupport-entry): * lisp/erc/erc-button.el (erc-button-add-nickname-buttons) (erc--button-next): * lisp/erc/erc-common.el (erc--find-group): * lisp/erc/erc-fill.el (erc-fill, erc-fill-static) (erc-fill--wrap-escape-hidden-speaker) (erc-fill--wrap-unmerge-on-date-stamp) (erc-fill--wrap-massage-initial-message-post-clear) (erc-fill-wrap, erc-fill--wrap-rejigger-region): * lisp/erc/erc-goodies.el (erc--scrolltobottom-all) (erc--keep-place-indicator-on-window-buffer-change) (keep-place-indicator, erc--keep-place-indicator-adjust-on-clear) (erc-keep-place-move, erc--command-indicator-display): * lisp/erc/erc-ibuffer.el (erc-members): * lisp/erc/erc-join.el (erc-join--remove-requested-channel) (erc-autojoin--join): * lisp/erc/erc-networks.el (erc-networks--id-qualifying-init-parts, erc-networks--id-reload) (erc-networks--id-ensure-comparable) (erc-networks--reclaim-orphaned-target-buffers) (erc-networks--server-select): * lisp/erc/erc-nicks.el (erc-nicks-invert) (erc-nicks--redirect-face-widget-link, erc-nicks--highlight) (erc-nicks--highlight-button) (erc-nicks--list-faces-help-button-action, erc-nicks-list-faces) (erc-nicks-refresh, erc-nicks--colors-from-faces) (erc-nicks--track-prioritize) (erc-nicks--remember-face-for-track): * lisp/erc/erc-notify.el (querypoll, erc--querypoll-get-next) (erc--querypoll-on-352, erc--querypoll-send): * lisp/erc/erc-sasl.el (erc-sasl--read-password): * lisp/erc/erc-services.el (erc-services-issue-ghost-and-retry-nick): * lisp/erc/erc-speedbar.el (erc-speedbar--ensure, nickbar) (erc-speedbar-toggle-nicknames-window-lock) (erc-speedbar--compose-nicks-face): * lisp/erc/erc-stamp.el (erc-stamp--recover-on-reconnect) (erc-stamp-prefix-log-filter, erc--conceal-prompt) (erc--insert-timestamp-left, erc-insert-timestamp-right) (erc-stamp--defer-date-insertion-on-post-modify) (erc-insert-timestamp-left-and-right) (erc-stamp--redo-right-stamp-post-clear) (erc-stamp--reset-on-clear, erc-stamp--dedupe-date-stamps): * lisp/erc/erc-status-sidebar.el (bufbar) (erc-status-sidebar-prefer-target-as-name) (erc-status-sidebar-default-allsort, erc-status-sidebar-click): * lisp/erc/erc-track.el (erc-track--shortened-names-get) (erc-track--setup, erc-track--select-mode-line-face) (erc-track-modified-channels, erc-track--collect-faces-in) (erc-track--switch-buffer, erc-track--replace-killed-buffer): * lisp/erc/erc-truncate.el (erc-truncate--setup) (erc-truncate-buffer): * lisp/erc/erc.el (erc--ensure-query-member) (erc--ensure-query-members, erc--remove-channel-users-but) (erc--cusr-change-status, erc--find-mode, erc--update-modules) (erc-log-irc-protocol, erc--refresh-prompt) (erc--restore-important-text-props) (erc--order-text-properties-from-hash, erc-send-input-line) (erc-cmd-IGNORE, erc--unignore-user, erc-cmd-QUERY) (erc-cmd-BANLIST, erc--speakerize-nick) (erc--format-speaker-input-message, erc-channel-receive-names) (erc-send-current-line, erc-format-target-and/or-network) (erc-kill-buffer-function, erc-restore-text-properties) (erc--get-eq-comparable-cmd): * lisp/eshell/em-alias.el (eshell-maybe-replace-by-alias--which) (eshell-maybe-replace-by-alias): * lisp/eshell/em-glob.el (eshell-glob-convert): * lisp/eshell/em-pred.el (eshell-pred-user-or-group) (eshell-pred-file-time, eshell-pred-file-type) (eshell-pred-file-mode, eshell-pred-file-links) (eshell-pred-file-size): * lisp/eshell/em-prompt.el (eshell-forward-paragraph) (eshell-next-prompt): * lisp/eshell/esh-arg.el (eshell-resolve-current-argument): * lisp/eshell/esh-cmd.el (eshell-do-eval, eshell/which) (eshell-plain-command--which, eshell-plain-command): * lisp/eshell/esh-io.el (eshell-duplicate-handles) (eshell-protect-handles, eshell-get-target, eshell-close-target): * lisp/eshell/esh-proc.el (eshell-sentinel): * lisp/eshell/esh-var.el (eshell-parse-variable-ref) (eshell-get-variable, eshell-set-variable): * lisp/faces.el (face-at-point): * lisp/ffap.el (ffap-in-project): * lisp/filenotify.el (file-notify--rm-descriptor): * lisp/files-x.el (read-dir-locals-file) (connection-local-update-profile-variables) (connection-local-value): * lisp/files.el (file-remote-p, abbreviate-file-name) (set-auto-mode, hack-local-variables) (revert-buffer-restore-read-only): * lisp/find-dired.el (find-dired-sort-by-filename): * lisp/font-lock.el (font-lock--filter-keywords): * lisp/gnus/gnus-art.el (article-emojize-symbols): * lisp/gnus/gnus-int.el (gnus-close-server): * lisp/gnus/gnus-search.el (gnus-search-transform) (gnus-search-indexed-parse-output, gnus-search-server-to-engine): * lisp/gnus/gnus-sum.el (gnus-collect-urls, gnus-shorten-url): * lisp/gnus/gnus.el (gnus-check-backend-function): * lisp/gnus/message.el (message-send-mail): * lisp/gnus/mml.el (mml-generate-mime, mml-insert-mime-headers): * lisp/gnus/nnatom.el (nnatom--read-feed, nnatom--read-article) (nnatom--read-article-or-group-authors, nnatom--read-publish) (nnatom--read-update, nnatom--read-links): * lisp/gnus/nnfeed.el (nnfeed--read-server, nnfeed--write-server) (nnfeed--parse-feed, nnfeed--group-data, nnfeed-retrieve-article) (nnfeed-retrieve-headers, nnfeed--print-part) (nnfeed-request-article, nnfeed-request-group) (nnfeed-request-list, nnfeed--group-description) (nnfeed-request-group-description) (nnfeed-request-list-newsgroups, nnfeed-request-rename-group): * lisp/gnus/nnmh.el (nnmh-update-gnus-unreads): * lisp/help-fns.el (help-find-source) (help-fns--insert-menu-bindings, help-fns--mention-first-release) (help-fns--mention-shortdoc-groups) (help-fns--customize-variable-version) (help-fns--face-custom-version-info, describe-mode): * lisp/help-mode.el (help-make-xrefs): * lisp/help.el (help-key-description, help--describe-command): * lisp/hfy-cmap.el (htmlfontify-load-rgb-file): * lisp/ibuf-ext.el (ibuffer-jump-to-filter-group) (ibuffer-kill-filter-group, ibuffer-kill-line) (ibuffer-save-filter-groups, ibuffer-save-filters, filename) (basename, file-extension, ibuffer-diff-buffer-with-file-1) (ibuffer-mark-by-file-name-regexp) (ibuffer-mark-by-content-regexp): * lisp/ibuf-macs.el (ibuffer-aif, ibuffer-awhen): * lisp/ibuffer.el (ibuffer-mouse-toggle-mark) (ibuffer-toggle-marks, ibuffer-mark-interactive) (ibuffer-compile-format, process, ibuffer-map-lines): * lisp/image.el (image--compute-map) (image--compute-original-map): * lisp/image/exif.el (exif-parse-buffer): * lisp/image/image-converter.el (image-convert-p, image-convert) (image-converter--find-converter): * lisp/image/image-dired-util.el (image-dired-file-name-at-point): * lisp/image/image-dired.el (image-dired-track-original-file) (image-dired--on-file-in-dired-buffer) (image-dired--with-thumbnail-buffer) (image-dired-jump-original-dired-buffer) (image-dired--slideshow-step, image-dired-display-image): * lisp/image/wallpaper.el (wallpaper--init-action-kill) (wallpaper--find-setter, wallpaper--find-command) (wallpaper--find-command-args, wallpaper--x-monitor-name): * lisp/info-look.el (info-lookup-interactive-arguments) (info-complete)::(:mode): * lisp/info.el (info-pop-to-buffer, Info-read-node-name-1): * lisp/international/emoji.el (emoji--adjust-displayable-1) (emoji--add-recent): * lisp/jsonrpc.el (jsonrpc--call-deferred) (jsonrpc--process-sentinel, jsonrpc--remove): * lisp/keymap.el (keymap-local-lookup): * lisp/mail/emacsbug.el (report-emacs-bug-hook) (submit-emacs-patch): * lisp/mail/ietf-drums.el (ietf-drums-parse-addresses): * lisp/mail/mailclient.el (mailclient-send-it): * lisp/mail/rfc6068.el (rfc6068-parse-mailto-url): * lisp/mail/undigest.el (rmail-digest-parse-mixed-mime): * lisp/minibuffer.el (completion-metadata-get) (completions--after-change) (minibuffer-visible-completions--filter): * lisp/net/browse-url.el (browse-url-url-at-point) (browse-url-file-url, browse-url-emacs): * lisp/net/dbus.el (dbus-byte-array-to-string) (dbus-monitor-goto-serial): * lisp/net/dictionary.el (dictionary-search): * lisp/net/eww.el (eww--download-directory) (eww-auto-rename-buffer, eww-open-in-new-buffer, eww-submit) (eww-follow-link, eww-read-alternate-url) (eww-copy-alternate-url): * lisp/net/goto-addr.el (goto-address-at-point): * lisp/net/mailcap.el (mailcap-mime-info): * lisp/net/rcirc.el (rcirc, rcirc-connect, rcirc-send-string) (rcirc-kill-buffer-hook, rcirc-print, rcirc-when) (rcirc-color-attributes, rcirc-handler-NICK) (rcirc-handler-TAGMSG, rcirc-handler-BATCH): * lisp/net/shr.el (shr-descend, shr-adaptive-fill-function) (shr-correct-dom-case, shr-tag-a): * lisp/net/sieve.el (sieve-manage-quit): * lisp/outline.el (outline-cycle-buffer): * lisp/pcmpl-git.el (pcmpl-git--tracked-file-predicate): * lisp/proced.el (proced-auto-update-timer): * lisp/progmodes/bug-reference.el (bug-reference-try-setup-from-vc): * lisp/progmodes/c-ts-common.el (c-ts-common--fill-paragraph): * lisp/progmodes/c-ts-mode.el (c-ts-mode--preproc-offset) (c-ts-mode--anchor-prev-sibling, c-ts-mode-indent-defun): * lisp/progmodes/compile.el (compilation-error-properties) (compilation-find-file-1): * lisp/progmodes/eglot.el (eglot--check-object) (eglot--read-server, eglot-upgrade-eglot) (eglot-handle-notification, eglot--CompletionParams) (eglot-completion-at-point, eglot--sig-info) (eglot-register-capability): * lisp/progmodes/elisp-mode.el (emacs-lisp-native-compile-and-load) (elisp-eldoc-var-docstring-with-value): * lisp/progmodes/erts-mode.el (erts-mode--goto-start-of-test): * lisp/progmodes/flymake.el (flymake--update-eol-overlays) (flymake-eldoc-function): * lisp/progmodes/gdb-mi.el (gdb-breakpoints-list-handler-custom) (gdb-frame-handler): * lisp/progmodes/go-ts-mode.el (go-ts-mode-docstring) (go-ts-mode--comment-on-previous-line-p) (go-ts-mode--get-test-regexp-at-point) (go-ts-mode-test-this-file): * lisp/progmodes/grep.el (lgrep, rgrep-default-command) (grep-file-at-point): * lisp/progmodes/perl-mode.el (perl--end-of-format-p): * lisp/progmodes/php-ts-mode.el (php-ts-mode--anchor-prev-sibling, php-ts-mode--indent-defun): * lisp/progmodes/project.el (project--other-place-command) (project--find-default-from, project--transplant-file-name) (project-prefixed-buffer-name, project--remove-from-project-list) (project-prompt-project-name, project-remember-projects-under) (project--switch-project-command) (project-uniquify-dirname-transform, project-mode-line-format): * lisp/progmodes/python.el (python-font-lock-keywords-maximum-decoration) (python--treesit-fontify-union-types) (python-shell-get-process-name, python-shell-restart) (python-shell-completion-at-point, python-ffap-module-path) (python-util-comint-end-of-output-p, python--import-sources) (python-add-import, python-remove-import, python-fix-imports): * lisp/progmodes/xref.el (xref--add-log-current-defun): * lisp/repeat.el (repeat-echo-message-string): * lisp/saveplace.el (save-place-dired-hook): * lisp/server.el (server-save-buffers-kill-terminal): * lisp/shadowfile.el (shadow-make-fullname) (shadow-contract-file-name, shadow-define-literal-group): * lisp/shell.el (shell-highlight-undef-mode): * lisp/simple.el (command-completion-using-modes-p) (command-execute, file-user-uid, file-group-gid) (first-completion, last-completion, switch-to-completions): * lisp/startup.el (startup--load-user-init-file): * lisp/tab-line.el (tab-line-tabs-buffer-group-by-project): * lisp/tar-mode.el (tar-goto-file, tar-next-file-displayer): * lisp/term/android-win.el (android-encode-select-string) (gui-backend-set-selection): * lisp/term/haiku-win.el (haiku-dnd-convert-string) (haiku-select-encode-xstring, haiku-select-encode-utf-8-string): * lisp/textmodes/emacs-news-mode.el (emacs-news--buttonize): * lisp/textmodes/ispell.el (ispell-completion-at-point): * lisp/textmodes/sgml-mode.el (sgml-validate) (html-mode--complete-at-point): * lisp/textmodes/tex-mode.el (tex-recenter-output-buffer) (xref-backend-references): * lisp/thingatpt.el (thing-at-point-file-at-point) (thing-at-point-face-at-point): * lisp/thread.el (thread-list--get-status): * lisp/time.el (world-clock-copy-time-as-kill, world-clock): * lisp/touch-screen.el (touch-screen-handle-touch): * lisp/treesit.el (treesit-language-at, treesit-node-at) (treesit-node-on, treesit-buffer-root-node) (treesit-node-field-name, treesit-local-parsers-at) (treesit-local-parsers-on, treesit--cleanup-local-range-overlays) (treesit-font-lock-recompute-features) (treesit-font-lock-fontify-region, treesit-transpose-sexps) (treesit-add-log-current-defun, treesit-major-mode-setup) (treesit--explorer-refresh, treesit-install-language-grammar): * lisp/url/url.el (url-retrieve-synchronously): * lisp/vc/smerge-mode.el (smerge-diff): * lisp/vc/vc-dir.el (vc-dir): * lisp/vc/vc-dispatcher.el (vc-do-async-command): * lisp/vc/vc-git.el (vc-git-dir--branch-headers) (vc-git-dir--stash-headers, vc-git--log-edit-summary-check) (vc-git-stash-list): * lisp/vc/vc.el (vc-responsible-backend, vc-buffer-sync-fileset) (vc-clone): * lisp/visual-wrap.el (visual-wrap--apply-to-line): * lisp/wid-edit.el (widget-text) (widget-editable-list-insert-before): * lisp/window-tool-bar.el (window-tool-bar--keymap-entry-to-string): * lisp/window.el (display-buffer, display-buffer-full-frame) (window-point-context-set, window-point-context-use) (window-point-context-use-default-function): * lisp/xdg.el (xdg-current-desktop): * lisp/xwidget.el (xwidget-webkit-callback): * lisp/yank-media.el (yank-media--get-selection) (yank-media-types): * test/lisp/comint-tests.el (comint-tests/test-password-function): * test/lisp/completion-preview-tests.el (completion-preview-tests--capf): * test/lisp/cus-edit-tests.el (with-cus-edit-test): * test/lisp/erc/erc-scenarios-base-local-modules.el (-phony-sblm-): * test/lisp/erc/erc-scenarios-stamp.el (erc-scenarios-stamp--on-post-modify): * test/lisp/erc/erc-services-tests.el (erc-services-tests--asp-parse-entry): * test/lisp/erc/erc-tests.el (erc-modules--internal-property) (erc--find-mode, erc-tests--update-modules): * test/lisp/erc/resources/erc-d/erc-d-i.el (erc-d-i--parse-message): * test/lisp/erc/resources/erc-d/erc-d-t.el (erc-d-t-kill-related-buffers, erc-d-t-with-cleanup): * test/lisp/erc/resources/erc-d/erc-d-tests.el (erc-d-i--parse-message--irc-parser-tests): * test/lisp/erc/resources/erc-d/erc-d-u.el (erc-d-u--read-exchange-slowly): * test/lisp/erc/resources/erc-d/erc-d.el (erc-d--expire) (erc-d--finalize-done, erc-d--command-handle-all): * test/lisp/erc/resources/erc-scenarios-common.el (erc-scenarios-common-with-cleanup): * test/lisp/erc/resources/erc-tests-common.el (erc-tests--common-display-message) (erc-tests-common-create-subprocess): * test/lisp/ibuffer-tests.el (ibuffer-test-Bug25058): * test/lisp/international/mule-tests.el (mule-cmds-tests--ucs-names-missing-names): * test/lisp/progmodes/python-tests.el (python-tests-get-shell-interpreter) (python-tests--get-interpreter-info): * test/lisp/progmodes/ruby-ts-mode-tests.el (ruby-ts-resource-file): * test/lisp/replace-tests.el (replace-tests-with-undo): * test/src/emacs-tests.el (emacs-tests--seccomp-debug): * test/src/process-tests.el (process-tests--emacs-command) (process-tests--emacs-binary, process-tests--dump-file): * test/src/treesit-tests.el (treesit--ert-test-defun-navigation): Replace use of the now-obsolete if-let and when-let.
* Use a dedicated type to represent interpreted-function valuesStefan Monnier2024-04-281-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change `function` so that when evaluating #'(lambda ...) we return an object of type `interpreted-function` rather than a list starting with one of `lambda` or `closure`. The new type reuses the existing PVEC_CLOSURE (nee PVEC_COMPILED) tag and tries to align the corresponding elements: - the arglist, the docstring, and the interactive-form go in the same slots as for byte-code functions. - the body of the function goes in the slot used for the bytecode string. - the lexical context goes in the slot used for the constants of bytecoded functions. The first point above means that `help-function-arglist`, `documentation`, and `interactive-form`s don't need to distinguish interpreted and bytecode functions any more. Main benefits of the change: - We can now reliably distinguish a list from a function value. - `cl-defmethod` can dispatch on `interactive-function` and `closure`. Dispatch on `function` also works now for interpreted functions but still won't work for functions represented as lists or as symbols, of course. - Function values are now self-evaluating. That was alrready the case when byte-compiled, but not when interpreted since (eval '(closure ...)) signals a void-function error. That also avoids false-positive warnings about "don't quote your lambdas" when doing things like `(mapcar ',func ...)`. * src/eval.c (Fmake_interpreted_closure): New function. (Ffunction): Use it and change calling convention of `Vinternal_make_interpreted_closure_function`. (FUNCTIONP, Fcommandp, eval_sub, funcall_general, funcall_lambda) (Ffunc_arity, lambda_arity): Simplify. (funcall_lambda): Adjust to new representation. (syms_of_eval): `defsubr` the new function. Remove definition of `Qclosure`. * lisp/emacs-lisp/cconv.el (cconv-make-interpreted-closure): Change calling convention and use `make-interpreted-closure`. * src/data.c (Fcl_type_of): Distinguish `byte-code-function`s from `interpreted-function`s. (Fclosurep, finterpreted_function_p): New functions. (Fbyte_code_function_p): Don't be confused by `interpreted-function`s. (Finteractive_form, Fcommand_modes): Simplify. (syms_of_data): Define new type symbols and `defsubr` the two new functions. * lisp/emacs-lisp/cl-print.el (cl-print-object) <interpreted-function>: New method. * lisp/emacs-lisp/oclosure.el (oclosure): Refine the parent to be `closure`. (oclosure--fix-type, oclosure-type): Simplify. (oclosure--copy, oclosure--get, oclosure--set): Adjust to new representation. * src/callint.c (Fcall_interactively): Adjust to new representation. * src/lread.c (bytecode_from_rev_list): * lisp/simple.el (function-documentation): * lisp/help.el (help-function-arglist): Remove the old `closure` case and adjust the byte-code case so it handles `interpreted-function`s. * lisp/emacs-lisp/cl-preloaded.el (closure): New type. (byte-code-function): Add it as a parent. (interpreted-function): Adjust parent (the type itself was already added earlier by accident). * lisp/emacs-lisp/bytecomp.el (byte-compile--reify-function): Adjust to new representation. (byte-compile): Use `interpreted-function-p`. * lisp/emacs-lisp/byte-opt.el (byte-compile-inline-expand): Adjust to new representation. (side-effect-free-fns): Add `interpreted-function-p` and `closurep`. * src/profiler.c (trace_hash, ffunction_equal): Simplify. * lisp/profiler.el (profiler-function-equal): Simplify. * lisp/emacs-lisp/nadvice.el (advice--interactive-form-1): Use `interpreted-function-p`; adjust to new representation; and take advantage of the fact that function values are now self-evaluating. * lisp/emacs-lisp/lisp-mode.el (closure): Remove `lisp-indent-function` property. * lisp/emacs-lisp/disass.el (disassemble-internal): Adjust to new representation. * lisp/emacs-lisp/edebug.el (edebug--strip-instrumentation): Use `interpreted-function-p`. * lisp/emacs-lisp/comp-common.el (comp-known-type-specifiers): Add `closurep` and `interpreted-function-p`. * test/lisp/help-fns-tests.el (help-fns-test-lisp-defun): Adjust to more precise type info in `describe-function`. * test/lisp/erc/resources/erc-d/erc-d-tests.el (erc-d--render-entries): Use `interpreted-function-p`. * test/lisp/emacs-lisp/macroexp-resources/vk.el (vk-f4, vk-f5): Don't hardcode function values. * doc/lispref/functions.texi (Anonymous Functions): Don't suggest that function values are lists. Reword "self-quoting" to reflect the fact that #' doesn't return the exact same object. Update examples with the new shape of the return value. * doc/lispref/variables.texi (Lexical Binding): * doc/lispref/lists.texi (Rearrangement): * doc/lispref/control.texi (Handling Errors): Update examples to reflect new representation of function values.
* * lisp/subr.el (with-output-to-temp-buffer): Add `indent` ruleStefan Monnier2024-02-091-1/+0
|
* Increase `emacs-lisp-docstring-fill-column` to 72Stefan Kangas2024-02-021-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Monitors are wider now than when these defaults were first set, and it is useful to take better advantage of that, to fit text on fewer lines. Yet, it has repeatedly been shown that overly long lines reduce readability: "A reasonable guideline would be 55 to 75 characters per line."[1] We also don't want to disfavor narrow displays, like mobile phones; a more promising direction here might be to automatically word wrap docstrings and make their maximum width customizable. That might require a new docstring format, however. Bumping it by 7 characters, from 65 to 72, seems a reasonable compromise for now. Consideration was given to increasing it to 70 or 75, but 72 happens to be a commonly recommended maximum line width elsewhere (see Fortran 66, Python docstrings, commit message recommendations, etc.), and we might as well do the same. This change was discussed in: https://lists.gnu.org/r/emacs-devel/2022-07/msg00217.html [1] "Optimal Line Length in Reading — A Literature Review", Nanavati and Bias, Visible Language, Vol. 39 No. 2 (2005). https://journals.uc.edu/index.php/vl/article/view/5765 * lisp/emacs-lisp/lisp-mode.el (emacs-lisp-docstring-fill-column): * .dir-locals.el (fill-column, emacs-lisp-docstring-fill-column): Bump default to 72.
* New special form `handler-bind`Stefan Monnier2024-01-041-3/+2
| | | | | | | | | | | | | | | | | | | | | | | AFAIK, this provides the same semantics as Common Lisp's `handler-bind`, modulo the differences about how error objects and conditions are represented. * lisp/subr.el (handler-bind): New macro. * src/eval.c (pop_handler): New function. (Fhandler_Bind_1): New function. (signal_or_quit): Handle new handlertypes `HANDLER` and `SKIP_CONDITIONS`. (find_handler_clause): Simplify. (syms_of_eval): Defsubr `Fhandler_bind_1`. * doc/lispref/control.texi (Handling Errors): Add `handler-bind`. * test/src/eval-tests.el (eval-tests--handler-bind): New test. * lisp/emacs-lisp/lisp-mode.el (lisp-font-lock-keywords): Move 'handler-bind' from CL-only to generic Lisp. (handler-bind): Remove indentation setting, it now lives in the macro definition.
* Merge from savannah/emacs-29Po Lu2024-01-021-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dc4e6b13296 ; Update copyright years in more files 64b37776318 ; Run set-copyright from admin.el 8e1c56ae467 ; Add 2024 to copyright years # Conflicts: # doc/misc/modus-themes.org # doc/misc/texinfo.tex # etc/NEWS # etc/refcards/ru-refcard.tex # etc/themes/modus-operandi-theme.el # etc/themes/modus-themes.el # etc/themes/modus-vivendi-theme.el # lib/alloca.in.h # lib/binary-io.h # lib/c-ctype.h # lib/c-strcasecmp.c # lib/c-strncasecmp.c # lib/careadlinkat.c # lib/cloexec.c # lib/close-stream.c # lib/diffseq.h # lib/dup2.c # lib/filemode.h # lib/fpending.c # lib/fpending.h # lib/fsusage.c # lib/getgroups.c # lib/getloadavg.c # lib/gettext.h # lib/gettime.c # lib/gettimeofday.c # lib/group-member.c # lib/malloc.c # lib/md5-stream.c # lib/md5.c # lib/md5.h # lib/memmem.c # lib/memrchr.c # lib/nanosleep.c # lib/save-cwd.h # lib/sha1.c # lib/sig2str.c # lib/stdlib.in.h # lib/strtoimax.c # lib/strtol.c # lib/strtoll.c # lib/time_r.c # lib/xalloc-oversized.h # lisp/auth-source-pass.el # lisp/emacs-lisp/lisp-mnt.el # lisp/emacs-lisp/timer.el # lisp/info-look.el # lisp/jit-lock.el # lisp/loadhist.el # lisp/mail/rmail.el # lisp/net/ntlm.el # lisp/net/webjump.el # lisp/progmodes/asm-mode.el # lisp/progmodes/project.el # lisp/progmodes/sh-script.el # lisp/textmodes/flyspell.el # lisp/textmodes/reftex-toc.el # lisp/textmodes/reftex.el # lisp/textmodes/tex-mode.el # lisp/url/url-gw.el # m4/alloca.m4 # m4/clock_time.m4 # m4/d-type.m4 # m4/dirent_h.m4 # m4/dup2.m4 # m4/euidaccess.m4 # m4/fchmodat.m4 # m4/filemode.m4 # m4/fsusage.m4 # m4/getgroups.m4 # m4/getloadavg.m4 # m4/getrandom.m4 # m4/gettime.m4 # m4/gettimeofday.m4 # m4/gnulib-common.m4 # m4/group-member.m4 # m4/inttypes.m4 # m4/malloc.m4 # m4/manywarnings.m4 # m4/mempcpy.m4 # m4/memrchr.m4 # m4/mkostemp.m4 # m4/mktime.m4 # m4/nproc.m4 # m4/nstrftime.m4 # m4/pathmax.m4 # m4/pipe2.m4 # m4/pselect.m4 # m4/pthread_sigmask.m4 # m4/readlink.m4 # m4/realloc.m4 # m4/sig2str.m4 # m4/ssize_t.m4 # m4/stat-time.m4 # m4/stddef_h.m4 # m4/stdint.m4 # m4/stdio_h.m4 # m4/stdlib_h.m4 # m4/stpcpy.m4 # m4/strnlen.m4 # m4/strtoimax.m4 # m4/strtoll.m4 # m4/time_h.m4 # m4/timegm.m4 # m4/timer_time.m4 # m4/timespec.m4 # m4/unistd_h.m4 # m4/warnings.m4 # nt/configure.bat # nt/preprep.c # test/lisp/register-tests.el
| * ; Add 2024 to copyright yearsPo Lu2024-01-021-1/+1
| |
* | ; Delete redundant defvars; font-lock is preloadedStefan Kangas2023-08-251-5/+0
| |
* | Add 'define-error' to font lock keywords for emacs-lisp-modeNeal Sidhwaney2023-07-261-1/+1
| | | | | | | | | | | | | | | | | | | | * 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
* | lisp-mode.el: Add defvar-keymap to lisp-imenu-generic-expressionBrian Leung2023-07-261-1/+1
| | | | | | | | | | | | | | | | * 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)
* | Call them “bracket expressions” more consistentlyPaul Eggert2023-06-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | Emacs comments and doc were inconsistent about the name used for regexps like [a-z]. Sometimes it called them “character alternatives”, sometimes “character sets”, sometimes “bracket expressions”. Prefer “bracket expressions” as it is less confusing: POSIX and most other programs’ doc uses “bracket expressions”, “alternative” is also used in the Emacs documentation to talk about ...\|... in regexps, and “character set” normally has a different meaning in Emacs.
* | * lisp/emacs-lisp/lisp-mode.el (lisp-ppss): Fix performance bugStefan Monnier2023-06-171-1/+1
|/ | | | | | | (nth 2 ppss) can be absent but not incorrect, so don't recompute ppss for (nth 2 ppss) when (nth 2 ppss) is already provided. When calling `lisp-indent-line` on all the lines in a region, this sometimes introduced a gratuitous O(N²) complexity.
* lisp-mode: add docstring recognition for more common lisp symbolsNicolas Martyanoff2023-02-091-0/+3
| | | | | | * lisp/emacs-lisp/lisp-mode.el (define-compiler-macro) (define-setf-expander, deftype): Add the 'doc-string-elt' property for proper docstring highlighting in Common Lisp.
* Fix docstring fontification of CL's 'defstruct'Eli Zaretskii2023-02-021-0/+1
| | | | | | | * lisp/emacs-lisp/lisp-mode.el (defstruct): Set 'doc-string' property. Patch by Nicolas Martyanoff <nicolas@n16f.net>. Copyright-paperwork-exempt: yes
* ; Add 2023 to copyright years.Eli Zaretskii2023-01-011-1/+1
|
* Restore font-lock-type-face for lisp mode &symbolsTom Gillespie2022-12-041-2/+2
| | | | | | | | | | * lisp/emacs-lisp/lisp-mode.el (lisp-cl-font-lock-keywords-2) (lisp-el-font-lock-keywords-2): Restore use of type face instead of builtin face for &symbol keywords. This fixes what appears to be a copy paste error that changed the face for common lisp and emacs lisp &symbol style keywords that was introduced in commit a498e5f83 by restoring the type face to font-lock-type-face as consistent with the comments.
* Get fewer false positives for :keyword and &optionsLars Ingebrigtsen2022-09-201-6/+21
| | | | | | | * lisp/emacs-lisp/lisp-mode.el (lisp-mode--search-key): New function to check more carefully for start of :keywords and &options (bug#51574). (lisp-fdefs): Use it.
* Revert the changes to lisp-current-defun-nameLars Ingebrigtsen2022-08-231-55/+18
| | | | | | | | * lisp/emacs-lisp/lisp-mode.el (lisp-current-defun-name): Revert back to the old version before bug#49592. The new approach just doesn't work well enough -- we don't really have the data to know that, say, `make-obsolete-variable' is about the second symbol and not the first.
* Further lisp-current-defun-name tweaksLars Ingebrigtsen2022-08-151-2/+7
| | | | | | * lisp/emacs-lisp/lisp-mode.el (lisp-current-defun-name): Further tweaks to make (autoload 'foo) work again. Perhaps this should all be reverted to the original version and then given a new rething.
* Further lisp-current-defun-name tweaksLars Ingebrigtsen2022-08-091-1/+1
| | | | | * lisp/emacs-lisp/lisp-mode.el (lisp-current-defun-name): Tweak so that cl-defmethod and friends work again.
* Another lisp-current-defun-name tweakMichael Heerdegen2022-08-091-1/+1
| | | | | * lisp/emacs-lisp/lisp-mode.el (lisp-current-defun-name): Avoid error when edebug spec is the symbol t.
* Further lisp-current-defun-name tweaksLars Ingebrigtsen2022-08-081-2/+6
| | | | | * lisp/emacs-lisp/lisp-mode.el (lisp-current-defun-name): Further tweaks to finding the symbol being defined (defalias).
* Make which-func-mode output less junkLars Ingebrigtsen2022-08-081-18/+46
| | | | | | | * lisp/emacs-lisp/lisp-mode.el (lisp-current-defun-name): Use edebug specs to find the name (if they exist), and default to returning the top-level symbol if there isn't a define-like form (bug#49592).
* Fix `M-x lisp-fill-paragraph'Lars Ingebrigtsen2022-07-111-1/+4
| | | | | | * lisp/emacs-lisp/lisp-mode.el (lisp-fill-paragraph): Fix filling when called directly with `M-x lisp-fill-paragraph' instead of via `M-q' (bug#56476).
* Prefer defcustom :safe to putting 'safe-local-variable'Stefan Kangas2022-07-061-7/+5
| | | | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/lisp-mode.el (lisp-indent-offset) (lisp-body-indent, emacs-lisp-docstring-fill-column): * lisp/files.el (version-control): * lisp/progmodes/modula2.el (m2-indent): * lisp/progmodes/octave.el (octave-block-offset): * lisp/progmodes/sh-script.el (sh-basic-offset): * lisp/progmodes/tcl.el (tcl-indent-level) (tcl-continued-indent-level): * lisp/simple.el (fill-prefix): * lisp/textmodes/fill.el (colon-double-space): * lisp/textmodes/paragraphs.el (paragraph-start) (paragraph-separate, sentence-end-double-space) (sentence-end-without-period, sentence-end-without-space) (sentence-end, sentence-end-base, page-delimiter) (paragraph-ignore-fill-prefix): * lisp/textmodes/tex-mode.el (tex-fontify-script): * lisp/vc/add-log.el (add-log-dont-create-changelog-file): * lisp/vc/vc-hooks.el (vc-follow-symlinks): Prefer defcustom :safe to putting 'safe-local-variable'.
* Prefer defvar-keymap in emacs-lisp/*.elStefan Kangas2022-07-041-19/+16
| | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/backtrace.el (backtrace-mode-map): * lisp/emacs-lisp/bytecomp.el (emacs-lisp-compilation-mode-map): * lisp/emacs-lisp/checkdoc.el (checkdoc-minor-mode-map): * lisp/emacs-lisp/crm.el (crm-local-completion-map) (crm-local-must-match-map): * lisp/emacs-lisp/debug.el (debugger-mode-map): * lisp/emacs-lisp/edebug.el (edebug-mode-map, edebug-global-map) (edebug-eval-mode-map): * lisp/emacs-lisp/eieio-custom.el (eieio-custom-mode-map): * lisp/emacs-lisp/elp.el (elp-results-symname-map): * lisp/emacs-lisp/lisp-mode.el (lisp-mode-shared-map): * lisp/emacs-lisp/re-builder.el (reb-mode-map) (reb-lisp-mode-map, reb-subexp-mode-map): * lisp/emacs-lisp/tabulated-list.el (tabulated-list-mode-map) (tabulated-list-sort-button-map): * lisp/emacs-lisp/timer-list.el (timer-list-mode-map):
* ; remove regexp ambiguityMattias Engdegård2022-07-041-4/+4
|
* Remove some useless `eval-when-compile`Mattias Engdegård2022-07-041-51/+45
| | | | | | | | | | | | | | | | | | | * lisp/cedet/semantic/java.el (semantic-java-number-regexp): * lisp/cedet/semantic/lex.el (semantic-lex-number-expression): * lisp/emacs-lisp/cl-indent.el (common-lisp-indent-function-1): * lisp/emacs-lisp/lisp-mode.el (lisp-imenu-generic-expression) (lisp--el-match-keyword, lisp-string-in-doc-position-p): * lisp/emacs-lisp/shorthands.el (shorthands-font-lock-shorthands): * lisp/net/socks.el (socks-send-command): * lisp/progmodes/meta-mode.el (meta-font-lock-keywords): * lisp/shell.el (shell--parse-pcomplete-arguments): * lisp/textmodes/sgml-mode.el (sgml-mode): * lisp/textmodes/tex-mode.el (tex--guess-mode) (tex-common-initialization, tex-input-files-re): * lisp/textmodes/tildify.el (tildify-mode): * lisp/xdg.el (xdg-line-regexp): Eliminate `eval-when-compile` when the argument would be evaluated by the compiler anyway.
* Replace lisp-mode-symbol-regexp with (rx lisp-mode-symbol)Mattias Engdegård2022-07-041-26/+30
| | | | | | | | | | | | | This is shorter, simplifies use inside rx expressions, and removes need for eval-when-compile elsewhere (for later exploitation). * lisp/emacs-lisp/lisp-mode.el (lisp-mode-symbol): New rx-define. (lisp-mode-symbol-regexp): Redefine using lisp-mode-symbol. (lisp-imenu-generic-expression, lisp--el-match-keyword) (lisp-fdefs, lisp-string-in-doc-position-p): * lisp/emacs-lisp/checkdoc.el (checkdoc--error-bad-format-p): * lisp/emacs-lisp/shorthands.el (shorthands-font-lock-shorthands): Use lisp-mode-symbol instead of lisp-mode-symbol-regexp.
* Simplify lisp-el-font-lock-keywords-2 definition slightlyStefan Kangas2022-07-031-8/+6
| | | | | * lisp/emacs-lisp/lisp-mode.el (lisp-el-font-lock-keywords-2): Simplify slightly.
* Font lock \\<> and \\{} command substitutions in docstringsStefan Kangas2022-07-031-1/+5
| | | | | * lisp/emacs-lisp/lisp-mode.el (lisp-el-font-lock-keywords-2): Support \\<> and \\{} command substitutions.
* Font lock \\`' command substitutions in docstringsStefan Kangas2022-07-021-2/+8
| | | | | * lisp/emacs-lisp/lisp-mode.el (lisp-el-font-lock-keywords-2): Support \\`' command substitutions.
* Fix a recent Lisp mode filling test failureLars Ingebrigtsen2022-06-261-0/+12
| | | | | * lisp/emacs-lisp/lisp-mode.el (lisp-fill-paragraph): Restore the "fill first line separately" logic.
* Make `M-q' work on the first line of a multi-line string againLars Ingebrigtsen2022-06-251-2/+2
| | | | | * lisp/emacs-lisp/lisp-mode.el (lisp-fill-paragraph): Exclude the quote marks from the region so that filling works (bug#56197).
* Fix warnings introduced by the lisp-mode-autoload-regexp changeLars Ingebrigtsen2022-06-041-1/+1
| | | | | * lisp/emacs-lisp/lisp-mode.el (lisp-fdefs): The package name bit in ###;;;foo-autoload may be missing, so do a lax match (bug#55784).
* Add a face to \\= doc string escapesLars Ingebrigtsen2022-06-041-0/+3
| | | | | * lisp/emacs-lisp/lisp-mode.el (lisp-fdefs): Add a face to \\= doc string escapes (bug#55783).