;; 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)
(should (string-match regexp result))))
(ert-deftest help-fns-test-built-in ()
- (let ((regexp "a built-in function in .C source code")
+ (let ((regexp "a primitive-function in .C source code")
(result (help-fns-tests--describe-function 'mapcar)))
(should (string-match regexp result))))
(ert-deftest help-fns-test-interactive-built-in ()
- (let ((regexp "an interactive built-in function in .C source code")
+ (let ((regexp "an interactive primitive-function in .C source code")
(result (help-fns-tests--describe-function 're-search-forward)))
(should (string-match regexp result))))
(ert-deftest help-fns-test-lisp-defun ()
(let ((regexp (if (featurep 'native-compile)
- "a native-compiled Lisp function in .+subr\\.el"
- "a byte-compiled Lisp function in .+subr\\.el"))
+ "a subr-native-elisp in .+subr\\.el"
+ "a compiled-function in .+subr\\.el"))
(result (help-fns-tests--describe-function 'last)))
(should (string-match regexp result))))
(ert-deftest help-fns-test-lisp-defsubst ()
- (let ((regexp "a byte-compiled Lisp function in .+subr\\.el")
+ (let ((regexp "a compiled-function in .+subr\\.el")
(result (help-fns-tests--describe-function 'posn-window)))
(should (string-match regexp result))))
(replace-match "`src/emacs-module-resources/"))
(should (equal
(buffer-substring-no-properties 1 (point-max))
- (format "a module function in `src/emacs-module-resources/mod-test%s'.
+ (format "a module-function in `src/emacs-module-resources/mod-test%s'.
(mod-test-sum a b)