[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/markdown-mode d1a20625a3 30/33: Fix byte compile warnings
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/markdown-mode d1a20625a3 30/33: Fix byte compile warnings |
Date: |
Wed, 2 Apr 2025 01:01:30 -0400 (EDT) |
branch: elpa/markdown-mode
commit d1a20625a33b9157652c3f80b67416b27b9edbb6
Author: Shohei YOSHIDA <syohex@gmail.com>
Commit: Shohei YOSHIDA <syohex@gmail.com>
Fix byte compile warnings
---
markdown-mode.el | 68 +++++++++++++++++++++++++++++++-------------------------
1 file changed, 38 insertions(+), 30 deletions(-)
diff --git a/markdown-mode.el b/markdown-mode.el
index a0abf6776d..6987741a5b 100644
--- a/markdown-mode.el
+++ b/markdown-mode.el
@@ -3433,7 +3433,8 @@ the buffer)."
(markdown-code-block-at-pos begin))
(progn (goto-char (min (1+ begin) last))
(when (< (point) last)
- (markdown-match-wiki-link last)))
+ (with-no-warnings
+ (markdown-match-wiki-link last))))
(set-match-data (list begin end))
t))))
@@ -8579,11 +8580,12 @@ and highlight accordingly."
(file-name
(markdown-convert-wiki-link-to-filename
(markdown-wiki-link-link))))
- (if (condition-case nil (file-exists-p file-name) (error nil))
+ (with-no-warnings
+ (if (condition-case nil (file-exists-p file-name) (error nil))
+ (markdown-highlight-wiki-link
+ highlight-beginning highlight-end 'markdown-link-face)
(markdown-highlight-wiki-link
- highlight-beginning highlight-end 'markdown-link-face)
- (markdown-highlight-wiki-link
- highlight-beginning highlight-end
'markdown-missing-link-face)))))))
+ highlight-beginning highlight-end
'markdown-missing-link-face))))))))
(defun markdown-extend-changed-region (from to)
"Extend region given by FROM and TO so that we can fontify all links.
@@ -8619,7 +8621,8 @@ newline after."
;; Extend the region to fontify so that it starts
;; and ends at safe places.
(cl-multiple-value-bind (new-from new-to)
- (markdown-extend-changed-region from to)
+ (with-no-warnings
+ (markdown-extend-changed-region from to))
(goto-char new-from)
;; Only refontify when the range contains text with a
;; wiki link face or if the wiki link regexp matches.
@@ -8628,10 +8631,11 @@ newline after."
'(markdown-link-face markdown-missing-link-face))
(re-search-forward
markdown-regex-wiki-link new-to t))
- ;; Unfontify existing fontification (start from scratch)
- (markdown-unfontify-region-wiki-links new-from new-to)
- ;; Now do the fontification.
- (markdown-fontify-region-wiki-links new-from new-to))))))
+ (with-no-warnings
+ ;; Unfontify existing fontification (start from scratch)
+ (markdown-unfontify-region-wiki-links new-from new-to)
+ ;; Now do the fontification.
+ (markdown-fontify-region-wiki-links new-from new-to)))))))
(cursor-intangible-mode -1)
(and (not modified)
(buffer-modified-p)
@@ -8640,12 +8644,14 @@ newline after."
(defun markdown-check-change-for-wiki-link-after-change (from to _)
"Check region between FROM and TO for wiki links and re-fontify as needed.
Designed to be used with the `after-change-functions' hook."
- (markdown-check-change-for-wiki-link from to))
+ (with-no-warnings
+ (markdown-check-change-for-wiki-link from to)))
(defun markdown-fontify-buffer-wiki-links ()
"Refontify all wiki links in the buffer."
(interactive)
- (markdown-check-change-for-wiki-link (point-min) (point-max)))
+ (with-no-warnings
+ (markdown-check-change-for-wiki-link (point-min) (point-max))))
(defun markdown-toggle-wiki-links (&optional arg)
"Toggle support for wiki links.
@@ -8665,24 +8671,26 @@ and disable it otherwise."
"Add or remove hooks for fontifying wiki links.
These are only enabled when `markdown-wiki-link-fontify-missing' is non-nil."
;; Anytime text changes make sure it gets fontified correctly
- (if (and markdown-enable-wiki-links
- markdown-wiki-link-fontify-missing)
- (add-hook 'after-change-functions
- #'markdown-check-change-for-wiki-link-after-change t t)
- (remove-hook 'after-change-functions
- #'markdown-check-change-for-wiki-link-after-change t))
- ;; If we left the buffer there is a really good chance we were
- ;; creating one of the wiki link documents. Make sure we get
- ;; refontified when we come back.
- (if (and markdown-enable-wiki-links
- markdown-wiki-link-fontify-missing)
- (progn
- (add-hook 'window-configuration-change-hook
- #'markdown-fontify-buffer-wiki-links t t)
- (markdown-fontify-buffer-wiki-links))
- (remove-hook 'window-configuration-change-hook
- #'markdown-fontify-buffer-wiki-links t)
- (markdown-unfontify-region-wiki-links (point-min) (point-max))))
+ (with-no-warnings
+ (if (and markdown-enable-wiki-links
+ markdown-wiki-link-fontify-missing)
+ (add-hook 'after-change-functions
+ #'markdown-check-change-for-wiki-link-after-change t t)
+ (remove-hook 'after-change-functions
+ #'markdown-check-change-for-wiki-link-after-change t))
+ ;; If we left the buffer there is a really good chance we were
+ ;; creating one of the wiki link documents. Make sure we get
+ ;; refontified when we come back.
+ (if (and markdown-enable-wiki-links
+ markdown-wiki-link-fontify-missing)
+ (progn
+ (add-hook 'window-configuration-change-hook
+ #'markdown-fontify-buffer-wiki-links t t)
+ (markdown-fontify-buffer-wiki-links))
+ (remove-hook 'window-configuration-change-hook
+ #'markdown-fontify-buffer-wiki-links t)
+ (with-no-warnings
+ (markdown-unfontify-region-wiki-links (point-min) (point-max))))) )
;;; Following & Doing =========================================================
- [nongnu] elpa/markdown-mode updated (d2d960bec1 -> 9d2850ed58), ELPA Syncer, 2025/04/02
- [nongnu] elpa/markdown-mode 88f30a641c 08/33: All tests are passing; still needs code cleanup, ELPA Syncer, 2025/04/02
- [nongnu] elpa/markdown-mode f85b3be32a 22/33: Only set mouse-face when markdown-mouse-follow-link is t, ELPA Syncer, 2025/04/02
- [nongnu] elpa/markdown-mode a72dfa27a5 04/33: Add eldoc functionality for wiki links, ELPA Syncer, 2025/04/02
- [nongnu] elpa/markdown-mode 2645b7fd14 07/33: Add markdown-missing-link-face when appropriate to parts of wiki links, ELPA Syncer, 2025/04/02
- [nongnu] elpa/markdown-mode 085fa615d0 15/33: Update wiki links test to check for markup-markup-face; organize wiki link tests to be with other wiki link tests, ELPA Syncer, 2025/04/02
- [nongnu] elpa/markdown-mode cc33f7c73d 14/33: Update tests to reflect different font faces for wiki links and missing files, ELPA Syncer, 2025/04/02
- [nongnu] elpa/markdown-mode d1a20625a3 30/33: Fix byte compile warnings,
ELPA Syncer <=
- [nongnu] elpa/markdown-mode f579bcc561 26/33: Merge branch 'master' of github.com:jrblevin/markdown-mode into jayemar/toggle-hiding-of-wiki-links, ELPA Syncer, 2025/04/02
- [nongnu] elpa/markdown-mode f464a6fa68 32/33: Add issue link, ELPA Syncer, 2025/04/02
- [nongnu] elpa/markdown-mode 85be4f1b68 06/33: Handle wiki links that don't have alias text, ELPA Syncer, 2025/04/02
- [nongnu] elpa/markdown-mode e015d8542a 03/33: Propertize different sections of wiki links, ELPA Syncer, 2025/04/02
- [nongnu] elpa/markdown-mode 819ab2a212 18/33: Merge branch 'master' into jayemar/toggle-hiding-of-wiki-links, ELPA Syncer, 2025/04/02
- [nongnu] elpa/markdown-mode 06b15337c9 16/33: Fix lint warning, ELPA Syncer, 2025/04/02
- [nongnu] elpa/markdown-mode 8fd66014cc 13/33: Use face to show missing wiki links when enabled; remove additional unused code, ELPA Syncer, 2025/04/02
- [nongnu] elpa/markdown-mode 11bac530de 29/33: Update versions of obsoleted functions, ELPA Syncer, 2025/04/02
- [nongnu] elpa/markdown-mode 244464388d 27/33: Merge branch 'master' into jayemar/toggle-hiding-of-wiki-links, ELPA Syncer, 2025/04/02
- [nongnu] elpa/markdown-mode eb4b02e40c 19/33: Merge branch 'master' into jayemar/toggle-hiding-of-wiki-links, ELPA Syncer, 2025/04/02