[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/org-present 140a8c3a34 01/12: feat: Add a toggle for wheth
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/org-present 140a8c3a34 01/12: feat: Add a toggle for whether to hide stars in headings |
Date: |
Sat, 6 Aug 2022 14:58:55 -0400 (EDT) |
branch: elpa/org-present
commit 140a8c3a34fdd9bb91da0d1c2717e82d31475da8
Author: Keith Pinson <keith.pinson@banno.com>
Commit: Keith Pinson <keith.pinson@banno.com>
feat: Add a toggle for whether to hide stars in headings
Switch ' to #' in a couple of places to get more help from the compiler,
per:
https://endlessparentheses.com/get-in-the-habit-of-using-sharp-quote.html
---
org-present.el | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/org-present.el b/org-present.el
index 822c017dee..1188f84c24 100644
--- a/org-present.el
+++ b/org-present.el
@@ -167,6 +167,9 @@
(regexp-opt '("title:" "author:" "date:" "email:"))
string)))
+(defvar org-present-hide-stars-in-headings t
+ "Whether to hide the asterisk characters in headings while in presentation
mode.")
+
(defun org-present-add-overlays ()
"Add overlays for this mode."
(add-to-invisibility-spec '(org-present))
@@ -177,9 +180,10 @@
(let ((end (if (org-present-show-option (match-string 2)) 2 0)))
(org-present-add-overlay (match-beginning 1) (match-end end))))
;; hide stars in headings
- (goto-char (point-min))
- (while (re-search-forward "^\\(*+\\)" nil t)
- (org-present-add-overlay (match-beginning 1) (match-end 1)))
+ (if org-present-hide-stars-in-headings
+ (progn (goto-char (point-min))
+ (while (re-search-forward "^\\(*+\\)" nil t)
+ (org-present-add-overlay (match-beginning 1) (match-end 1)))))
;; hide emphasis markers
(goto-char (point-min))
(while (re-search-forward org-emph-re nil t)
@@ -188,7 +192,7 @@
(defun org-present-rm-overlays ()
"Remove overlays for this mode."
- (mapc 'delete-overlay org-present-overlays-list)
+ (mapc #'delete-overlay org-present-overlays-list)
(remove-from-invisibility-spec '(org-present)))
(defun org-present-read-only ()
@@ -197,7 +201,7 @@
(setq buffer-read-only t)
(setq org-present-cursor-cache cursor-type
cursor-type nil)
- (define-key org-present-mode-keymap (kbd "SPC") 'org-present-next))
+ (define-key org-present-mode-keymap (kbd "SPC") #'org-present-next))
(defun org-present-read-write ()
"Make buffer read-only."
- [nongnu] elpa/org-present updated (c0f1f36b23 -> 4ec04e1b77), ELPA Syncer, 2022/08/06
- [nongnu] elpa/org-present 7be98b2c03 02/12: doc(org-present-hide-stars-in-headings): advise on use and effects, ELPA Syncer, 2022/08/06
- [nongnu] elpa/org-present 60d063f20a 05/12: Add org-present-toggle-one-big-page, ELPA Syncer, 2022/08/06
- [nongnu] elpa/org-present 444f3b3b7e 06/12: link to blog and video, ELPA Syncer, 2022/08/06
- [nongnu] elpa/org-present 98b7d94a0f 11/12: Merge branch 'master' into master, ELPA Syncer, 2022/08/06
- [nongnu] elpa/org-present 140a8c3a34 01/12: feat: Add a toggle for whether to hide stars in headings,
ELPA Syncer <=
- [nongnu] elpa/org-present 17412d085f 03/12: feat(folds): add org-present-startup-folded a la org-startup-folded, ELPA Syncer, 2022/08/06
- [nongnu] elpa/org-present 3c3588be82 04/12: Add and fix description of key bindings, ELPA Syncer, 2022/08/06
- [nongnu] elpa/org-present ef1f1c5da9 08/12: Merge pull request #27 from Kazark/org-present-startup-folded, ELPA Syncer, 2022/08/06
- [nongnu] elpa/org-present 4ec04e1b77 12/12: Merge pull request #36 from rhdxmr/master, ELPA Syncer, 2022/08/06
- [nongnu] elpa/org-present 868d7087ca 07/12: Merge pull request #44 from rlister/systemcrafters-link, ELPA Syncer, 2022/08/06
- [nongnu] elpa/org-present d506a63fc5 09/12: Merge branch 'master' into toggle-heading-stars, ELPA Syncer, 2022/08/06
- [nongnu] elpa/org-present dfcb71c199 10/12: Merge pull request #26 from Kazark/toggle-heading-stars, ELPA Syncer, 2022/08/06