Show
Ignore:
Timestamp:
2005年10月02日 09時47分43秒 (3 years ago)
Author:
miyoshi
Message:

Sync up with Emacs CVS HEAD.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lisp/emacs-lisp/advice.el

    r3809 r3894  
    22192219         (function 
    22202220          (completing-read 
    2221            (format "%s(default %s) " (or prompt "Function: ") default) 
     2221           (format "%s (default %s): " (or prompt "Function") default) 
    22222222           ad-advised-functions 
    22232223           (if predicate 
     
    22512251            (error "ad-read-advice-class: `%s' has no advices" function))) 
    22522252  (let ((class (completing-read 
    2253                 (format "%s(default %s) " (or prompt "Class: ") default) 
     2253                (format "%s (default %s): " (or prompt "Class") default) 
    22542254                ad-advice-class-completion-table nil t))) 
    22552255    (if (equal class "") 
     
    22692269                      function class) 
    22702270             (car (car name-completion-table)))) 
    2271          (prompt (format "%s(default %s) " (or prompt "Name: ") default)) 
     2271         (prompt (format "%s (default %s): " (or prompt "Name") default)) 
    22722272         (name (completing-read prompt name-completion-table nil t))) 
    22732273    (if (equal name "") 
     
    22902290  "Read a regular expression from the minibuffer." 
    22912291  (let ((regexp (read-from-minibuffer 
    2292                  (concat (or prompt "Regular expression: ") 
    2293                          (if (equal ad-last-regexp "") "
    2294                            (format "(default \"%s\") " ad-last-regexp)))))) 
     2292                 (concat (or prompt "Regular expression") 
     2293                         (if (equal ad-last-regexp "") ":
     2294                           (format " (default %s): " ad-last-regexp)))))) 
    22952295    (setq ad-last-regexp 
    22962296          (if (equal regexp "") ad-last-regexp regexp)))) 
     
    23532353(defun ad-enable-advice (function class name) 
    23542354  "Enables the advice of FUNCTION with CLASS and NAME." 
    2355   (interactive (ad-read-advice-specification "Enable advice of: ")) 
     2355  (interactive (ad-read-advice-specification "Enable advice of")) 
    23562356  (if (ad-is-advised function) 
    23572357      (if (eq (ad-enable-advice-internal function class name t) 0) 
     
    23622362(defun ad-disable-advice (function class name) 
    23632363  "Disable the advice of FUNCTION with CLASS and NAME." 
    2364   (interactive (ad-read-advice-specification "Disable advice of: ")) 
     2364  (interactive (ad-read-advice-specification "Disable advice of")) 
    23652365  (if (ad-is-advised function) 
    23662366      (if (eq (ad-enable-advice-internal function class name nil) 0) 
     
    23862386All currently advised functions will be considered." 
    23872387  (interactive 
    2388    (list (ad-read-regexp "Enable advices via regexp: "))) 
     2388   (list (ad-read-regexp "Enable advices via regexp"))) 
    23892389  (let ((matched-advices (ad-enable-regexp-internal regexp 'any t))) 
    23902390    (if (interactive-p) 
     
    23962396All currently advised functions will be considered." 
    23972397  (interactive 
    2398    (list (ad-read-regexp "Disable advices via regexp: "))) 
     2398   (list (ad-read-regexp "Disable advices via regexp"))) 
    23992399  (let ((matched-advices (ad-enable-regexp-internal regexp 'any nil))) 
    24002400    (if (interactive-p) 
     
    24062406If such an advice was found it will be removed from the list of advices 
    24072407in that CLASS." 
    2408   (interactive (ad-read-advice-specification "Remove advice of: ")) 
     2408  (interactive (ad-read-advice-specification "Remove advice of")) 
    24092409  (if (ad-is-advised function) 
    24102410      (let* ((advice-to-remove (ad-find-advice function class name))) 
     
    32863286advised definition from scratch." 
    32873287  (interactive 
    3288    (list (ad-read-advised-function "Clear cached definition of: "))) 
     3288   (list (ad-read-advised-function "Clear cached definition of"))) 
    32893289  (ad-set-advice-info-field function 'cache nil)) 
    32903290 
     
    36033603definition will always be cached for later usage." 
    36043604  (interactive 
    3605    (list (ad-read-advised-function "Activate advice of: ") 
     3605   (list (ad-read-advised-function "Activate advice of") 
    36063606         current-prefix-arg)) 
    36073607  (if ad-activate-on-top-level 
     
    36333633a call to `ad-activate'." 
    36343634  (interactive 
    3635    (list (ad-read-advised-function "Deactivate advice of: " 'ad-is-active))) 
     3635   (list (ad-read-advised-function "Deactivate advice of" 'ad-is-active))) 
    36363636  (if (not (ad-is-advised function)) 
    36373637      (error "ad-deactivate: `%s' is not advised" function) 
     
    36513651  (interactive 
    36523652   (list (ad-read-advised-function 
    3653           "Update advised definition of: " 'ad-is-active))) 
     3653          "Update advised definition of" 'ad-is-active))) 
    36543654  (if (ad-is-active function) 
    36553655      (ad-activate function compile))) 
     
    36593659If FUNCTION was not advised this will be a noop." 
    36603660  (interactive 
    3661    (list (ad-read-advised-function "Unadvise function: "))) 
     3661   (list (ad-read-advised-function "Unadvise function"))) 
    36623662  (cond ((ad-is-advised function) 
    36633663         (if (ad-is-active function) 
     
    36903690See `ad-activate' for documentation on the optional COMPILE argument." 
    36913691  (interactive 
    3692    (list (ad-read-regexp "Activate via advice regexp: ") 
     3692   (list (ad-read-regexp "Activate via advice regexp") 
    36933693         current-prefix-arg)) 
    36943694  (ad-do-advised-functions (function) 
     
    37013701that has at least one piece of advice whose name includes a match for REGEXP." 
    37023702  (interactive 
    3703    (list (ad-read-regexp "Deactivate via advice regexp: "))) 
     3703   (list (ad-read-regexp "Deactivate via advice regexp"))) 
    37043704  (ad-do-advised-functions (function) 
    37053705    (if (ad-find-some-advice function 'any regexp) 
     
    37123712See `ad-activate' for documentation on the optional COMPILE argument." 
    37133713  (interactive 
    3714    (list (ad-read-regexp "Update via advice regexp: ") 
     3714   (list (ad-read-regexp "Update via advice regexp") 
    37153715         current-prefix-arg)) 
    37163716  (ad-do-advised-functions (function)