about summary refs log tree commit diff stats
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/acdw.el20
1 files changed, 20 insertions, 0 deletions
diff --git a/lisp/acdw.el b/lisp/acdw.el index 2b3cafc..99e5c1e 100644 --- a/lisp/acdw.el +++ b/lisp/acdw.el
@@ -291,5 +291,25 @@ With optional ARG, kill all chat-related buffers first."
291 )) 291 ))
292 (mapc #'call-interactively chat-functions)) 292 (mapc #'call-interactively chat-functions))
293 293
294(defun +forward-paragraph (arg)
295 "Move forward ARG (simple) paragraphs.
296A paragraph here is simply defined: it's a block of buffer that's
297separated from others by two newlines."
298 (interactive "p")
299 (let ((direction (/ arg (abs arg))))
300 (forward-line direction)
301 (while (not (or (bobp)
302 (eobp)
303 (= arg 0)))
304 (if (looking-at "^[ \f\t]*$")
305 (setq arg (- arg direction))
306 (forward-line direction)))))
307
308(defun +backward-paragraph (arg)
309 "Move backward ARG (simple) paragraphs.
310See `+forward-paragraph' for the behavior."
311 (interactive "p")
312 (+forward-paragraph (- arg)))
313
294(provide 'acdw) 314(provide 'acdw)
295;;; acdw.el ends here 315;;; acdw.el ends here