[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#14070: 24.3.50; incorrect doc from `C-h f' when use `defadvice' with

From: Drew Adams
Subject: bug#14070: 24.3.50; incorrect doc from `C-h f' when use `defadvice' with `before'
Date: Wed, 27 Mar 2013 10:24:10 -0700

emacs -Q
Evaluate this sexp:
(defadvice query-replace
 (before respect-search/replace-region-as-default-flag activate)
   (let ((common
           (concat "Query replace"
                   (and current-prefix-arg  " word")
                   (and transient-mark-mode  mark-active
                        (not search/replace-region-as-default-flag)
                        " in region"))
     (list (nth 0 common) (nth 1 common) (nth 2 common)
           (and transient-mark-mode  mark-active  (region-beginning))
           (and transient-mark-mode  mark-active  (region-end))))))
Then C-h f query-replace.  You see this as part of the description:
 :around advice: `ad-Advice-query-replace'
1. It should be :before, not :around, no?
(When you click on that link it confirms that it is `Before-advice'.)
2. How can you tell where that advice is defined?  It doesn't matter
whether you put that defadvice in a file foo.el and load that.  Neither
C-h f query-replace nor clicking `ad-Advice-query-replace' in that
description tells you anything about where the actual advice
`respect-search/replace-region-as-default-flag' is defined.

In GNU Emacs (i386-mingw-nt5.1.2600)
 of 2013-03-23 on VBOX
Bzr revision: 112115 address@hidden
Windowing system distributor `Microsoft Corp.', version 5.1.2600
Configured using:
 `configure --with-gcc (4.7) --no-opt --enable-checking --cflags
 -IC:/emacs/libs/libXpm-3.5.10/include -IC:/emacs/libs/libXpm-3.5.10/src

reply via email to

[Prev in Thread] Current Thread [Next in Thread]