emacs-devel
[Top][All Lists]
Advanced

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

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


From: Stefan Monnier
Subject: Re: [Emacs-diffs] /srv/bzr/emacs/trunk r111099: gmm-utils.el (gmm-flet): Remove.
Date: Tue, 04 Dec 2012 23:02:55 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

> +  (let ((orig-json-alist-p (symbol-function 'json-alist-p)))
> +    (fset 'json-alist-p
> +       (lambda (list) (gnus-sync-json-alist-p list))) ; temp patch
> +    (unwind-protect
> +     (let ((url-request-method method)
> +           (url-request-extra-headers headers)
> +           (url-request-data (if kvdata (json-encode kvdata) nil)))
> +       (with-current-buffer (url-retrieve-synchronously url)
> +         (let ((data (gnus-sync-lesync-parse)))
> +           (gnus-message
> +            12 "gnus-sync-lesync-call: %s URL %s sent %S got %S"
> +            method url `((headers . ,headers) (data ,kvdata)) data)
> +           (kill-buffer (current-buffer))
> +           data)))
> +      (fset 'json-alist-p orig-json-alist-p))))

Why not use `letf'?

> +     (fset 'mail-abbrev-in-expansion-header-p (lambda (&rest args) t))
> +     (unwind-protect
> +         (read-from-minibuffer prompt initial-contents)
> +       (fset 'mail-abbrev-in-expansion-header-p orig-m-a-i-e-h-p)))

Same here.


        Stefan



reply via email to

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