[Top][All Lists]

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

Re: [Emacs-diffs] /srv/bzr/emacs/trunk r111086: gmm-utils.el (gmm-flet,

From: Katsumi Yamaoka
Subject: Re: [Emacs-diffs] /srv/bzr/emacs/trunk r111086: gmm-utils.el (gmm-flet, gmm-labels): New macros.
Date: Wed, 05 Dec 2012 08:05:15 +0900
User-agent: Gnus/5.130006 (真 Gnus v0.6) Emacs/24.3.50 (i686-pc-cygwin)

Katsumi Yamaoka wrote:
> IIRC I didn't see neither cl-flet nor cl-letf wasn't usable as
> an analogue to flet (I tried them right after flet was marked
> obsolete).  But now I confirmed it:

> (progn (pp (macroexpand
> '(cl-flet ((message (&rest args) (concat "X " (apply #'format args))))
>    (message "Hello"))
>  )) nil)
> (let ((--cl-message--
>        (cl-function
>       (lambda (&rest args)
>         (concat "X " (apply #'format args))))))
>   (funcall --cl-message-- "Hello"))

No, it wasn't appropriate example.  Again I confirmed we have no
replacement of flet.

(defun my-message ()
  (message "Hello"))

(cl-flet ((message (&rest args) (concat "X " (apply #'format args))))

(flet ((message (&rest args) (concat "X " (apply #'format args))))
"X Hello"

Defadvice?  Uhm, that defadvice code exists in an official source
code is very ugly, I feel. :<

reply via email to

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