From 9360a54e6208c87911530ea8005b626680fa2e88 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Fri, 7 Jan 2022 17:30:46 -0600 Subject: Gah, so many changes --- lisp/acdw.el | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'lisp/acdw.el') diff --git a/lisp/acdw.el b/lisp/acdw.el index 9361cdf..262c15e 100644 --- a/lisp/acdw.el +++ b/lisp/acdw.el @@ -143,7 +143,7 @@ within a `with-current-buffer' form." (let ((pred (or predicate t))) (dolist (buf (buffer-list)) (with-current-buffer buf - (when (funcall pred buf) + (when (if (fboundp pred) (funcall pred buf) pred) (funcall func)))))) ;; https://github.com/cstby/emacs.d/blob/main/init.el#L67 @@ -176,14 +176,15 @@ surrounded by empty lines, so opening a paragraph means to make three blank lines, then place the point on the second one." (interactive "*") (unless (derived-mode-p 'special-mode 'lui-mode 'comint-mode) - ;; Go to next blank line. This /isn't/ `end-of-paragraph-text' because - ;; that's weird with org, and I'm guessing other modes too. - (while (not (looking-at "^$")) - (forward-line 1)) - (newline) - (delete-blank-lines) - (newline 2) - (previous-line))) + ;; Go to next blank line. This /isn't/ `end-of-paragraph-text' because + ;; that's weird with org, and I'm guessing other modes too. + (while (and (not (looking-at "^$")) + (< (point) (point-max))) + (forward-line 1)) + (newline) + (delete-blank-lines) + (newline 2) + (previous-line))) (defun +split-window-then (&optional where arg) "Split the window into a new buffer. -- cgit 1.4.1-21-gabe81