branch: externals/gnorb
commit ba976d5d01a0cf25d2be92813830171843171151
Author: Eric Abrahamsen <[email protected]>
Commit: Stefan Monnier <[email protected]>
Prefer defalias to fset
* packages/gnorb/gnorb-bbdb.el:
* packages/gnorb/gnorb-gnus.el: Use defalias to construct ad-hoc
function symbols.
---
gnorb-bbdb.el | 40 ++++++++++++++++++++--------------------
gnorb-gnus.el | 16 ++++++++--------
2 files changed, 28 insertions(+), 28 deletions(-)
diff --git a/gnorb-bbdb.el b/gnorb-bbdb.el
index 900988f..b74f9bd 100644
--- a/gnorb-bbdb.el
+++ b/gnorb-bbdb.el
@@ -166,15 +166,15 @@ be composed, just as in `gnus-posting-styles'."
:type 'list)
(when (fboundp 'bbdb-record-xfield-string)
- (fset (intern (format "bbdb-read-xfield-%s"
- gnorb-bbdb-org-tag-field))
- (lambda (&optional init)
- (gnorb-bbdb-read-org-tags init)))
+ (defalias (intern (format "bbdb-read-xfield-%s"
+ gnorb-bbdb-org-tag-field))
+ (lambda (&optional init)
+ (gnorb-bbdb-read-org-tags init)))
- (fset (intern (format "bbdb-display-%s-multi-line"
- gnorb-bbdb-org-tag-field))
- (lambda (record indent)
- (gnorb-bbdb-display-org-tags record indent))))
+ (defalias (intern (format "bbdb-display-%s-multi-line"
+ gnorb-bbdb-org-tag-field))
+ (lambda (record indent)
+ (gnorb-bbdb-display-org-tags record indent))))
(defun gnorb-bbdb-read-org-tags (&optional init)
"Read Org mode tags, with `completing-read-multiple'."
@@ -518,22 +518,22 @@ layout type."
(t
""))))))
-(fset (intern (format "bbdb-display-%s-multi-line"
- gnorb-bbdb-messages-field))
- (lambda (record indent)
- (gnorb-bbdb-display-messages record 'multi indent)))
+(defalias (intern (format "bbdb-display-%s-multi-line"
+ gnorb-bbdb-messages-field))
+ (lambda (record indent)
+ (gnorb-bbdb-display-messages record 'multi indent)))
-(fset (intern (format "bbdb-display-%s-one-line"
- gnorb-bbdb-messages-field))
- (lambda (record)
- (gnorb-bbdb-display-messages record 'one)))
+(defalias (intern (format "bbdb-display-%s-one-line"
+ gnorb-bbdb-messages-field))
+ (lambda (record)
+ (gnorb-bbdb-display-messages record 'one)))
;; Don't allow direct editing of this field
-(fset (intern (format "bbdb-read-xfield-%s"
- gnorb-bbdb-messages-field))
- (lambda (&optional _init)
- (user-error "This field shouldn't be edited manually")))
+(defalias (intern (format "bbdb-read-xfield-%s"
+ gnorb-bbdb-messages-field))
+ (lambda (&optional _init)
+ (user-error "This field shouldn't be edited manually")))
;; Open links from the *BBDB* buffer.
diff --git a/gnorb-gnus.el b/gnorb-gnus.el
index 4027870..77e21ce 100644
--- a/gnorb-gnus.el
+++ b/gnorb-gnus.el
@@ -908,10 +908,10 @@ option `gnorb-gnus-hint-relevant-article' is non-nil."
(t " ")))
" "))
-(fset (intern (concat "gnus-user-format-function-"
- gnorb-gnus-summary-mark-format-letter))
- (lambda (header)
- (gnorb-gnus-insert-format-letter-maybe header)))
+(defalias (intern (concat "gnus-user-format-function-"
+ gnorb-gnus-summary-mark-format-letter))
+ (lambda (header)
+ (gnorb-gnus-insert-format-letter-maybe header)))
(defun gnorb-gnus-insert-format-tags (header)
(let* ((id (mail-header-message-id header))
@@ -924,10 +924,10 @@ option `gnorb-gnus-hint-relevant-article' is non-nil."
":" (mapconcat #'identity tags ":") ":")
"")))
-(fset (intern (concat "gnus-user-format-function-"
- gnorb-gnus-summary-tags-format-letter))
- (lambda (header)
- (gnorb-gnus-insert-format-tags header)))
+(defalias (intern (concat "gnus-user-format-function-"
+ gnorb-gnus-summary-tags-format-letter))
+ (lambda (header)
+ (gnorb-gnus-insert-format-tags header)))
;;;###autoload
(defun gnorb-gnus-view ()