[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/gnorb 14471db 262/449: Silence compiler warnings for un
From: |
Stefan Monnier |
Subject: |
[elpa] externals/gnorb 14471db 262/449: Silence compiler warnings for unbound vars |
Date: |
Fri, 27 Nov 2020 23:15:52 -0500 (EST) |
branch: externals/gnorb
commit 14471dbb9214447552d8f92fcf1c92881f21b1ad
Author: Eric Abrahamsen <eric@ericabrahamsen.net>
Commit: Eric Abrahamsen <eric@ericabrahamsen.net>
Silence compiler warnings for unbound vars
* gnorb-bbdb.el (gnorb-bbdb-display-org-tags): Silence
(gnorb-bbdb-display-messages): Silence
* gnorb-gnus.el (gnorb-gnus-capture-abort-cleanup): Silence
(gnorb-gnus-search-messages): Silence
* gnorb-registry.el (gnorb-registry-capture-abort-cleanup): Silence
---
gnorb-bbdb.el | 75 +++++++++++++++++++++++++++++--------------------------
gnorb-gnus.el | 28 +++++++++++----------
gnorb-registry.el | 21 ++++++++--------
3 files changed, 66 insertions(+), 58 deletions(-)
diff --git a/gnorb-bbdb.el b/gnorb-bbdb.el
index eba51c1..4754f15 100644
--- a/gnorb-bbdb.el
+++ b/gnorb-bbdb.el
@@ -194,13 +194,16 @@ Org tags are stored in the `gnorb-bbdb-org-tags-field'."
record
gnorb-bbdb-org-tag-field)))
(when val
- (bbdb-display-text (format fmt gnorb-bbdb-org-tag-field)
- `(xfields ,full-field field-label)
- 'bbdb-field-name)
- (if (consp val)
- (bbdb-display-list val gnorb-bbdb-org-tag-field "\n")
- (insert
- (bbdb-indent-string (concat val "\n") indent))))))
+ ;; We already know that `fmt' and `indent' are dynamically
+ ;; bound, shut up about it.
+ (with-no-warnings
+ (bbdb-display-text (format fmt gnorb-bbdb-org-tag-field)
+ `(xfields ,full-field field-label)
+ 'bbdb-field-name)
+ (if (consp val)
+ (bbdb-display-list val gnorb-bbdb-org-tag-field "\n")
+ (insert
+ (bbdb-indent-string (concat val "\n") indent)))))))
;;;###autoload
(defun gnorb-bbdb-mail (records &optional subject n verbose)
@@ -452,41 +455,43 @@ layout type."
(define-key map [mouse-1] 'gnorb-bbdb-mouse-open-link)
(define-key map (kbd "<RET>") 'gnorb-bbdb-RET-open-link)
(when val
- ;; indent and fmt are dynamically bound
(when (eq format 'multi)
- (bbdb-display-text (format fmt gnorb-bbdb-messages-field)
- `(xfields ,full-field field-label)
- 'bbdb-field-name))
+ (with-no-warnings ; For `fmt'
+ (bbdb-display-text (format fmt gnorb-bbdb-messages-field)
+ `(xfields ,full-field field-label)
+ 'bbdb-field-name)))
(insert (cond ((and (stringp val)
(eq format 'multi))
- (bbdb-indent-string (concat val "\n") indent))
+ (with-no-warnings ; For `indent'
+ (bbdb-indent-string (concat val "\n") indent)))
((listp val)
;; Why aren't I using `bbdb-display-list' with a
;; preformatted list of messages?
(concat
- (bbdb-indent-string
- (mapconcat
- (lambda (m)
- (prog1
- (org-propertize
- (concat
- (format-time-string
- (replace-regexp-in-string
- "%:subject" (gnorb-bbdb-link-subject m)
- (replace-regexp-in-string
- "%:count" (number-to-string count)
- (if (eq format 'multi)
- gnorb-bbdb-message-link-format-multi
- gnorb-bbdb-message-link-format-one)))
- (gnorb-bbdb-link-date m)))
- 'face 'gnorb-bbdb-link
- 'mouse-face 'highlight
- 'gnorb-bbdb-link-count count
- 'keymap map)
- (incf count)))
- val (if (eq format 'multi)
- "\n" ", "))
- indent)
+ (with-no-warnings ; For `indent' again
+ (bbdb-indent-string
+ (mapconcat
+ (lambda (m)
+ (prog1
+ (org-propertize
+ (concat
+ (format-time-string
+ (replace-regexp-in-string
+ "%:subject" (gnorb-bbdb-link-subject m)
+ (replace-regexp-in-string
+ "%:count" (number-to-string count)
+ (if (eq format 'multi)
+ gnorb-bbdb-message-link-format-multi
+ gnorb-bbdb-message-link-format-one)))
+ (gnorb-bbdb-link-date m)))
+ 'face 'gnorb-bbdb-link
+ 'mouse-face 'highlight
+ 'gnorb-bbdb-link-count count
+ 'keymap map)
+ (incf count)))
+ val (if (eq format 'multi)
+ "\n" ", "))
+ indent))
(if (eq format 'multi) "\n" "")))
(t
""))))))
diff --git a/gnorb-gnus.el b/gnorb-gnus.el
index d390dee..a793c0d 100644
--- a/gnorb-gnus.el
+++ b/gnorb-gnus.el
@@ -236,15 +236,16 @@ save them into `gnorb-tmp-dir'."
(add-hook 'org-capture-mode-hook 'gnorb-gnus-capture-attach)
(defun gnorb-gnus-capture-abort-cleanup ()
- (when (and org-note-abort
- (org-capture-get :gnus-attachments))
- (condition-case error
- (progn (org-attach-delete-all)
- (setq abort-note 'clean)
- ;; remove any gnorb-mail-header values here
- )
- (error
- (setq abort-note 'dirty)))))
+ (with-no-warnings ; For `org-note-abort'
+ (when (and org-note-abort
+ (org-capture-get :gnus-attachments))
+ (condition-case error
+ (progn (org-attach-delete-all)
+ (setq abort-note 'clean)
+ ;; remove any gnorb-mail-header values here
+ )
+ (error
+ (setq abort-note 'dirty))))))
(add-hook 'org-capture-prepare-finalize-hook
'gnorb-gnus-capture-abort-cleanup)
@@ -560,10 +561,11 @@ work."
(user-error
"Please add a \"nngnorb\" backend to your gnus installation."))))
(when (version= "5.13" gnus-version-number)
- (setq nnir-current-query nil
- nnir-current-server nil
- nnir-current-group-marked nil
- nnir-artlist nil))
+ (with-no-warnings ; All these variables are available.
+ (setq nnir-current-query nil
+ nnir-current-server nil
+ nnir-current-group-marked nil
+ nnir-artlist nil)))
(gnus-group-read-ephemeral-group
;; in 24.4, the group name is mostly decorative. in 24.3, the
;; query itself is read from there. It should look like (concat
diff --git a/gnorb-registry.el b/gnorb-registry.el
index b27545e..f70531c 100644
--- a/gnorb-registry.el
+++ b/gnorb-registry.el
@@ -98,16 +98,17 @@ to the message's registry entry, under the 'gnorb-ids key."
(defun gnorb-registry-capture-abort-cleanup ()
(when (and (org-capture-get :gnorb-id)
org-note-abort)
- (condition-case error
- (let* ((msg-id (format "<%s>" (plist-get org-store-link-plist
:message-id)))
- (existing-org-ids (gnus-registry-get-id-key msg-id 'gnorb-ids))
- (org-id (org-capture-get :gnorb-id)))
- (when (member org-id existing-org-ids)
- (gnus-registry-set-id-key msg-id 'gnorb-ids
- (remove org-id existing-org-ids)))
- (setq abort-note 'clean))
- (error
- (setq abort-note 'dirty)))))
+ (with-no-warnings ; For `abort-note'
+ (condition-case error
+ (let* ((msg-id (format "<%s>" (plist-get org-store-link-plist
:message-id)))
+ (existing-org-ids (gnus-registry-get-id-key msg-id 'gnorb-ids))
+ (org-id (org-capture-get :gnorb-id)))
+ (when (member org-id existing-org-ids)
+ (gnus-registry-set-id-key msg-id 'gnorb-ids
+ (remove org-id existing-org-ids)))
+ (setq abort-note 'clean))
+ (error
+ (setq abort-note 'dirty))))))
(defun gnorb-find-visit-candidates (ids &optional include-zombies)
"For all message-ids in IDS (which should be a list of
- [elpa] externals/gnorb 354705a 245/449: Provide completion for Org tags on BBDB records, (continued)
- [elpa] externals/gnorb 354705a 245/449: Provide completion for Org tags on BBDB records, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 2834602 247/449: Move roadmap/todo list from manual to README, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb f0ba4d7 250/449: Improvements to message disassociation, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 0a138f9 251/449: Reuse existing frames/windows when following links, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 1e071a0 252/449: Further refinements to link following, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb bfd8566 253/449: Be more careful about brackets on message-ids, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 1b56250 254/449: Change wording of disassociation message, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb d4a4ccf 256/449: Better handling of non-existent Org headings, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb ad1538d 260/449: Autoload cookie for gnorb-tracking-initialize, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 8db194a 259/449: Add TAGS to .gitignore, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 14471db 262/449: Silence compiler warnings for unbound vars,
Stefan Monnier <=
- [elpa] externals/gnorb 6aef624 265/449: Restore the layout after the restore process, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb c44a87b 266/449: Deletion of associations when composing messages, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 7a43d8b 267/449: Bug in message disassociation, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb b82576c 268/449: Always clear attachments during triggering, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 15b35dc 269/449: Don't store a link to message we're replying to, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 67ce358 270/449: Version 1.0.1, plus docs and NEWS, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 806775c 272/449: Wrap save-excursion around more of gnorb-org-view, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 982aee9 271/449: Adjust requires and autoloads, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb a55b0c0 273/449: Make gnorb-ids precious earlier in registry setup, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 3877b2d 275/449: Still didn't have incoming-do-todo logic right, Stefan Monnier, 2020/11/27