about summary refs log tree commit diff stats
path: root/lisp/acdw.el
diff options
context:
space:
mode:
authorCase Duckworth2021-09-07 08:10:09 -0500
committerCase Duckworth2021-09-07 08:10:09 -0500
commit5b7fbf4bc65268533e16bde4ad6198537b85ee41 (patch)
tree5f2fb23f2bf676a8424fa529475d39a50bd127ee /lisp/acdw.el
parentUse `define-repeat-map` (diff)
downloademacs-5b7fbf4bc65268533e16bde4ad6198537b85ee41.tar.gz
emacs-5b7fbf4bc65268533e16bde4ad6198537b85ee41.zip
Change acdw/reading-mode to reading-mode
Diffstat (limited to 'lisp/acdw.el')
-rw-r--r--lisp/acdw.el41
1 files changed, 0 insertions, 41 deletions
diff --git a/lisp/acdw.el b/lisp/acdw.el index 0039de2..5bb53e2 100644 --- a/lisp/acdw.el +++ b/lisp/acdw.el
@@ -535,47 +535,6 @@ It's called 'require-private' for historical reasons."
535 recentf-list))) 535 recentf-list)))
536 536
537 537
538;;; Minor modes
539
540(define-minor-mode acdw/reading-mode
541 "A mode for reading."
542 :init-value nil
543 :lighter " Read"
544 :keymap (let ((map (make-sparse-keymap)))
545 (when-let ((link-cmd (or (fbound-and-true-p #'ace-link)
546 (fbound-and-true-p #'link-hint-open-link))))
547 (define-key map (kbd ";") link-cmd)
548 (define-key map (kbd "o") link-cmd))
549 map)
550 (if acdw/reading-mode
551 (progn ;; turn on
552 ;; settings
553 (setq-local orig-indicate-empty-lines indicate-empty-lines
554 indicate-empty-lines nil
555 orig-indicate-buffer-boundaries indicate-buffer-boundaries
556 indicate-buffer-boundaries nil)
557 ;; disable modes
558 (dolist (mode '(display-fill-column-indicator-mode))
559 (when (fboundp mode)
560 (funcall mode -1)))
561 ;; enable modes
562 (dolist (mode '(olivetti-mode))
563 (when (fboundp mode)
564 (funcall mode +1))))
565 ;; turn off
566 ;; settings
567 (setq-local indicate-empty-lines orig-indicate-empty-lines
568 indicate-buffer-boundaries orig-indicate-buffer-boundaries)
569 ;; enable modes
570 (dolist (mode '(display-fill-column-indicator-mode))
571 (when (fboundp mode)
572 (funcall mode +1)))
573 ;; disable modes
574 (dolist (mode '(olivetti-mode))
575 (when (fboundp mode)
576 (funcall mode -1)))))
577
578
579;;; Sort setq... 538;;; Sort setq...
580;; https://emacs.stackexchange.com/questions/33039/ 539;; https://emacs.stackexchange.com/questions/33039/
581 540