fix(emacs-lisp): update custom lisp-indent-function
To reflect Emacs 28+ changes to the function it is replacing (lisp-indent-function).
This commit is contained in:
parent
608acd9a3a
commit
15432cf9d2
1 changed files with 11 additions and 9 deletions
|
@ -120,15 +120,17 @@ https://emacs.stackexchange.com/questions/10230/how-to-indent-keywords-aligned"
|
|||
(goto-char (1+ (elt state 1)))
|
||||
(parse-partial-sexp (point) calculate-lisp-indent-last-sexp 0 t)
|
||||
(cond ((and (elt state 2)
|
||||
(or (not (looking-at-p "\\sw\\|\\s_"))
|
||||
(eq (char-after) ?:)))
|
||||
(unless (> (save-excursion (forward-line 1) (point))
|
||||
calculate-lisp-indent-last-sexp)
|
||||
(goto-char calculate-lisp-indent-last-sexp)
|
||||
(beginning-of-line)
|
||||
(parse-partial-sexp (point) calculate-lisp-indent-last-sexp 0 t))
|
||||
(backward-prefix-chars)
|
||||
(current-column))
|
||||
(or (eq (char-after) ?:)
|
||||
(not (looking-at-p "\\sw\\|\\s_"))))
|
||||
(if (lisp--local-defform-body-p state)
|
||||
(lisp-indent-defform state indent-point)
|
||||
(unless (> (save-excursion (forward-line 1) (point))
|
||||
calculate-lisp-indent-last-sexp)
|
||||
(goto-char calculate-lisp-indent-last-sexp)
|
||||
(beginning-of-line)
|
||||
(parse-partial-sexp (point) calculate-lisp-indent-last-sexp 0 t))
|
||||
(backward-prefix-chars)
|
||||
(current-column)))
|
||||
((and (save-excursion
|
||||
(goto-char indent-point)
|
||||
(skip-syntax-forward " ")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue