summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/lisp-mode.el
Commit message (Collapse)AuthorAgeFilesLines
* Indent `closure' forms betterLars Ingebrigtsen2021-11-251-0/+1
| | | | | * lisp/emacs-lisp/lisp-mode.el (closure): Indent `closure' forms better (bug#52063).
* ; * lisp/emacs-lisp/lisp-mode.el: Restore one check in flet handlingakater2021-11-091-6/+6
| | | | | * lisp/emacs-lisp/lisp-mode.el (lisp--local-defform-body-p): Do check backward-up-list executing without errors (bug#9622).
* lisp/emacs-lisp/lisp-mode.el: Fix parser state corruption.akater2021-11-081-6/+7
| | | | | | | * lisp/emacs-lisp/lisp-mode.el (lisp--local-defform-body-p): Preserve the point. * test/lisp/progmodes/elisp-mode-resources/flet.erts: Add corresponding test example (bug#9622).
* Indent cl-flet-like forms correctly in incomplete expressionsakater2021-10-281-42/+32
| | | | | | | | * lisp/emacs-lisp/lisp-mode.el (lisp--local-defform-body-p): Support incomplete sexps * test/lisp/progmodes/elisp-mode-resources/flet.erts: Add tests for incomplete sexps (bug#9622).
* Merge from origin/emacs-28Glenn Morris2021-10-221-4/+5
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | b0d64be0bc (origin/emacs-28) Improve some NEWS entries 7fde84e881 Improve documentation of syntax-ppss-context slightly 5ecbed01b2 ; * test/lisp/mh-e/mh-utils-tests.el: Update macro declara... 168665da59 Move some xwidget entries efde024361 time-stamp-tests: improvements to test macros 06c944cff1 Fix rfc6068-parse-mailto-url autoload 9b6b5e37ef Regexp-quote github domains in bug-reference 1f6cdeb12c Ensure valid end/beginning lines in message-mark-inserted-... 9b46150ab0 * etc/NEWS: Improve 'repeat-mode' entry. 9c37b812da ; * lisp/repeat.el (repeat-mode): Fix docstring typo. caf87d80fa * lisp/repeat.el (repeat-keep-prefix): Expand description. 24083c8d13 * lisp/net/eww.el (eww-retrieve-command): Add :tag. cf7d8fb1d7 Add description of cards to etc/refcards/README d2849cc645 Fix 'calculate-lisp-indent' when "[" starts containing sex... 2a0a368ddc Fix typo in doc/emacs/anti.texi 9529e1d2fb Update doc of Edebug specification for macros 5bc522b4f4 ; * lisp/simple.el (kill-region): A better fix for bug#51320. ee6bdd6eef Fix non-interactive behavior of 'kill-region' 2b7655ca0e ; More accurate doc string for 'tab-bar-format' 2841e26744 * test/lisp/dabbrev-tests.el: Use 'kbd' for readable keys. 1cdb4d2077 * lisp/menu-bar.el (menu-bar-keymap): Add optional arg KEY... # Conflicts: # etc/NEWS # lisp/progmodes/bug-reference.el
| * Fix 'calculate-lisp-indent' when "[" starts containing sexp (Bug#51312)Martin Rudalics2021-10-221-4/+5
| | | | | | | | | | | | * lisp/emacs-lisp/lisp-mode.el (calculate-lisp-indent): Handle arbitrary paren syntax after skipping whitespace backwards within containing sexp (Bug#51312).
* | Add indentation rules for DEFUN's def* functionsLars Ingebrigtsen2021-10-181-0/+7
| |
* | Remove the "def" indentation heuristicLars Ingebrigtsen2021-10-181-3/+0
| | | | | | | | | | | | * lisp/emacs-lisp/lisp-mode.el (lisp-indent-function): Don't indent function calls with names that that start with "def" specially (bug#43329).
* | Fontify :doc keywords as documentationLars Ingebrigtsen2021-10-181-1/+3
| | | | | | | | | | * lisp/emacs-lisp/lisp-mode.el (lisp-string-after-doc-keyword-p): Extend to :doc, too (bug#51230).
* | Merge from origin/emacs-28Glenn Morris2021-10-051-2/+2
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 63abe976ce (origin/emacs-28) Document minibuffer-default-prompt-forma... b5afbedc90 Backward compatibility option for 'nobreak-char-display' ea1b728a06 ; * lisp/dired.el: Fix typo. 984eafeb98 Unbreak the build after Gnulib update 5946370cd1 Check, whether an FUSE mount has been broken in Tramp 90575a6c0c Disable 'nobreak-char-display' in Eldoc buffers 570e2c9a17 Fix small error in comint-send-input fd7bb31412 Update documentation of search-whitespace-regexp 1f4ced47a1 Fix cc-compat.el syntax error b431f54c1b Mention `seq-uniq' in `delete-dups' documentation 0a7bab689c ; Minor stylistic fixes found by checkdoc e2861e2d08 ; * etc/NEWS: Fix typo. 1a65d49931 Port recent Gnulib changes to MS-Windows 68a256c892 Update from Gnulib 63cb65dcce * Fix mh tests for native comp builds (bug#50975) e606cc6f40 * Fix `batch-native-compile' not to spawn a subprocess 894dfe70da Fix native-compilation build from tarball on Cygwin 2ce5e08058 Remove U+FE0F from script-representative-chars # Conflicts: # etc/NEWS
| * ; Minor stylistic fixes found by checkdocStefan Kangas2021-10-051-2/+2
| |
* | Change the call convention for `defvar-keymap'Lars Ingebrigtsen2021-10-051-40/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/lispref/keymaps.texi (Changing Key Bindings): Adjust documentation. * lisp/simple.el (special-mode-map): * lisp/net/shr.el (shr-map): * lisp/net/eww.el (eww-link-keymap): (eww-mode-map): (eww-submit-map): (eww-textarea-map): (eww-bookmark-mode-map): (eww-history-mode-map): (eww-buffers-mode-map): * lisp/gnus/message.el (message-mode-map): * lisp/gnus/gnus-html.el (gnus-html-image-map): * lisp/gnus/gnus-eform.el (gnus-edit-form-mode-map): * lisp/gnus/gnus-dired.el (gnus-dired-mode-map): * lisp/gnus/gnus-bookmark.el (gnus-bookmark-bmenu-mode-map): Adjust usage of `defvar-keymap'. * lisp/subr.el (define-keymap, define-keymap--define): Change how these functions call each other. (defvar-keymap): Change interface to be more like `define-keymap'. * lisp/emacs-lisp/lisp-mode.el (lisp-indent--defvar-keymap): Remove. (lisp-indent-function): Don't use it.
* | Add 'define-keymap' and 'defvar-keymap'Lars Ingebrigtsen2021-10-041-23/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | * doc/lispref/keymaps.texi (Changing Key Bindings): Document define-keymap and defvar-keymap. * lisp/subr.el (define-keymap): New function. (define-keymap--define): New function. (defvar-keymap): New macro. * lisp/emacs-lisp/lisp-mode.el (lisp-indent--defvar-keymap): New function. (lisp-indent-function): Use it to indent defvar-keymap.
* | Restore the flet indentation fixesakater2021-10-011-10/+72
|/ | | | | | * lisp/emacs-lisp/lisp-mode.el (lisp--local-defform-body-p): New function. (lisp-indent-function): Use it to fix cl-flet indentation.
* Revert "Indent bodies of local function definitions properly in elisp-mode"Mattias Engdegård2021-09-301-35/+10
| | | | This reverts commit 38037e04cb05cb1f2b604f0b1602d36b0bcf6985.
* Revert "Fix regressions in cl-flet indentation"Mattias Engdegård2021-09-301-43/+10
| | | | This reverts commit c42af5aee74f310bdcd63aac96b1c02ec07a1c50.
* Fix regressions in cl-flet indentationakater2021-09-301-10/+43
| | | | | | | * lisp/emacs-lisp/lisp-mode.el (lisp--local-defform-body-p): Rename (from -p-less form) and fix indentation regression introduced by 38037e04cb05cb1f2b604f0b1602d36b0bcf6985 (bug#9622). Also add cl-macrolet cl-flet* cl-symbol-macrolet.
* Indent bodies of local function definitions properly in elisp-modeakater2021-09-251-10/+35
| | | | | | * lisp/emacs-lisp/lisp-mode.el (lisp-indent-function): Check for local defforms (`cl-flet' and `cl-labels'). (lisp--local-defform-body): New auxiliary function (bug#9622).
* ; More stylistic docfixes in emacs-lisp/*.el found by checkdocStefan Kangas2021-09-181-1/+1
|
* Support '...' quoting in Lisp filesEli Zaretskii2021-09-161-2/+2
| | | | | * lisp/emacs-lisp/lisp-mode.el (lisp-el-font-lock-keywords-2): Support quoting 'like this'.
* ; More minor docfixes found by checkdocStefan Kangas2021-09-141-1/+1
|
* Fix quoting style in Lisp commentsEli Zaretskii2021-09-121-1/+1
| | | | | | | | | | | * lisp/textmodes/rst.el: * lisp/progmodes/elisp-mode.el (elisp--xref-find-definitions): * lisp/org/org.el: * lisp/org/org-list.el (org-list-to-generic): * lisp/org/org-compat.el: * lisp/hexl.el (hexl-ascii-region): * lisp/emacs-lisp/lisp-mode.el: * lisp/calendar/calendar.el: In comments, quote 'like this'.
* ; Fix symbol quoting typosStefan Kangas2021-09-121-1/+1
|
* Adjust docstring of lisp-mode (bug#49278)João Távora2021-06-301-1/+1
| | | | | * lisp/emacs-lisp/lisp-mode.el (lisp-mode): Mention that this mode is primarily for Common Lisp.
* * lisp/emacs-lisp/lisp-mode.el (lisp-outline-level): Fix imprecise numbers.Juri Linkov2021-05-181-3/+9
| | | | | (lisp-outline-level): Return right levels starting from 1 instead of 5. Suggested by Howard Melman <hmelman@gmail.com> in bug#46878.
* Convert many more links to use HTTPSStefan Kangas2021-03-241-1/+1
|
* Actually fill the correct paragraph in `lisp-fill-paragraph'Lars Ingebrigtsen2021-03-051-1/+4
| | | | | * lisp/emacs-lisp/lisp-mode.el (lisp-fill-paragraph): Fix previous change here by actually filling the correct paragraph (bug#28937).
* Convert various menus to easymenuStefan Kangas2021-03-011-12/+11
| | | | | | | | | | | | * lisp/emacs-lisp/lisp-mode.el (lisp-mode-map): Move menu from here... (lisp-mode-menu): ...to here, and convert to easymenu. * lisp/progmodes/elisp-mode.el (lisp-interaction-mode-map): Move menu definition from here... (lisp-interaction-mode-menu): ...to here, and convert to easymenu. * lisp/replace.el (occur-menu-map): Convert to easymenu.
* Remove some dead, commented out code from lisp-mode.elStefan Kangas2021-02-091-3/+0
| | | | | * lisp/emacs-lisp/lisp-mode.el (lisp-data-mode-syntax-table): Remove code commented out since 2005.
* Improve filling of Emacs Lisp doc stringsLars Ingebrigtsen2021-02-041-1/+18
| | | | | | * lisp/emacs-lisp/lisp-mode.el (lisp-fill-paragraph): When filling a Lisp string, try to avoid filling bits that follow it (bug#28937).
* * lisp/emacs-lisp/lisp-mode.el (lisp-mode): Also set `comment-end-skip`Stefan Monnier2021-02-021-0/+1
|
* Fix |# fontification in lisp-modechuntaro2021-02-021-0/+1
| | | | | | | * lisp/emacs-lisp/lisp-mode.el (lisp-mode): Give the |# the correct (font-lock-comment-delimited-face) face (bug#39820). Copyright-paperwork-exempt: yes
* Revert "Improve fontifying of #| ... |# in `lisp-mode'"Lars Ingebrigtsen2021-01-311-1/+0
| | | | | | This reverts commit 1275dc4711af77c9c223063dcd149d782d497463. Setting comment-end isn't the correct thing to do -- it makes M-; insert that string.
* Improve fontifying of #| ... |# in `lisp-mode'Lars Ingebrigtsen2021-01-291-0/+1
| | | | | * lisp/emacs-lisp/lisp-mode.el (lisp-mode): Fontify the end delimiter in #| ... |# correctly (bug#39820).
* Fontify special forms and macros the sameLars Ingebrigtsen2021-01-251-4/+3
| | | | | | | * lisp/emacs-lisp/lisp-mode.el (lisp--el-match-keyword): Handle special forms and macros the same way (bug#43265). This makes things like (setq a '(if a b)) be fontified correctly (i.e., not fontified as a keyword).
* Rewrite lisp--el-funcall-position-p to be inverse of the -not functionLars Ingebrigtsen2021-01-241-38/+43
| | | | | | | * lisp/emacs-lisp/lisp-mode.el (lisp--el-funcall-position-p): Rename and rewrite to return the inverse value. Non-inverted predicate functions are easier to reason about. (lisp--el-non-funcall-position-p): Make obsolete.
* Fix macro fontification in `condition-case' handler bodiesLars Ingebrigtsen2021-01-241-6/+9
| | | | | | * lisp/emacs-lisp/lisp-mode.el (lisp--el-non-funcall-position-p): Fontify macros in the BODY of HANDLERS in `condition-case' correctly (bug#43265).
* Tweak `condition-case' keyword highlightsLars Ingebrigtsen2021-01-241-2/+5
| | | | | * lisp/emacs-lisp/lisp-mode.el (lisp--el-non-funcall-position-p): Tweak `condition-case' position check to skip the VAR form.
* Hyperlink symbol names without word syntax in HelpBasil L. Contovounesios2021-01-101-4/+2
| | | | | | | | | * lisp/emacs-lisp/lisp-mode.el (lisp-el-font-lock-keywords-2) (lisp-cl-font-lock-keywords-2): Allow single-character symbol names. * lisp/help-mode.el (help-xref-symbol-regexp): Also match symbol names starting with symbol syntax (bug#6601, bug#24309). * test/lisp/help-mode-tests.el (help-mode-tests-xref-button): Test hyperlink creation for function names without symbol syntax.
* Update copyright year to 2021Paul Eggert2021-01-011-1/+1
| | | | Run "TZ=UTC0 admin/update-copyright".
* * lisp/emacs-lisp/lisp-mode.el: Give paren syntax to [...] in lisp-data-modeStefan Monnier2020-12-061-3/+5
| | | | | | | | | | | | (lisp-data-mode-syntax-table): Rename from lisp--mode-syntax-table. Adjust all users. Set [...] to have paren syntax. (lisp-data-mode): Don't set `lisp-syntax` arg any more * lisp/progmodes/elisp-mode.el (emacs-lisp-mode-syntax-table): Don't bother setting [...] to have paren syntax any more. * lisp/progmodes/inf-lisp.el (inferior-lisp-mode): Don't use `lisp-syntax` arg of lisp-mode-variables any more.
* Prefer setq-local in emacs-lisp/*.elStefan Kangas2020-12-041-1/+1
| | | | | | | | | | | | | | | | * lisp/emacs-lisp/chart.el (chart-mode): * lisp/emacs-lisp/copyright.el (copyright-update): * lisp/emacs-lisp/eieio-custom.el (eieio-customize-object): * lisp/emacs-lisp/elint.el (elint-update-env, elint-init-form): * lisp/emacs-lisp/ert.el (ert--results-update-ewoc-hf): (ert--setup-results-buffer): * lisp/emacs-lisp/lisp-mode.el (lisp-mode-variables): * lisp/emacs-lisp/pp.el (pp-display-expression): * lisp/emacs-lisp/re-builder.el (reb-mode, reb-restart-font-lock): * lisp/emacs-lisp/shadow.el (load-path-shadows-mode): * lisp/emacs-lisp/smie.el (smie-setup): * lisp/emacs-lisp/syntax.el (syntax-propertize): * lisp/emacs-lisp/trace.el (trace-make-advice): Prefer setq-local.
* Clarify Lisp warning about elements following other expressionsLars Ingebrigtsen2020-11-091-2/+2
| | | | | * lisp/emacs-lisp/lisp-mode.el (lisp-fdefs): Clarify warning in help text (bug#44482).
* * lisp/emacs-lisp/lisp-mode.el: Avoid false-positive "hidden arg" in stringsStefan Monnier2020-11-071-2/+5
| | | | | | (lisp--match-hidden-arg): Don't misfire in strings and comments. Reported by: Andrii Kolomoiets <andreyk.mad@gmail.com>
* * lisp-mode.el: Fix missing highlight of "hidden" string argStefan Monnier2020-11-041-2/+4
| | | | | | * lisp/emacs-lisp/lisp-mode.el (lisp-el-font-lock-keywords-2) (lisp-cl-font-lock-keywords-2): Highlight "hidden arg" even if it already has another face.
* Change how #:uninterned symbols are font-locked in Lisp modeLars Ingebrigtsen2020-08-241-3/+1
| | | | | | * lisp/emacs-lisp/lisp-mode.el (lisp-fdefs): Font-lock #:uninterned symbols as a single entity instead of #: and uninterned separately (bug#43001).
* Fix #'(lambda ...) font lockingAnders Lindgren2020-08-191-1/+3
| | | | | * lisp/emacs-lisp/lisp-mode.el (lisp--el-non-funcall-position-p): Fontize #'(lambda ...) better (bug#23465).
* Remove many items obsolete since Emacs 23.1Stefan Kangas2020-08-141-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Emacs 23.1 was five major releases and over a decade ago. This list can be reviewed before to the next release, but for now hopefully this motivates any needed external updates. Ref: https://lists.gnu.org/archive/html/emacs-devel/2020-05/msg02198.html * lisp/abbrev.el (pre-abbrev-expand-hook): * lisp/bookmark.el (bookmark-read-annotation-text-func) (bookmark-jump-noselect): * lisp/buff-menu.el (buffer-menu-mode-hook): * lisp/cus-edit.el (custom-mode-hook, custom-mode): * lisp/dirtrack.el (dirtrack-debug-toggle, dirtrack-debug): * lisp/emacs-lisp/crm.el (crm-minibuffer-complete) (crm-minibuffer-completion-help) (crm-minibuffer-complete-and-exit): * lisp/emacs-lisp/easymenu.el (easy-menu-precalculate-equivalent-keybindings): * lisp/emacs-lisp/lisp-mode.el (lisp-mode-auto-fill): * lisp/epa.el (epa-display-verify-result): * lisp/epg.el (epg-passphrase-callback-function): * lisp/eshell/eshell.el (eshell-report-bug): * lisp/ffap.el (ffap-bug, ffap-submit-bug): * lisp/files.el (locate-file-completion): * lisp/hi-lock.el (hi-lock-face-history, hi-lock-regexp-history): * lisp/hilit-chg.el (highlight-changes-initial-state) (highlight-changes-active-string) (highlight-changes-passive-string, global-highlight-changes): * lisp/international/mule-cmds.el (nonascii-insert-offset) (nonascii-translation-table): * lisp/international/mule-diag.el (non-iso-charset-alist): * lisp/international/mule-util.el (detect-coding-with-priority): * lisp/international/mule.el (charset-id, charset-bytes) (charset-list, char-valid-p, generic-char-p) (char-coding-system-table, make-coding-system) (set-coding-priority) * lisp/mail/rmail.el (rmail-message-filter): * lisp/minibuffer.el (complete-in-turn, dynamic-completion-table) (completion-common-substring) (minibuffer-local-must-match-filename-map): * lisp/mouse.el (mouse-major-mode-menu, mouse-popup-menubar) (mouse-popup-menubar-stuff): * lisp/net/newst-treeview.el (newsticker-groups-filename): * lisp/obsolete/tpu-edt.el (tpu-have-ispell, GOLD-map): * lisp/password-cache.el (password-read-and-add): * lisp/shell.el (shell-dirtrack-toggle): * lisp/subr.el (forward-point, redisplay-end-trigger-functions) (process-filter-multibyte-p, set-process-filter-multibyte): * lisp/t-mouse.el (t-mouse-mode): * lisp/term/w32-win.el (w32-focus-frame, w32-select-font): * lisp/textmodes/ispell.el (ispell-aspell-supports-utf8): * lisp/textmodes/remember.el (remember-buffer): * lisp/tooltip.el (tooltip-hook): * lisp/url/url-util.el (url-generate-unique-filename): * lisp/url/url-vars.el (url-temporary-directory): * lisp/vc/vc-hooks.el (vc-workfile-version) (vc-default-working-revision): * lisp/vc/vc-mtn.el (vc-mtn-command): * lisp/vc/vc.el (vc-revert-buffer): * lisp/vcursor.el (vcursor-toggle-vcursor-map): Remove items, obsolete since Emacs 23.1. * lisp/abbrev.el (expand-abbrev): * lisp/epg.el (epg-context): Change 'epg-passphrase-callback-function' call to 'epa-' alternative. * lisp/eshell/em-rebind.el (eshell-cannot-leave-input-list): Don't refer to removed function 'forward-point'. * test/manual/etags/c-src/abbrev.c (Fexpand_abbrev): (syms_of_abbrev): Don't run removed hook 'pre-abbrev-expand-hook'. * lisp/international/mule.el (transform-make-coding-system-args): Declare obsolete. * lisp/progmodes/idlwave.el: Update reference to removed function 'char-valid-p'. * lisp/gnus/mml2015.el (epg-encrypt-string): * lisp/gnus/mml1991.el (epg-make-context): * lisp/gnus/mml-smime.el (autoload): Remove autoload of removed 'epg-passphrase-callback-function'. * lisp/minibuffer.el (completion-extra-properties): Remove support for `completion-common-substring'. * lisp/obsolete/tpu-edt.el (tpu-toggle-overwrite-mode) Remove support for removed `spell' package. * src/coding.c (syms_of_coding): * doc/misc/efaq.texi: * doc/emacs/frames.texi (Menu Mouse Clicks): * doc/misc/url.texi (Customization): Doc fixes. ; * etc/NEWS: List removed items.
* * lisp/emacs-lisp/lisp-mode.el: Add new indentation conventionakater2020-05-291-2/+6
| | | | | | (calculate-lisp-indent): To distinguish code and data when indenting, introduce the convention that a space between an open paren and a symbol indicate that this should be indented as a simple data list.
* Add lisp-data-mode for editing non-code Lisp dataJoão Távora2020-05-011-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes: bug#40573 The new mode can be used stand-alone or inherited from by modes intended to edit programs. The existing emacs-lisp-mode and lisp-mode are examples. Thanks to Juri Linkov and Basil L. Contovounesios for researching some data files in Emacs that can be automatically set to use the new mode. * lisp/files.el (auto-mode-alist): Add entry for ".dir-locals" and ".dir-locals-2" * lisp/emacs-lisp/lisp-mode.el: (lisp-data-mode): New major mode. (lisp-mode): Inherit from lisp-data-mode. Set special lisp-mode stuff here. * lisp/progmodes/elisp-mode.el (emacs-lisp-mode): Inherit from lisp-data-mode. * lisp/bookmark.el (bookmark-insert-file-format-version-stamp): Use lisp-data-mode. * lisp/saveplace.el (save-place-alist-to-file): Use lisp-data-mode. * lisp/net/eww.el (eww-write-bookmarks): Use lisp-data-mode. * lisp/net/nsm.el (nsm-write-settings): Use lisp-data-mode. * lisp/net/tramp-cache.el (tramp-dump-connection-properties): Use lisp-data-mode. * etc/NEWS: Mention lisp-data-mode. * doc/lispref/modes.texi (Example Major Modes): Update example.