diff options
| author | conao3 <conao3@gmail.com> | 2019-07-02 09:08:45 +0900 |
|---|---|---|
| committer | conao3 <conao3@gmail.com> | 2019-07-02 09:08:45 +0900 |
| commit | 8abcf525652d8a112df0e7256998f428a29e3fab (patch) | |
| tree | 8995c7b2fae2e070fa310b6b13acb3fe2d35d854 | |
| parent | e76a15dbe37ca428fe583a9eee6b395bc30b8e18 (diff) | |
define defun-advice function
| -rw-r--r-- | ivy-posframe.el | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/ivy-posframe.el b/ivy-posframe.el index 63c5906..df37f7f 100644 --- a/ivy-posframe.el +++ b/ivy-posframe.el @@ -481,6 +481,23 @@ the advised function there (a key from `ivy-posframe-advice-alist')." (apply (car args) (cdr args))) ) +(defmacro ivy-posframe--defun-advice (name arglist &optional docstring &rest body) + "Define NAME as a `ivy-posframe' advice function. see `defun'. +The definition is (lambda ARGLIST [DOCSTRING] BODY...). +See also the function `interactive'. +DECL is a declaration, optional, of the form (declare DECLS...) where +DECLS is a list of elements of the form (PROP . VALUES). These are +interpreted according to `defun-declarations-alist'. +The return value is undefined. + +\(fn NAME ARGLIST &optional DOCSTRING DECL &rest BODY)" + (declare (doc-string 3) (indent 2)) + `(defun ,name ,arglist + ,(when (stringp docstring) docstring) + (when (display-graphic-p) + ,(unless (stringp docstring) docstring) + ,@body))) + (defun ivy-posframe--minibuffer-setup (fn &rest args) "Advice function of FN, `ivy--minibuffer-setup' with ARGS." (let ((ivy-fixed-height-minibuffer nil)) |
