From f939cc140dc9c27b6d2a9f59fa6a63191fed66c5 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Mon, 27 Sep 2021 23:08:30 -0500 Subject: Correct typo --- lisp/acdw-cus-edit.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lisp') diff --git a/lisp/acdw-cus-edit.el b/lisp/acdw-cus-edit.el index c40f137..89273f0 100644 --- a/lisp/acdw-cus-edit.el +++ b/lisp/acdw-cus-edit.el @@ -28,5 +28,5 @@ 1)) "Show faces and variables in `imenu'.") -(provide 'acdw/cus-edit) +(provide 'acdw-cus-edit) ;;; acdw-cus-edit.el ends here -- cgit 1.4.1-21-gabe81 From 04fbf30e8d8899e5cf8ba7541eb096f52a761723 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Mon, 27 Sep 2021 23:08:41 -0500 Subject: Don't blink cursor in reading-mode --- lisp/acdw-reading.el | 42 +++++++++++++++++++++++++++++------------- 1 file changed, 29 insertions(+), 13 deletions(-) (limited to 'lisp') diff --git a/lisp/acdw-reading.el b/lisp/acdw-reading.el index 26ee5e8..e0a7f74 100644 --- a/lisp/acdw-reading.el +++ b/lisp/acdw-reading.el @@ -11,8 +11,17 @@ ;; - Don't hurt yourself. ;; - Make good choices. +;;; Commentary: + +;; here is my attempt at a reading mode. + ;;; Code: +(require 'olivetti) + +(defvar-local //indicate-empty-lines nil) +(defvar-local //indicate-buffer-boundaries nil) + ;;;###autoload (define-minor-mode reading-mode "A mode for reading." @@ -22,30 +31,37 @@ (if reading-mode (progn ;; turn on ;; settings - (setq-local orig-indicate-empty-lines indicate-empty-lines + (setq-local //indicate-empty-lines indicate-empty-lines indicate-empty-lines nil - orig-indicate-buffer-boundaries indicate-buffer-boundaries + //indicate-buffer-boundaries indicate-buffer-boundaries indicate-buffer-boundaries nil) ;; disable modes - (dolist (mode '(display-fill-column-indicator-mode)) + (dolist (mode '(display-fill-column-indicator-mode + blink-cursor-mode)) (when (fboundp mode) + (set (make-local-variable + (intern (format "//%s" mode))) + (symbol-value mode)) (funcall mode -1))) ;; enable modes (dolist (mode '(olivetti-mode)) (when (fboundp mode) + (set (make-local-variable + (intern (format "//%s" mode))) + (symbol-value mode)) (funcall mode +1)))) ;; turn off - ;; settings - (setq-local indicate-empty-lines orig-indicate-empty-lines - indicate-buffer-boundaries orig-indicate-buffer-boundaries) - ;; enable modes - (dolist (mode '(display-fill-column-indicator-mode)) - (when (fboundp mode) - (funcall mode +1))) - ;; disable modes - (dolist (mode '(olivetti-mode)) + ;; restore settings + (setq-local indicate-empty-lines //indicate-empty-lines + indicate-buffer-boundaries //indicate-buffer-boundaries) + ;; restore modes + (dolist (mode '(display-fill-column-indicator-mode + olivetti-mode + blink-cursor-mode)) (when (fboundp mode) - (funcall mode -1))))) + (funcall mode (if (symbol-value (intern (format "//%s" mode))) + +1 + -1)))))) (provide 'acdw-reading) ;;; acdw-reading.el ends here -- cgit 1.4.1-21-gabe81 From 019f93c3723422d6e11602046ce2d124366e5f72 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Mon, 27 Sep 2021 23:08:55 -0500 Subject: Correct acdw-setup.el Nothing big; just add commentary and require setup. --- lisp/acdw-setup.el | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lisp') diff --git a/lisp/acdw-setup.el b/lisp/acdw-setup.el index cd3807d..e271faa 100644 --- a/lisp/acdw-setup.el +++ b/lisp/acdw-setup.el @@ -11,8 +11,15 @@ ;; - Don't hurt yourself. ;; - Make good choices. +;;; Commentary: + +;; setup.el makes defining local macros for `setup' forms quite simple, at +;; least to my mind. Here are some of the ones I've defined. + ;;; Code: +(require 'setup) + (setup-define :autoload (lambda (func) (if (listp func) -- cgit 1.4.1-21-gabe81