[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r101251: * lisp/gnus/gnus-html.el: Re
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r101251: * lisp/gnus/gnus-html.el: Require pkgs that define macros used in this file. |
Date: |
Tue, 31 Aug 2010 21:47:35 +0200 |
User-agent: |
Bazaar (2.0.3) |
------------------------------------------------------------
revno: 101251
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Tue 2010-08-31 21:47:35 +0200
message:
* lisp/gnus/gnus-html.el: Require pkgs that define macros used in this file.
(gnus-article-mouse-face): Declare to silence byte-compiler.
(gnus-html-curl-sentinel): Use with-current-buffer, inhibit-read-only, and
process-get.
(gnus-html-put-image): Use plist-get to avoid getf.
(gnus-html-prefetch-images): Use with-current-buffer.
modified:
lisp/gnus/ChangeLog
lisp/gnus/gnus-html.el
=== modified file 'lisp/gnus/ChangeLog'
--- a/lisp/gnus/ChangeLog 2010-08-31 13:28:02 +0000
+++ b/lisp/gnus/ChangeLog 2010-08-31 19:47:35 +0000
@@ -1,3 +1,12 @@
+2010-08-31 Stefan Monnier <address@hidden>
+
+ * gnus-html.el: Require packages that define macros used in this file.
+ (gnus-article-mouse-face): Declare to silence byte-compiler.
+ (gnus-html-curl-sentinel): Use with-current-buffer, inhibit-read-only,
and
+ process-get.
+ (gnus-html-put-image): Use plist-get to avoid getf.
+ (gnus-html-prefetch-images): Use with-current-buffer.
+
2010-08-31 Katsumi Yamaoka <address@hidden>
* gnus-sum.el (gnus-summary-stop-at-end-of-message)
=== modified file 'lisp/gnus/gnus-html.el'
--- a/lisp/gnus/gnus-html.el 2010-08-31 13:28:02 +0000
+++ b/lisp/gnus/gnus-html.el 2010-08-31 19:47:35 +0000
@@ -28,6 +28,8 @@
;;; Code:
+(eval-when-compile (require 'cl))
+(eval-when-compile (require 'mm-decode))
(require 'mm-url)
(defcustom gnus-html-cache-directory (nnheader-concat gnus-directory
"html-cache/")
@@ -71,6 +73,8 @@
"-T" "text/html"))))
(gnus-html-wash-tags))))
+(defvar gnus-article-mouse-face)
+
(defun gnus-html-wash-tags ()
(let (tag parameters string start end images url)
(mm-url-decode-entities)
@@ -162,19 +166,18 @@
(defun gnus-html-curl-sentinel (process event)
(when (string-match "finished" event)
- (let* ((images (getf (process-plist process) 'images))
- (buffer (getf (process-plist process) 'buffer))
+ (let* ((images (process-get process 'images))
+ (buffer (process-get process 'buffer))
(spec (pop images))
(file (gnus-html-image-id (car spec))))
(when (and (buffer-live-p buffer)
;; If the position of the marker is 1, then that
- ;; means that the text is was in has been deleted;
+ ;; means that the text it was in has been deleted;
;; i.e., that the user has selected a different
;; article before the image arrived.
- (not (= (marker-position (cadr spec)) 1)))
- (save-excursion
- (set-buffer buffer)
- (let ((buffer-read-only nil))
+ (not (= (marker-position (cadr spec)) (point-min))))
+ (with-current-buffer buffer
+ (let ((inhibit-read-only t))
(when (gnus-html-put-image file (cadr spec))
(delete-region (1+ (cadr spec)) (caddr spec))))))
(when images
@@ -190,7 +193,7 @@
;; Kludge to avoid displaying 30x30 gif images, which
;; seems to be a signal of a broken image.
(not (and (listp image)
- (eq (getf (cdr image) :type) 'gif)
+ (eq (plist-get (cdr image) :type) 'gif)
(= (car (image-size image t)) 30)
(= (cdr (image-size image t)) 30))))
(progn
@@ -223,8 +226,7 @@
(defun gnus-html-prefetch-images (summary)
(let (safe-url-regexp urls)
(when (buffer-live-p summary)
- (save-excursion
- (set-buffer summary)
+ (with-current-buffer summary
(setq safe-url-regexp mm-w3m-safe-url-regexp))
(save-match-data
(while (re-search-forward "<img.*src=[\"']\\([^\"']+\\)" nil t)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r101251: * lisp/gnus/gnus-html.el: Require pkgs that define macros used in this file.,
Stefan Monnier <=