[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/markdown-mode 0cdebc833e 3/3: Merge pull request #831 from
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/markdown-mode 0cdebc833e 3/3: Merge pull request #831 from jrblevin/fix-830 |
Date: |
Wed, 1 May 2024 06:59:57 -0400 (EDT) |
branch: elpa/markdown-mode
commit 0cdebc833ed9b98baf9f260ed12b1e36b0ca0e89
Merge: fd6c5508f9 a0718c7a87
Author: Shohei YOSHIDA <syohex@gmail.com>
Commit: GitHub <noreply@github.com>
Merge pull request #831 from jrblevin/fix-830
Show mode enable/disable message only if it is called interactively
---
.github/workflows/test.yml | 2 +-
CHANGES.md | 1 +
markdown-mode.el | 35 ++++++++++++++++-------------------
3 files changed, 18 insertions(+), 20 deletions(-)
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 7e59ac91e9..b07b958eca 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -12,7 +12,7 @@ jobs:
emacs_version:
- 27.2
- 28.2
- - 29.1
+ - 29.3
- snapshot
steps:
- uses: purcell/setup-emacs@master
diff --git a/CHANGES.md b/CHANGES.md
index 6feb632ab1..d1fb3209e0 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -21,6 +21,7 @@
* Improvements:
- Apply url-unescape against URL in an inline link [GH-805][]
+ - Show mode toggle message only if it is called interactively
[gh-780]: https://github.com/jrblevin/markdown-mode/issues/780
[gh-802]: https://github.com/jrblevin/markdown-mode/issues/802
diff --git a/markdown-mode.el b/markdown-mode.el
index c27ebbcfc3..33f747612e 100644
--- a/markdown-mode.el
+++ b/markdown-mode.el
@@ -1905,10 +1905,10 @@ See `markdown-hide-markup' for additional details."
(not markdown-hide-markup)
(> (prefix-numeric-value arg) 0)))
(if markdown-hide-markup
- (progn (add-to-invisibility-spec 'markdown-markup)
- (message "markdown-mode markup hiding enabled"))
- (progn (remove-from-invisibility-spec 'markdown-markup)
- (message "markdown-mode markup hiding disabled")))
+ (add-to-invisibility-spec 'markdown-markup)
+ (remove-from-invisibility-spec 'markdown-markup))
+ (when (called-interactively-p 'interactive)
+ (message "markdown-mode markup hiding %s" (if markdown-hide-markup
"enabled" "disabled")))
(markdown-reload-extensions))
@@ -8286,9 +8286,8 @@ and disable it otherwise."
(if (eq arg 'toggle)
(not markdown-hide-urls)
(> (prefix-numeric-value arg) 0)))
- (if markdown-hide-urls
- (message "markdown-mode URL hiding enabled")
- (message "markdown-mode URL hiding disabled"))
+ (when (called-interactively-p 'interactive)
+ (message "markdown-mode URL hiding %s" (if markdown-hide-urls "enabled"
"disabled")))
(markdown-reload-extensions))
@@ -8524,9 +8523,8 @@ and disable it otherwise."
(if (eq arg 'toggle)
(not markdown-enable-wiki-links)
(> (prefix-numeric-value arg) 0)))
- (if markdown-enable-wiki-links
- (message "markdown-mode wiki link support enabled")
- (message "markdown-mode wiki link support disabled"))
+ (when (called-interactively-p 'interactive)
+ (message "markdown-mode wiki link support %s" (if
markdown-enable-wiki-links "enabled" "disabled")))
(markdown-reload-extensions))
(defun markdown-setup-wiki-link-hooks ()
@@ -8779,13 +8777,12 @@ if ARG is omitted or nil."
(not markdown-enable-math)
(> (prefix-numeric-value arg) 0)))
(if markdown-enable-math
- (progn
- (font-lock-add-keywords
- 'markdown-mode markdown-mode-font-lock-keywords-math)
- (message "markdown-mode math support enabled"))
+ (font-lock-add-keywords
+ 'markdown-mode markdown-mode-font-lock-keywords-math)
(font-lock-remove-keywords
- 'markdown-mode markdown-mode-font-lock-keywords-math)
- (message "markdown-mode math support disabled"))
+ 'markdown-mode markdown-mode-font-lock-keywords-math))
+ (when (called-interactively-p 'interactive)
+ (message "markdown-mode math support %s" (if markdown-enable-math
"enabled" "disabled")))
(markdown-reload-extensions))
@@ -9036,9 +9033,9 @@ and disable otherwise."
(if (eq arg 'toggle)
(not markdown-fontify-code-blocks-natively)
(> (prefix-numeric-value arg) 0)))
- (if markdown-fontify-code-blocks-natively
- (message "markdown-mode native code block fontification enabled")
- (message "markdown-mode native code block fontification disabled"))
+ (when (called-interactively-p 'interactive)
+ (message "markdown-mode native code block fontification %s"
+ (if markdown-fontify-code-blocks-natively "enabled" "disabled")))
(markdown-reload-extensions))
;; This is based on `org-src-lang-modes' from org-src.el