changeset 64735:bfabe4ff7114

Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-512 Merge from gnus--rel--5.10 Patches applied: * gnus--rel--5.10 (patch 101-102) - Update from CVS 2005-08-04 Lars Magne Ingebrigtsen <larsi@gnus.org> * lisp/gnus/gnus-art.el (article-unsplit-urls): Don't anchor urls to the start of the lines. (gnus-picon-databases): Add /usr/share/picons. 2005-08-04 Reiner Steib <Reiner.Steib@gmx.de> * lisp/gnus/gnus-art.el (gnus-button-valid-localpart-regexp): New variable taken from `gnus-button-mid-or-mail-regexp'. (gnus-button-mid-or-mail-regexp, gnus-button-alist): Use it. (gnus-button-alist): Improve regexp for domain part of the MIDs for news:localpart@domain buttons. (gnus-button-ctan-directory-regexp): Update. * lisp/gnus/message.el (message-kill-buffer): Raise the current frame. (message-bury): Use `window-dedicated-p'. 2005-08-02 Katsumi Yamaoka <yamaoka@jpl.org> * lisp/gnus/sieve-manage.el (sieve-manage-interactive-login): Use make-local-variable rather than make-variable-buffer-local. (sieve-manage-open): Ditto. (sieve-manage-authenticate): Ditto.
author Miles Bader <miles@gnu.org>
date Fri, 05 Aug 2005 08:37:44 +0000
parents 727648ddf10d
children f62cd60b99ba
files lisp/gnus/ChangeLog lisp/gnus/gnus-art.el lisp/gnus/message.el lisp/gnus/sieve-manage.el
diffstat 4 files changed, 59 insertions(+), 22 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/gnus/ChangeLog	Fri Aug 05 01:19:04 2005 +0000
+++ b/lisp/gnus/ChangeLog	Fri Aug 05 08:37:44 2005 +0000
@@ -1,5 +1,28 @@
+2005-08-04  Lars Magne Ingebrigtsen  <larsi@gnus.org>
+
+	* gnus-art.el (article-unsplit-urls): Don't anchor urls to the
+	start of the lines.
+	(gnus-picon-databases): Add /usr/share/picons.
+
+2005-08-04  Reiner Steib  <Reiner.Steib@gmx.de>
+
+	* gnus-art.el (gnus-button-valid-localpart-regexp): New variable
+	taken from `gnus-button-mid-or-mail-regexp'.
+	(gnus-button-mid-or-mail-regexp, gnus-button-alist): Use it.
+	(gnus-button-alist): Improve regexp for domain part of the MIDs
+	for news:localpart@domain buttons.
+	(gnus-button-ctan-directory-regexp): Update.
+
+	* message.el (message-kill-buffer): Raise the current frame.
+	(message-bury): Use `window-dedicated-p'.
+
 2005-08-02  Katsumi Yamaoka  <yamaoka@jpl.org>
 
+	* sieve-manage.el (sieve-manage-interactive-login): Use
+	make-local-variable rather than make-variable-buffer-local.
+	(sieve-manage-open): Ditto.
+	(sieve-manage-authenticate): Ditto.
+
 	* mml.el (mml-generate-mime-1): Make the content type default to
 	text/plain if the filename is not specified.
 
--- a/lisp/gnus/gnus-art.el	Fri Aug 05 01:19:04 2005 +0000
+++ b/lisp/gnus/gnus-art.el	Fri Aug 05 08:37:44 2005 +0000
@@ -842,7 +842,8 @@
   :type '(choice (item :tag "None" :value nil)
 		 string))
 
-(defcustom gnus-picon-databases '("/usr/lib/picon" "/usr/local/faces")
+(defcustom gnus-picon-databases '("/usr/lib/picon" "/usr/local/faces"
+				  "/usr/share/picons")
   "Defines the location of the faces database.
 For information on obtaining this database of pretty pictures, please
 see http://www.cs.indiana.edu/picons/ftp/index.html"
@@ -2428,7 +2429,7 @@
     (let ((inhibit-read-only t))
       (goto-char (point-min))
       (while (re-search-forward
-	      "^\\(\\(https?\\|ftp\\)://\\S-+\\) *\n\\(\\S-+\\)" nil t)
+	      "\\(\\(https?\\|ftp\\)://\\S-+\\) *\n\\(\\S-+\\)" nil t)
 	(replace-match "\\1\\3" t)))
     (when (interactive-p)
       (gnus-treat-article nil))))
@@ -5886,6 +5887,14 @@
   :group 'gnus-article-buttons
   :type 'regexp)
 
+;; Regexp suggested by Felix Wiemann in <87oeuomcz9.fsf@news2.ososo.de>
+(defcustom gnus-button-valid-localpart-regexp
+  "[a-z0-9$%(*-=?[_][^<>\")!;:,{}\n\t ]*"
+  "Regular expression that matches a localpart of mail addresses or MIDs."
+  :version "22.1"
+  :group 'gnus-article-buttons
+  :type 'regexp)
+
 (defcustom gnus-button-man-handler 'manual-entry
   "Function to use for displaying man pages.
 The function must take at least one argument with a string naming the
@@ -5925,12 +5934,11 @@
 		 (regexp :tag "Other")))
 
 (defcustom gnus-button-ctan-directory-regexp
-  (concat
-   "\\("; Cannot use `\(?: ... \)' (compatibility with Emacs 20).
-   "biblio\\|digests\\|dviware\\|fonts\\|graphics\\|help\\|"
-   "indexing\\|info\\|language\\|macros\\|support\\|systems\\|"
-   "tds\\|tools\\|usergrps\\|web\\|nonfree\\|obsolete"
-   "\\)")
+  (regexp-opt
+   (list "archive-tools" "biblio" "bibliography" "digests" "documentation"
+	 "dviware" "fonts" "graphics" "help" "indexing" "info" "language"
+	 "languages" "macros" "nonfree" "obsolete" "support" "systems"
+	 "tds" "tools" "usergrps" "web") t)
   "Regular expression for ctan directories.
 It should match all directories in the top level of `gnus-ctan-url'."
   :version "22.1"
@@ -5938,8 +5946,7 @@
   :type 'regexp)
 
 (defcustom gnus-button-mid-or-mail-regexp
-  (concat "\\b\\(<?[a-z0-9$%(*-=?[_][^<>\")!;:,{}\n\t ]*@"
-	  ;; Felix Wiemann in <87oeuomcz9.fsf@news2.ososo.de>
+  (concat "\\b\\(<?" gnus-button-valid-localpart-regexp "@"
 	  gnus-button-valid-fqdn-regexp
 	  ">?\\)\\b")
   "Regular expression that matches a message ID or a mail address."
@@ -6254,8 +6261,9 @@
 (defcustom gnus-button-alist
   '(("<\\(url:[>\n\t ]*?\\)?\\(nntp\\|news\\):[>\n\t ]*\\([^>\n\t ]*@[^>\n\t ]*\\)>"
      0 (>= gnus-button-message-level 0) gnus-button-handle-news 3)
-    ("\\b\\(nntp\\|news\\):\\([^>\n\t ]*@[^>)!;:,\n\t ]*\\)" 0 t
-     gnus-button-handle-news 2)
+    ((concat "\\b\\(nntp\\|news\\):\\("
+	     gnus-button-valid-localpart-regexp "@[a-z0-9.-]+[a-z]\\)")
+     0 t gnus-button-handle-news 2)
     ("\\(\\b<\\(url:[>\n\t ]*\\)?\\(nntp\\|news\\):[>\n\t ]*\\(//\\)?\\([^>\n\t ]*\\)>\\)"
      1 (>= gnus-button-message-level 0) gnus-button-fetch-group 5)
     ("\\b\\(nntp\\|news\\):\\(//\\)?\\([^'\">\n\t ]+\\)"
--- a/lisp/gnus/message.el	Fri Aug 05 01:19:04 2005 +0000
+++ b/lisp/gnus/message.el	Fri Aug 05 08:37:44 2005 +0000
@@ -3418,8 +3418,15 @@
 			  (file-exists-p auto-save-file-name))
 		     (and file-name
 			  (file-exists-p file-name)))
-	       (yes-or-no-p (format "Remove the backup file%s? "
-				    (if modified " too" ""))))
+		 (progn
+		   ;; If the message buffer has lived in a dedicated window,
+		   ;; `kill-buffer' has killed the frame.  Thus the
+		   ;; `yes-or-no-p' may show up in a lowered frame.  Make sure
+		   ;; that the user can see the question by raising the
+		   ;; current frame:
+		   (raise-frame)
+		   (yes-or-no-p (format "Remove the backup file%s? "
+					(if modified " too" "")))))
 	(ignore-errors
 	  (delete-file auto-save-file-name))
 	(let ((message-draft-article draft-article))
@@ -3430,8 +3437,7 @@
   "Bury this mail BUFFER."
   (let ((newbuf (other-buffer buffer)))
     (bury-buffer buffer)
-    (if (and (fboundp 'frame-parameters)
-	     (cdr (assq 'dedicated (frame-parameters)))
+    (if (and (window-dedicated-p (selected-window))
 	     (not (null (delq (selected-frame) (visible-frame-list)))))
 	(delete-frame (selected-frame))
       (switch-to-buffer newbuf))))
--- a/lisp/gnus/sieve-manage.el	Fri Aug 05 01:19:04 2005 +0000
+++ b/lisp/gnus/sieve-manage.el	Fri Aug 05 08:37:44 2005 +0000
@@ -1,5 +1,5 @@
 ;;; sieve-manage.el --- Implementation of the managesive protocol in elisp
-;; Copyright (C) 2001, 2003 Free Software Foundation, Inc.
+;; Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
 
 ;; Author: Simon Josefsson <simon@josefsson.org>
 
@@ -184,8 +184,8 @@
 it where sucessful authenticating itself to the server, nil otherwise.
 Returns t if login was successful, nil otherwise."
   (with-current-buffer buffer
-    (make-variable-buffer-local 'sieve-manage-username)
-    (make-variable-buffer-local 'sieve-manage-password)
+    (make-local-variable 'sieve-manage-username)
+    (make-local-variable 'sieve-manage-password)
     (let (user passwd ret reason)
       ;;      (condition-case ()
       (while (or (not user) (not passwd))
@@ -370,7 +370,7 @@
 to work in."
   (setq buffer (or buffer (format " *sieve* %s:%d" server (or port 2000))))
   (with-current-buffer (get-buffer-create buffer)
-    (mapcar 'make-variable-buffer-local sieve-manage-local-variables)
+    (mapcar 'make-local-variable sieve-manage-local-variables)
     (sieve-manage-disable-multibyte)
     (buffer-disable-undo)
     (setq sieve-manage-server (or server sieve-manage-server))
@@ -458,8 +458,8 @@
   (with-current-buffer (or buffer (current-buffer))
     (if (not (eq sieve-manage-state 'nonauth))
 	(eq sieve-manage-state 'auth)
-      (make-variable-buffer-local 'sieve-manage-username)
-      (make-variable-buffer-local 'sieve-manage-password)
+      (make-local-variable 'sieve-manage-username)
+      (make-local-variable 'sieve-manage-password)
       (if user (setq sieve-manage-username user))
       (if passwd (setq sieve-manage-password passwd))
       (if (funcall (nth 2 (assq sieve-manage-auth