[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r111117: Avoid letf macro use from Gn
From: |
Katsumi Yamaoka |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r111117: Avoid letf macro use from Gnus |
Date: |
Thu, 06 Dec 2012 03:30:23 +0000 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 111117
committer: Katsumi Yamaoka <address@hidden>
branch nick: trunk
timestamp: Thu 2012-12-06 03:30:23 +0000
message:
Avoid letf macro use from Gnus
gnus/gmm-utils.el (gmm-flet): Remove.
gnus/gnus-sync.el (gnus-sync-lesync-call): Avoid overriding json-alist-p.
gnus/message.el (message-read-from-minibuffer): Avoid overriding
mail-abbrev-in-expansion-header-p.
mail/mailabbrev.el (mail-abbrev-expand-wrapper): Work in minibuffer so as to
enable message-read-from-minibuffer to expand mail aliases.
modified:
lisp/ChangeLog
lisp/gnus/ChangeLog
lisp/gnus/gmm-utils.el
lisp/gnus/gnus-sync.el
lisp/gnus/message.el
lisp/mail/mailabbrev.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2012-12-06 01:39:03 +0000
+++ b/lisp/ChangeLog 2012-12-06 03:30:23 +0000
@@ -1,3 +1,8 @@
+2012-12-06 Katsumi Yamaoka <address@hidden>
+
+ * mail/mailabbrev.el (mail-abbrev-expand-wrapper): Work in minibuffer
+ so as to enable message-read-from-minibuffer to expand mail aliases.
+
2012-12-06 Stefan Monnier <address@hidden>
* minibuf-eldef.el (minibuf-eldef-update-minibuffer): Don't mess with
=== modified file 'lisp/gnus/ChangeLog'
--- a/lisp/gnus/ChangeLog 2012-12-05 18:13:38 +0000
+++ b/lisp/gnus/ChangeLog 2012-12-06 03:30:23 +0000
@@ -1,3 +1,13 @@
+2012-12-06 Katsumi Yamaoka <address@hidden>
+
+ * gmm-utils.el (gmm-flet): Remove.
+
+ * gnus-sync.el (gnus-sync-lesync-call):
+ Avoid overriding json-alist-p.
+
+ * message.el (message-read-from-minibuffer):
+ Avoid overriding mail-abbrev-in-expansion-header-p.
+
2012-12-05 Sam Steingold <address@hidden>
* gnus.el (gnus-delete-gnus-frame): Extract from `gnus-other-frame'.
=== modified file 'lisp/gnus/gmm-utils.el'
--- a/lisp/gnus/gmm-utils.el 2012-12-05 10:27:16 +0000
+++ b/lisp/gnus/gmm-utils.el 2012-12-06 03:30:23 +0000
@@ -417,23 +417,7 @@
(write-region start end filename append visit lockname))
(write-region start end filename append visit lockname mustbenew)))
-;; `flet' and `labels' are obsolete since Emacs 24.3.
-(defmacro gmm-flet (bindings &rest body)
- "Make temporary overriding function definitions.
-This is an analogue of a dynamically scoped `let' that operates on
-the function cell of FUNCs rather than their value cell.
-
-\(fn ((FUNC ARGLIST BODY...) ...) FORM...)"
- (require 'cl)
- (if (fboundp 'cl-letf)
- `(cl-letf ,(mapcar (lambda (binding)
- `((symbol-function ',(car binding))
- (lambda ,@(cdr binding))))
- bindings)
- ,@body)
- `(flet ,bindings ,@body)))
-(put 'gmm-flet 'lisp-indent-function 1)
-
+;; `labels' is obsolete since Emacs 24.3.
(defmacro gmm-labels (bindings &rest body)
"Make temporary function bindings.
The bindings can be recursive and the scoping is lexical, but capturing
=== modified file 'lisp/gnus/gnus-sync.el'
--- a/lisp/gnus/gnus-sync.el 2012-12-05 02:26:15 +0000
+++ b/lisp/gnus/gnus-sync.el 2012-12-06 03:30:23 +0000
@@ -88,7 +88,6 @@
(require 'gnus)
(require 'gnus-start)
(require 'gnus-util)
-(require 'gmm-utils)
(defvar gnus-topic-alist) ;; gnus-group.el
(eval-when-compile
@@ -177,16 +176,15 @@
(defun gnus-sync-lesync-call (url method headers &optional kvdata)
"Make an access request to URL using KVDATA and METHOD.
KVDATA must be an alist."
- (gmm-flet ((json-alist-p (list) (gnus-sync-json-alist-p list))) ; temp patch
- (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)))))
+ (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))))
(defun gnus-sync-lesync-PUT (url headers &optional data)
(gnus-sync-lesync-call url "PUT" headers data))
=== modified file 'lisp/gnus/message.el'
--- a/lisp/gnus/message.el 2012-12-05 10:27:16 +0000
+++ b/lisp/gnus/message.el 2012-12-06 03:30:23 +0000
@@ -8141,8 +8141,7 @@
(if (fboundp 'mail-abbrevs-setup)
(let ((minibuffer-setup-hook 'mail-abbrevs-setup)
(minibuffer-local-map message-minibuffer-local-map))
- (gmm-flet ((mail-abbrev-in-expansion-header-p nil t))
- (read-from-minibuffer prompt initial-contents)))
+ (read-from-minibuffer prompt initial-contents))
(let ((minibuffer-setup-hook 'mail-abbrev-minibuffer-setup-hook)
(minibuffer-local-map message-minibuffer-local-map))
(read-string prompt initial-contents))))
=== modified file 'lisp/mail/mailabbrev.el'
--- a/lisp/mail/mailabbrev.el 2012-09-16 23:16:15 +0000
+++ b/lisp/mail/mailabbrev.el 2012-12-06 03:30:23 +0000
@@ -472,10 +472,12 @@
(defun mail-abbrev-expand-wrapper (expand)
(if (and mail-abbrevs (not (eq mail-abbrevs t)))
- (if (mail-abbrev-in-expansion-header-p)
+ (if (or (mail-abbrev-in-expansion-header-p)
+ ;; Necessary for `message-read-from-minibuffer' to work.
+ (window-minibuffer-p))
- ;; We are in a To: (or CC:, or whatever) header, and
- ;; should use word-abbrevs to expand mail aliases.
+ ;; We are in a To: (or CC:, or whatever) header or a minibuffer,
+ ;; and should use word-abbrevs to expand mail aliases.
(let ((local-abbrev-table mail-abbrevs))
;; Before anything else, resolve aliases if they need it.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r111117: Avoid letf macro use from Gnus,
Katsumi Yamaoka <=