diff lisp/gnus/gnus.el @ 163:0132846995bd r20-3b8

Import from CVS: tag r20-3b8
author cvs
date Mon, 13 Aug 2007 09:43:35 +0200
parents 43dd3413c7c7
children 85ec50267440
line wrap: on
line diff
--- a/lisp/gnus/gnus.el	Mon Aug 13 09:42:28 2007 +0200
+++ b/lisp/gnus/gnus.el	Mon Aug 13 09:43:35 2007 +0200
@@ -226,7 +226,7 @@
   :link '(custom-manual "(gnus)Exiting Gnus")
   :group 'gnus)
 
-(defconst gnus-version-number "5.4.56"
+(defconst gnus-version-number "5.4.59"
   "Version number for this version of Gnus.")
 
 (defconst gnus-version (format "Gnus v%s" gnus-version-number)
@@ -647,12 +647,13 @@
   (save-excursion
     (save-restriction
       (narrow-to-region start end)
-      (indent-rigidly start end arg)
-      ;; We translate tabs into spaces -- not everybody uses
-      ;; an 8-character tab.
-      (goto-char (point-min))
-      (while (search-forward "\t" nil t)
-	(replace-match "        " t t)))))
+      (let ((tab-width 8))
+	(indent-rigidly start end arg)
+	;; We translate tabs into spaces -- not everybody uses
+	;; an 8-character tab.
+	(goto-char (point-min))
+	(while (search-forward "\t" nil t)
+	  (replace-match "        " t t))))))
 
 (defvar gnus-simple-splash nil)
 
@@ -1907,6 +1908,20 @@
 ;;; Gnus Utility Functions
 ;;;
 
+(defmacro gnus-string-or (&rest strings)
+  "Return the first element of STRINGS that is a non-blank string.
+STRINGS will be evaluated in normal `or' order."
+  `(gnus-string-or-1 ',strings))
+
+(defun gnus-string-or-1 (strings)
+  (let (string)
+    (while strings
+      (setq string (eval (pop strings)))
+      (if (string-match "^[ \t]*$" string)
+	  (setq string nil)
+	(setq strings nil)))
+    string))
+
 ;; Add the current buffer to the list of buffers to be killed on exit.
 (defun gnus-add-current-to-buffer-list ()
   (or (memq (current-buffer) gnus-buffer-list)