Remove obsolete usage of defadvice
This only affected some old Gnus advices. One of those should be obsolete (I guess), the other has been transformed to use `define-advice`.
This commit is contained in:
parent
0d1b624c72
commit
c74eed5df1
32
init.el
32
init.el
@ -1540,12 +1540,15 @@ Note that this workaround is incomplete, as explained in this comment."
|
|||||||
(bbdb-initialize 'gnus 'message)
|
(bbdb-initialize 'gnus 'message)
|
||||||
(bbdb-mua-auto-update-init 'message))
|
(bbdb-mua-auto-update-init 'message))
|
||||||
|
|
||||||
;; Ensure that whenever we compose new mail, it will use the correct
|
;; Ensure that whenever we compose new mail, it will use the correct posting style.
|
||||||
;; posting style. This is ensured by setting ARG of
|
;; This is ensured by setting ARG of `gnus-group-mail’ to 1 in case it is not set, to
|
||||||
;; `gnus-group-mail’ to 1 to let it query the user for a group.
|
;; let it query the user for a group.
|
||||||
(defadvice gnus-group-mail (before inhibit-no-argument activate)
|
(define-advice gnus-group-mail (:around
|
||||||
(unless (ad-get-arg 0)
|
(orig-fun &optional arg)
|
||||||
(ad-set-arg 0 1)))
|
inhibit-no-argument)
|
||||||
|
(if arg
|
||||||
|
(funcall orig-fun arg)
|
||||||
|
(funcall orig-fun 1)))
|
||||||
|
|
||||||
(remove-hook 'gnus-mark-article-hook
|
(remove-hook 'gnus-mark-article-hook
|
||||||
'gnus-summary-mark-read-and-unread-as-read)
|
'gnus-summary-mark-read-and-unread-as-read)
|
||||||
@ -1563,23 +1566,6 @@ Note that this workaround is incomplete, as explained in this comment."
|
|||||||
;; Show topics in group buffer
|
;; Show topics in group buffer
|
||||||
(add-hook 'gnus-group-mode-hook 'gnus-topic-mode)
|
(add-hook 'gnus-group-mode-hook 'gnus-topic-mode)
|
||||||
|
|
||||||
;; We need to do some magic as otherwise the agent does not delete
|
|
||||||
;; articles from its .overview when we move them around. Thus we
|
|
||||||
;; mark articles as expireable when they have been moved to another
|
|
||||||
;; group.
|
|
||||||
(defadvice gnus-summary-move-article (around
|
|
||||||
no-cancel-mark
|
|
||||||
(&optional n to-newsgroup
|
|
||||||
select-method action)
|
|
||||||
activate)
|
|
||||||
(let ((articles (gnus-summary-work-articles n))
|
|
||||||
(return ad-do-it))
|
|
||||||
(when (or (null action)
|
|
||||||
(eq action 'move))
|
|
||||||
(dolist (article articles)
|
|
||||||
(gnus-summary-mark-article article gnus-expirable-mark)))
|
|
||||||
return))
|
|
||||||
|
|
||||||
;; Increase score of group after reading it
|
;; Increase score of group after reading it
|
||||||
(add-hook 'gnus-summary-exit-hook
|
(add-hook 'gnus-summary-exit-hook
|
||||||
'gnus-summary-bubble-group)
|
'gnus-summary-bubble-group)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user