[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 0142fa0 2/2: Prefer defalias to fset
From: |
Eric Abrahamsen |
Subject: |
[elpa] master 0142fa0 2/2: Prefer defalias to fset |
Date: |
Thu, 28 Dec 2017 13:30:15 -0500 (EST) |
branch: master
commit 0142fa028afe67dbca12418ddbaf40f7bc318365
Author: Eric Abrahamsen <address@hidden>
Commit: Eric Abrahamsen <address@hidden>
Prefer defalias to fset
* packages/gnorb/gnorb-bbdb.el:
* packages/gnorb/gnorb-gnus.el: Use defalias to construct ad-hoc
function symbols.
---
packages/gnorb/gnorb-bbdb.el | 40 ++++++++++++++++++++--------------------
packages/gnorb/gnorb-gnus.el | 16 ++++++++--------
2 files changed, 28 insertions(+), 28 deletions(-)
diff --git a/packages/gnorb/gnorb-bbdb.el b/packages/gnorb/gnorb-bbdb.el
index dd129ab..1c41848 100644
--- a/packages/gnorb/gnorb-bbdb.el
+++ b/packages/gnorb/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/packages/gnorb/gnorb-gnus.el b/packages/gnorb/gnorb-gnus.el
index 4027870..77e21ce 100644
--- a/packages/gnorb/gnorb-gnus.el
+++ b/packages/gnorb/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 ()