summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/lisp-mode.el
Commit message (Collapse)AuthorAgeFilesLines
* 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).
* Speed up generation of loaddefs filesLars Ingebrigtsen2022-05-311-3/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/lispref/loading.texi (Autoload, Autoload by Prefix): Refer to loaddefs-generate instead of update-file-autoloads. * lisp/Makefile.in (LOADDEFS): Remove, because all the loaddefs files are created in one go now. (COMPILE_FIRST): Add loaddefs-gen/radix-tree, and drop autoload. ($(lisp)/loaddefs.el): Use loaddefs-gen. (MH_E_DIR, $(TRAMP_DIR)/tramp-loaddefs.el) ($(MH_E_DIR)/mh-loaddefs.el, $(CAL_DIR)/cal-loaddefs.el) ($(CAL_DIR)/diary-loaddefs.el, $(CAL_DIR)/hol-loaddefs.el): Remove. * lisp/generic-x.el: Inhibit computing prefixes, because the namespace here is all wonky. * lisp/w32-fns.el (w32-batch-update-autoloads): Removed -- unused function. * lisp/calendar/holidays.el ("holiday-loaddefs"): Renamed from hol-loaddefs to have a more regular name. * lisp/cedet/ede/proj-elisp.el (ede-emacs-cedet-autogen-compiler): Refer to loaddefs-gen instead of autoload. * lisp/emacs-lisp/autoload.el (make-autoload, autoload-rubric) (autoload-insert-section-header): Made into aliases of loaddefs-gen functions. (autoload--make-defs-autoload): Ditto. (autoload-ignored-definitions, autoload-compute-prefixes): Moved to loaddefs-gen. * lisp/emacs-lisp/lisp-mode.el (lisp-mode-autoload-regexp): New constant. (lisp-fdefs, lisp-mode-variables, lisp-outline-level): Use it to recognize all ;;;###autoload forms. * lisp/emacs-lisp/loaddefs-gen.el: New file. * lisp/emacs-lisp/package.el: Use loaddefs-generate instead of make-directory-autoloads. * test/lisp/vc/vc-bzr-tests.el (vc-bzr-test-faulty-bzr-autoloads): Use loaddefs instead of autoloads.
* Fix font-locking of (defun foo (function ...))Lars Ingebrigtsen2022-05-201-0/+3
| | | | | | * lisp/emacs-lisp/lisp-mode.el (lisp--el-funcall-position-p): Don't colorize the `function' in (defun foo (function ...)) as a special form (bug#37074).
* Make imenu find defalias entriesLars Ingebrigtsen2022-05-101-0/+9
| | | | | * lisp/emacs-lisp/lisp-mode.el (lisp-imenu-generic-expression): Also find defalias (bug#7855).
* Tweak how `M-q' in emacs-lisp-mode worksLars Ingebrigtsen2022-04-131-21/+41
| | | | | | | * lisp/emacs-lisp/lisp-mode.el (lisp-fill-paragraph): Only fill as strings inside strings (bug#31656). (lisp--fill-line-simple): New function to do simple sexp-based filling.
* Merge from origin/emacs-28Eli Zaretskii2022-01-011-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 836be7a112 ; * etc/refcards/ru-refcard.tex: Update Copyright year. 86cbc6ee4a * lisp/net/tramp-sh.el: Adapt copyright year ebe8772f65 ; Minor fixes related to copyright years 23c1ee6989 ; * test/manual/etags/ETAGS.good_N: Adjust to copyright ye... 8d3fc7ec89 * src/xfaces.c (face_for_font): Make 'hash' be uintptr_t. 19dcb237b5 ; Add 2022 to copyright years. # Conflicts: # etc/NEWS # etc/refcards/ru-refcard.tex # lib/cdefs.h # lisp/erc/erc-dcc.el # lisp/erc/erc-imenu.el # lisp/erc/erc-replace.el # lisp/image-dired.el # lisp/progmodes/xref.el # m4/alloca.m4 # m4/byteswap.m4 # m4/errno_h.m4 # m4/getopt.m4 # m4/gnulib-common.m4 # m4/inttypes.m4 # m4/stddef_h.m4 # m4/stdint.m4 # m4/sys_socket_h.m4
| * ; Add 2022 to copyright years.Eli Zaretskii2022-01-011-1/+1
| |
* | 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.