summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2024-03-22 18:44:54 -0400
committerStefan Monnier <monnier@iro.umontreal.ca>2024-03-22 18:44:54 -0400
commit7e32e8392ab77f9df08a1f11831cbba2242d721f (patch)
tree8e8635ea3eb756a6c3f530a1319e0d0fc65db83c /lisp/emacs-lisp
parent3197d7015b854944e326d68c5307b38f0a0d2d53 (diff)
downloademacs-7e32e8392ab77f9df08a1f11831cbba2242d721f.tar.gz
emacs-7e32e8392ab77f9df08a1f11831cbba2242d721f.tar.bz2
emacs-7e32e8392ab77f9df08a1f11831cbba2242d721f.zip
Fix recent test regressions
* lisp/emacs-lisp/pp.el (pp-fill): Don't cut between `#` and `(`. * test/lisp/help-fns-tests.el (help-fns-test-built-in) (help-fns-test-interactive-built-in, help-fns-test-lisp-defun) (help-fns-test-lisp-defsubst): * test/src/emacs-module-tests.el (module/describe-function-1): Adjust tests to new wording in `describe-function`.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/pp.el5
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/pp.el b/lisp/emacs-lisp/pp.el
index b48f44545bf..26c77d6b047 100644
--- a/lisp/emacs-lisp/pp.el
+++ b/lisp/emacs-lisp/pp.el
@@ -198,7 +198,10 @@ it inserts and pretty-prints that arg at point."
;; reduce the indentation depth.
;; Similarly, we prefer to cut before a "." than after
;; it because it reduces the indentation depth.
- (skip-chars-backward " \t({[',.")
+ (while (not (zerop (skip-chars-backward " \t({[',.")))
+ (and (memq (char-before) '(?# ?s ?f))
+ (looking-back "#[sf]?" (- (point) 2))
+ (goto-char (match-beginning 0))))
(if (bolp)
;; The sexp already starts on its own line.
(progn (goto-char beg) nil)