summaryrefslogtreecommitdiff
path: root/lisp/gnus
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/gnus')
-rw-r--r--lisp/gnus/ChangeLog21
-rw-r--r--lisp/gnus/gnus-registry.el15
-rw-r--r--lisp/gnus/gnus-sum.el8
-rw-r--r--lisp/gnus/shr.el32
4 files changed, 58 insertions, 18 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index dcbc647950f..4cf21f65597 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,24 @@
+2011-05-31 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * shr.el (shr-rescale-image): Add an :ascent of 100 to images so that
+ the underline comes at the bottom.
+
+2011-05-31 Teodor Zlatanov <tzz@lifelogs.com>
+
+ * gnus-registry.el (gnus-registry-article-marks-to-chars): Rename from
+ `gnus-registry-user-format-function-M' and declare the latter obsolete.
+ (gnus-registry-article-marks-to-names): Rename from
+ `gnus-registry-user-format-function-M2'.
+
+2011-05-31 Katsumi Yamaoka <yamaoka@jpl.org>
+
+ * gnus-sum.el (gnus-summary-exit): Make sure to kill article buffer in
+ ephemeral group.
+
+2011-05-31 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * shr.el (shr-browse-image): Copy the URL if called interactively.
+
2011-05-30 Lars Magne Ingebrigtsen <larsi@gnus.org>
* gnus-group.el (gnus-group-mark-article-read): It's possible that we
diff --git a/lisp/gnus/gnus-registry.el b/lisp/gnus/gnus-registry.el
index e0efbaf4f30..f6c0daaaa93 100644
--- a/lisp/gnus/gnus-registry.el
+++ b/lisp/gnus/gnus-registry.el
@@ -62,10 +62,10 @@
;; show the marks as single characters (see the :char property in
;; `gnus-registry-marks'):
-;; (defalias 'gnus-user-format-function-M 'gnus-registry-user-format-function-M)
+;; (defalias 'gnus-user-format-function-M 'gnus-registry-article-marks-to-chars)
;; show the marks by name (see `gnus-registry-marks'):
-;; (defalias 'gnus-user-format-function-M 'gnus-registry-user-format-function-M2)
+;; (defalias 'gnus-user-format-function-M 'gnus-registry-article-marks-to-names)
;; TODO:
@@ -897,9 +897,12 @@ Uses `gnus-registry-marks' to find what shortcuts to install."
nil
(cons "Registry Marks" gnus-registry-misc-menus))))))
+(make-obsolete 'gnus-registry-user-format-function-M
+ 'gnus-registry-article-marks-to-chars "24.1") ?
+
;; use like this:
-;; (defalias 'gnus-user-format-function-M 'gnus-registry-user-format-function-M)
-(defun gnus-registry-user-format-function-M (headers)
+;; (defalias 'gnus-user-format-function-M 'gnus-registry-article-marks-to-chars)
+(defun gnus-registry-article-marks-to-chars (headers)
"Show the marks for an article by the :char property"
(let* ((id (mail-header-message-id headers))
(marks (when id (gnus-registry-get-id-key id 'mark))))
@@ -911,8 +914,8 @@ Uses `gnus-registry-marks' to find what shortcuts to install."
marks "")))
;; use like this:
-;; (defalias 'gnus-user-format-function-M 'gnus-registry-user-format-function-M2)
-(defun gnus-registry-user-format-function-M2 (headers)
+;; (defalias 'gnus-user-format-function-M 'gnus-registry-article-marks-to-names)
+(defun gnus-registry-article-marks-to-names (headers)
"Show the marks for an article by name"
(let* ((id (mail-header-message-id headers))
(marks (when id (gnus-registry-get-id-key id 'mark))))
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el
index 2d75c35158a..1c4382b24a6 100644
--- a/lisp/gnus/gnus-sum.el
+++ b/lisp/gnus/gnus-sum.el
@@ -7194,7 +7194,11 @@ If FORCE (the prefix), also save the .newsrc file(s)."
(article-buffer gnus-article-buffer)
(mode major-mode)
(group-point nil)
- (buf (current-buffer)))
+ (buf (current-buffer))
+ ;; `gnus-single-article-buffer' is nil buffer-locally in
+ ;; ephemeral group of which summary buffer will be killed,
+ ;; but the global value may be non-nil.
+ (single-article-buffer gnus-single-article-buffer))
(unless quit-config
;; Do adaptive scoring, and possibly save score files.
(when gnus-newsgroup-adaptive
@@ -7257,7 +7261,7 @@ If FORCE (the prefix), also save the .newsrc file(s)."
(gnus-configure-windows 'group 'force)))
;; If we have several article buffers, we kill them at exit.
- (unless gnus-single-article-buffer
+ (unless single-article-buffer
(when (gnus-buffer-live-p article-buffer)
(with-current-buffer article-buffer
;; Don't kill sticky article buffers
diff --git a/lisp/gnus/shr.el b/lisp/gnus/shr.el
index ebd854930df..67effc07ee2 100644
--- a/lisp/gnus/shr.el
+++ b/lisp/gnus/shr.el
@@ -183,14 +183,23 @@ redirects somewhere else."
(message "No image under point")
(message "%s" text))))
-(defun shr-browse-image ()
- "Browse the image under point."
- (interactive)
+(defun shr-browse-image (&optional copy-url)
+ "Browse the image under point.
+If COPY-URL (the prefix if called interactively) is non-nil, copy
+the URL of the image to the kill buffer instead."
+ (interactive "P")
(let ((url (get-text-property (point) 'image-url)))
- (if (not url)
- (message "No image under point")
+ (cond
+ ((not url)
+ (message "No image under point"))
+ (copy-url
+ (with-temp-buffer
+ (insert url)
+ (copy-region-as-kill (point-min) (point-max))
+ (message "Copied %s" url)))
+ (t
(message "Browsing %s..." url)
- (browse-url url))))
+ (browse-url url)))))
(defun shr-insert-image ()
"Insert the image under point into the buffer."
@@ -524,8 +533,9 @@ redirects somewhere else."
(defun shr-rescale-image (data)
(if (or (not (fboundp 'imagemagick-types))
(not (get-buffer-window (current-buffer))))
- (create-image data nil t)
- (let* ((image (create-image data nil t))
+ (create-image data nil t
+ :ascent 100)
+ (let* ((image (create-image data nil t :ascent 100))
(size (image-size image t))
(width (car size))
(height (cdr size))
@@ -544,11 +554,13 @@ redirects somewhere else."
(when (> (car size) window-width)
(setq image (or
(create-image data 'imagemagick t
- :width window-width)
+ :width window-width
+ :ascent 100)
image)))
(when (and (fboundp 'create-animated-image)
(eq (image-type data nil t) 'gif))
- (setq image (create-animated-image data 'gif t)))
+ (setq image (create-animated-image data 'gif t
+ :ascent 100)))
image)))
;; url-cache-extract autoloads url-cache.