Lars Ingebrigtsen
88a04ea985
Tweak how `M-q' in emacs-lisp-mode works
...
* 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.
2022-04-13 05:07:47 +02:00
Eli Zaretskii
dcd76bd48d
Merge from origin/emacs-28
...
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
2022-01-01 07:03:03 -05:00
Eli Zaretskii
19dcb237b5
; Add 2022 to copyright years.
2022-01-01 02:45:51 -05:00
Lars Ingebrigtsen
f1606047c4
Indent `closure' forms better
...
* lisp/emacs-lisp/lisp-mode.el (closure): Indent `closure' forms
better (bug#52063).
2021-11-25 14:41:45 +01:00
akater
3fd0e7fba6
; * lisp/emacs-lisp/lisp-mode.el: Restore one check in flet handling
...
* lisp/emacs-lisp/lisp-mode.el (lisp--local-defform-body-p):
Do check backward-up-list executing without errors (bug#9622).
2021-11-09 04:26:05 +01:00
akater
ca9fb109f7
lisp/emacs-lisp/lisp-mode.el: Fix parser state corruption.
...
* 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).
2021-11-08 07:38:41 +01:00
akater
0aa9f478e9
Indent cl-flet-like forms correctly in incomplete expressions
...
* 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).
2021-10-28 23:53:50 +02:00
Glenn Morris
4cf06bb751
Merge from origin/emacs-28
...
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
2021-10-22 09:39:39 -07:00
Martin Rudalics
d2849cc645
Fix 'calculate-lisp-indent' when "[" starts containing sexp (Bug#51312)
...
* lisp/emacs-lisp/lisp-mode.el (calculate-lisp-indent): Handle
arbitrary paren syntax after skipping whitespace backwards within
containing sexp (Bug#51312).
2021-10-22 10:16:17 +02:00
Lars Ingebrigtsen
7e1329e7ed
Add indentation rules for DEFUN's def* functions
2021-10-18 10:44:28 +02:00
Lars Ingebrigtsen
32df203423
Remove the "def" indentation heuristic
...
* lisp/emacs-lisp/lisp-mode.el (lisp-indent-function): Don't
indent function calls with names that that start with "def"
specially (bug#43329).
2021-10-18 10:00:20 +02:00
Lars Ingebrigtsen
ef9fa3682a
Fontify :doc keywords as documentation
...
* lisp/emacs-lisp/lisp-mode.el (lisp-string-after-doc-keyword-p):
Extend to :doc, too (bug#51230).
2021-10-18 09:44:24 +02:00
Glenn Morris
2dc88a27a4
Merge from origin/emacs-28
...
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
2021-10-05 07:50:22 -07:00
Lars Ingebrigtsen
4103123806
Change the call convention for `defvar-keymap'
...
* 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.
2021-10-05 10:34:37 +02:00
Stefan Kangas
0a7bab689c
; Minor stylistic fixes found by checkdoc
2021-10-05 02:06:57 +02:00
Lars Ingebrigtsen
192f9357f2
Add 'define-keymap' and 'defvar-keymap'
...
* 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.
2021-10-04 10:15:11 +02:00
akater
5988d6fa26
Restore the flet indentation fixes
...
* lisp/emacs-lisp/lisp-mode.el (lisp--local-defform-body-p): New
function.
(lisp-indent-function): Use it to fix cl-flet indentation.
2021-10-01 13:25:42 +02:00
Mattias Engdegård
41723a329e
Revert "Indent bodies of local function definitions properly in elisp-mode"
...
This reverts commit 38037e04cb
.
2021-09-30 16:52:16 +02:00
Mattias Engdegård
be493ea67a
Revert "Fix regressions in cl-flet indentation"
...
This reverts commit c42af5aee7
.
2021-09-30 16:52:16 +02:00
akater
c42af5aee7
Fix regressions in cl-flet indentation
...
* lisp/emacs-lisp/lisp-mode.el (lisp--local-defform-body-p):
Rename (from -p-less form) and fix indentation regression
introduced by 38037e04cb
(bug#9622). Also add cl-macrolet cl-flet* cl-symbol-macrolet.
2021-09-30 08:33:14 +02:00
akater
38037e04cb
Indent bodies of local function definitions properly in elisp-mode
...
* 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).
2021-09-25 03:34:37 +02:00
Stefan Kangas
dd1220b969
; More stylistic docfixes in emacs-lisp/*.el found by checkdoc
2021-09-18 13:14:50 +02:00
Eli Zaretskii
a38675ca88
Support '...' quoting in Lisp files
...
* lisp/emacs-lisp/lisp-mode.el (lisp-el-font-lock-keywords-2):
Support quoting 'like this'.
2021-09-16 17:10:49 +03:00
Stefan Kangas
25ebb9374b
; More minor docfixes found by checkdoc
2021-09-14 07:57:14 +02:00
Eli Zaretskii
ff4de1bd88
Fix quoting style in Lisp comments
...
* 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'.
2021-09-12 19:51:06 +03:00
Stefan Kangas
fc4b956c7c
; Fix symbol quoting typos
2021-09-12 18:36:49 +02:00
João Távora
1439e9bfad
Adjust docstring of lisp-mode (bug#49278)
...
* lisp/emacs-lisp/lisp-mode.el (lisp-mode): Mention that this mode is
primarily for Common Lisp.
2021-06-30 17:00:20 +01:00
Juri Linkov
502e3ce614
* lisp/emacs-lisp/lisp-mode.el (lisp-outline-level): Fix imprecise numbers.
...
(lisp-outline-level): Return right levels starting from 1 instead of 5.
Suggested by Howard Melman <hmelman@gmail.com> in bug#46878.
2021-05-18 23:35:57 +03:00
Stefan Kangas
8b07994e20
Convert many more links to use HTTPS
2021-03-24 10:20:18 +01:00
Lars Ingebrigtsen
ef61a6b636
Actually fill the correct paragraph in `lisp-fill-paragraph'
...
* lisp/emacs-lisp/lisp-mode.el (lisp-fill-paragraph): Fix previous
change here by actually filling the correct paragraph (bug#28937).
2021-03-05 14:01:00 +01:00
Stefan Kangas
5684f7995d
Convert various menus to easymenu
...
* 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.
2021-03-01 04:38:38 +01:00
Stefan Kangas
3c53d28ae1
Remove some dead, commented out code from lisp-mode.el
...
* lisp/emacs-lisp/lisp-mode.el (lisp-data-mode-syntax-table):
Remove code commented out since 2005.
2021-02-09 17:03:55 +01:00
Lars Ingebrigtsen
9bf367e184
Improve filling of Emacs Lisp doc strings
...
* lisp/emacs-lisp/lisp-mode.el (lisp-fill-paragraph): When filling
a Lisp string, try to avoid filling bits that follow it
(bug#28937).
2021-02-04 16:12:41 +01:00
Stefan Monnier
5f612d8a1f
* lisp/emacs-lisp/lisp-mode.el (lisp-mode): Also set comment-end-skip
2021-02-02 10:08:44 -05:00
chuntaro
a2de694d8a
Fix |# fontification in lisp-mode
...
* lisp/emacs-lisp/lisp-mode.el (lisp-mode): Give the |# the
correct (font-lock-comment-delimited-face) face (bug#39820).
Copyright-paperwork-exempt: yes
2021-02-02 10:18:28 +01:00
Lars Ingebrigtsen
867b99d68f
Revert "Improve fontifying of #| ... |# in `lisp-mode'"
...
This reverts commit 1275dc4711
.
Setting comment-end isn't the correct thing to do -- it makes M-; insert that string.
2021-01-31 07:59:40 +01:00
Lars Ingebrigtsen
1275dc4711
Improve fontifying of #| ... |# in `lisp-mode'
...
* lisp/emacs-lisp/lisp-mode.el (lisp-mode): Fontify the end
delimiter in #| ... |# correctly (bug#39820).
2021-01-29 07:40:06 +01:00
Lars Ingebrigtsen
a10c74fbea
Fontify special forms and macros the same
...
* 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).
2021-01-25 07:44:29 +01:00
Lars Ingebrigtsen
9503f8d96c
Rewrite lisp--el-funcall-position-p to be inverse of the -not function
...
* 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.
2021-01-24 23:25:52 +01:00
Lars Ingebrigtsen
196be2bf12
Fix macro fontification in `condition-case' handler bodies
...
* 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).
2021-01-24 21:43:25 +01:00
Lars Ingebrigtsen
8f28a1b9da
Tweak `condition-case' keyword highlights
...
* lisp/emacs-lisp/lisp-mode.el (lisp--el-non-funcall-position-p):
Tweak `condition-case' position check to skip the VAR form.
2021-01-24 21:31:09 +01:00
Basil L. Contovounesios
25dadca0d1
Hyperlink symbol names without word syntax in Help
...
* 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.
2021-01-10 13:37:38 +00:00
Paul Eggert
ba05d005e5
Update copyright year to 2021
...
Run "TZ=UTC0 admin/update-copyright".
2021-01-01 01:13:56 -08:00
Stefan Monnier
300c581370
* lisp/emacs-lisp/lisp-mode.el: Give paren syntax to [...] in lisp-data-mode
...
(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.
2020-12-06 22:18:48 -05:00
Stefan Kangas
81fe928a76
Prefer setq-local in emacs-lisp/*.el
...
* 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.
2020-12-04 19:12:12 +01:00
Lars Ingebrigtsen
391260e46c
Clarify Lisp warning about elements following other expressions
...
* lisp/emacs-lisp/lisp-mode.el (lisp-fdefs): Clarify warning in
help text (bug#44482).
2020-11-09 16:50:51 +01:00
Stefan Monnier
e8f5657bc7
* lisp/emacs-lisp/lisp-mode.el: Avoid false-positive "hidden arg" in strings
...
(lisp--match-hidden-arg): Don't misfire in strings and comments.
Reported by: Andrii Kolomoiets <andreyk.mad@gmail.com>
2020-11-07 10:15:22 -05:00
Stefan Monnier
d6cb106a37
* lisp-mode.el: Fix missing highlight of "hidden" string arg
...
* 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.
2020-11-04 11:37:00 -05:00
Lars Ingebrigtsen
1fa90f77ed
Change how #:uninterned symbols are font-locked in Lisp mode
...
* lisp/emacs-lisp/lisp-mode.el (lisp-fdefs): Font-lock
#:uninterned symbols as a single entity instead of #: and
uninterned separately (bug#43001).
2020-08-24 14:34:42 +02:00
Anders Lindgren
dd6fa00fa3
Fix #'(lambda ...) font locking
...
* lisp/emacs-lisp/lisp-mode.el (lisp--el-non-funcall-position-p):
Fontize #'(lambda ...) better (bug#23465).
2020-08-19 14:19:12 +02:00