Skip to content

Commit

Permalink
+x-loop: Fix the `y-or-n-p' advice for Emacs 24.
Browse files Browse the repository at this point in the history
The function now accepts variable number of arguments. Avoid explicitly
listing the arguments in the advice, it is not needed here anyway.
  • Loading branch information
stepnem committed Jun 23, 2011
1 parent 3953a55 commit 5edbb16
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions sunrise-x-loop.el
Original file line number Diff line number Diff line change
Expand Up @@ -273,12 +273,12 @@ operations to the background interpreter."
(concat "Sunrise Loop: " op-name "... ")
(concat "Sunrise: " op-name "... ")))

(defadvice y-or-n-p
(before sr-loop-advice-y-or-n-p (prompt))
(defadvice y-or-n-p (before sr-loop-advice-y-or-n-p)
"Modify all confirmation request messages inside a loop scope."
(when sr-loop-scope
(setq prompt (replace-regexp-in-string
"\?" " in the background? (overwrites ALWAYS!)" prompt))))
(setq (ad-get-arg 0)
(replace-regexp-in-string
"\?" " in the background? (overwrites ALWAYS!)" (ad-get-arg 0)))))

(defadvice dired-mark-read-file-name
(before sr-loop-advice-dired-mark-read-file-name
Expand Down

0 comments on commit 5edbb16

Please sign in to comment.