From c8ff7b64ecc206b8cf43e13d6f3b93c3df8d9a7b Mon Sep 17 00:00:00 2001 From: Mark Wooding Date: Sun, 26 Jul 2020 22:41:32 +0100 Subject: [PATCH] el/dot-emacs.el (mdw-examine-fill-prefixes): Sink below functions it uses. It leans on `mdw-do-prefix-match', which is a terrible name, but is positioned above it. --- el/dot-emacs.el | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/el/dot-emacs.el b/el/dot-emacs.el index 70f1867..c5742d0 100644 --- a/el/dot-emacs.el +++ b/el/dot-emacs.el @@ -1227,17 +1227,6 @@ This is mainly useful in `auto-fill-mode'.") (funcall tabfun (point-min) (point-max)) (setq s (buffer-substring (point-min) (1- (point-max))))))))) -(defun mdw-examine-fill-prefixes (l) - "Given a list of dynamic fill prefixes, pick one which matches -context and return the static fill prefix to use. Point must be -at the start of a line, and match data must be saved." - (cond ((not l) nil) - ((looking-at (car (car l))) - (mdw-maybe-tabify (apply #'concat - (mapcar #'mdw-do-prefix-match - (cdr (car l)))))) - (t (mdw-examine-fill-prefixes (cdr l))))) - (defun mdw-maybe-car (p) "If P is a pair, return (car P), otherwise just return P." (if (consp p) (car p) p)) @@ -1261,6 +1250,17 @@ See `mdw-fill-prefix' for details." ((eq (car m) 'eval) (eval (cdr m))) (t ""))) +(defun mdw-examine-fill-prefixes (l) + "Given a list of dynamic fill prefixes, pick one which matches +context and return the static fill prefix to use. Point must be +at the start of a line, and match data must be saved." + (cond ((not l) nil) + ((looking-at (car (car l))) + (mdw-maybe-tabify (apply #'concat + (mapcar #'mdw-do-prefix-match + (cdr (car l)))))) + (t (mdw-examine-fill-prefixes (cdr l))))) + (defun mdw-choose-dynamic-fill-prefix () "Work out the dynamic fill prefix based on the variable `mdw-fill-prefix'." (cond ((and fill-prefix (not (string= fill-prefix ""))) fill-prefix) -- 2.11.0