+2006-04-17 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * gnus-art.el (gnus-article-treat-types): Add text/x-patch.
+ (gnus-button-alist): Recognize more diff formats.
+ (gnus-button-patch): Strip directory.
+
2006-04-17 Reiner Steib <reinersteib+from-uce@imap.cc>
* gnus-util.el (gnus-select-frame-set-input-focus): Check for
'(choice (const :tag "Off" nil)
(const :tag "Header" head)))
-(defvar gnus-article-treat-types '("text/plain" "text/x-verbatim")
+(defvar gnus-article-treat-types '("text/plain" "text/x-verbatim"
+ "text/x-patch")
"Parts to treat.")
(defvar gnus-inhibit-treatment nil
;; Recognizing patches to .el files. This is somewhat obscure,
;; but considering the percentage of Gnus users who hack Emacs
;; Lisp files...
- ("^--- \\([-a-z0-9]+\\.el\\).*\n.*\n@@ -?\\([0-9]+\\)" 1
+ ("^--- \\([^ .]+\\.el\\).*\n.*\n@@ -?\\([0-9]+\\)" 1
+ (>= gnus-button-message-level 4) gnus-button-patch 1 2)
+ ("^\\*\\*\\* \\([^ .]+\\.el\\).*\n.*\n\\*+\n\\*\\*\\* \\([0-9]+\\)" 1
(>= gnus-button-message-level 4) gnus-button-patch 1 2)
;; MID or mail: To avoid too many false positives we don't try to catch
;; all kind of allowed MIDs or mail addresses. Domain part must contain
(defun gnus-button-patch (library line)
"Visit an Emacs Lisp library LIBRARY on line LINE."
(interactive)
- (let ((file (locate-library library)))
+ (let ((file (locate-library (file-name-nondirectory library))))
(unless file
(error "Couldn't find library %s" library))
(find-file file)