;;; advice.el --- An overloading mechanism for Emacs Lisp functions -*- lexical-binding: t -*-
-;; Copyright (C) 1993-1994, 2000-2015 Free Software Foundation, Inc.
+;; Copyright (C) 1993-1994, 2000-2016 Free Software Foundation, Inc.
;; Author: Hans Chalupsky <hans@cs.buffalo.edu>
;; Maintainer: emacs-devel@gnu.org
;; "Switch to non-existing buffers only upon confirmation."
;; (interactive "BSwitch to buffer: ")
;; (if (or (get-buffer (ad-get-arg 0))
-;; (y-or-n-p (format "`%s' does not exist, create? " (ad-get-arg 0))))
+;; (y-or-n-p (format-message "`%s' does not exist, create? "
+;; (ad-get-arg 0))))
;; ad-do-it))
;;
;;(defadvice find-file (before existing-files-only activate)
Only proper subtrees are considered, for example, if TREE is (1 (2 (3)) 4)
then the subtrees will be 1 (2 (3)) 2 (3) 3 4, dotted structures are
allowed too. Once a qualifying subtree has been found its subtrees will
-not be considered anymore. (ad-substitute-tree 'atom 'identity tree)
+not be considered anymore. (ad-substitute-tree \\='atom \\='identity tree)
generates a copy of TREE."
(cond ((consp tReE)
(cons (if (funcall sUbTrEe-TeSt (car tReE))
;; @@ Interactive input functions:
;; ===============================
-(declare-function 'function-called-at-point "help")
+(declare-function function-called-at-point "help")
(defun ad-read-advised-function (&optional prompt predicate default)
"Read name of advised function with completion from the minibuffer.
;; The mapping should work for any two argument lists.
(defun ad-map-arglists (source-arglist target-arglist)
- "Make ‘funcall/apply’ form to map SOURCE-ARGLIST to TARGET-ARGLIST.
+ "Make `funcall/apply' form to map SOURCE-ARGLIST to TARGET-ARGLIST.
The arguments supplied to TARGET-ARGLIST will be taken from SOURCE-ARGLIST just
as if they had been supplied to a function with TARGET-ARGLIST directly.
Excess source arguments will be neglected, missing source arguments will be
-supplied as nil. Returns a ‘funcall’ or ‘apply’ form with the second element
-being ‘function’ which has to be replaced by an actual function argument.
-Example: ‘(ad-map-arglists '(a &rest args) '(w x y z))’ will return
- ‘(funcall ad--addoit-function a (car args) (car (cdr args)) (nth 2 args))’."
+supplied as nil. Returns a `funcall' or `apply' form with the second element
+being `function' which has to be replaced by an actual function argument.
+Example: (ad-map-arglists \\='(a &rest args) \\='(w x y z)) will return
+ (funcall ad--addoit-function a (car args) (car (cdr args)) (nth 2 args))."
(let* ((parsed-source-arglist (ad-parse-arglist source-arglist))
(source-reqopt-args (append (nth 0 parsed-source-arglist)
(nth 1 parsed-source-arglist)))
"Define a piece of advice for FUNCTION (a symbol).
The syntax of `defadvice' is as follows:
- \(defadvice FUNCTION (CLASS NAME [POSITION] [ARGLIST] FLAG...)
+ (defadvice FUNCTION (CLASS NAME [POSITION] [ARGLIST] FLAG...)
[DOCSTRING] [INTERACTIVE-FORM]
BODY...)