signatures, but will never scroll down to show you a page consisting
only of boring text. Boring text is controlled by
`gnus-article-boring-faces'."
+ :version "21.4"
:type 'boolean
:group 'gnus-article-hiding)
longer (in lines) than that number. If it is a function, the function
will be called without any parameters, and if it returns nil, there is
no signature in the buffer. If it is a string, it will be used as a
-regexp. If it matches, the text in question is not a signature."
+regexp. If it matches, the text in question is not a signature.
+
+This can also be a list of the above values."
:type '(choice (integer :value 200)
(number :value 4.0)
(function :value fun)
(gnus-image-type-available-p 'pbm))
'gnus-display-x-face-in-from
"{ echo '/* Width=48, Height=48 */'; uncompface; } | icontopbm | ee -"))
- ((and (fboundp 'image-type-available-p)
- (module-installed-p 'x-face-e21))
- 'x-face-decode-message-header)
((gnus-image-type-available-p 'pbm)
'gnus-display-x-face-in-from)
((and window-system
If it is a string, the command will be executed in a sub-shell
asynchronously. The compressed face will be piped to this command."
:type `(choice
- ,@(let (x-face-e21 x-face-mule)
- (if (featurep 'xemacs)
- nil
- (setq x-face-e21 (module-installed-p 'x-face-e21)
- x-face-mule (module-installed-p 'x-face-mule)))
+ ,@(let ((x-face-mule (if (featurep 'xemacs)
+ nil
+ (module-installed-p 'x-face-mule))))
(delq nil
(list
'string
(if (or (gnus-image-type-available-p 'xface)
(gnus-image-type-available-p 'pbm))
'(function-item gnus-display-x-face-in-from))
- (if (and x-face-e21
- (fboundp 'image-type-available-p))
- '(function-item
- :tag "x-face-decode-message-header (x-face-e21)"
- x-face-decode-message-header))
(if x-face-mule
'(function-item
x-face-mule-gnus-article-display-x-face))
(format format (car spec) (car (cdr spec)))
2 3 (intern (format "gnus-emphasis-%s" (nth 2 spec)))))
types)
- ("\\(\\s-\\|^\\)\\(-\\(\\(\\w\\|-[^-]\\)+\\)-\\)\\(\\s-\\|[?!.,;]\\)"
- 2 3 gnus-emphasis-strikethru)
("\\(\\s-\\|^\\)\\(_\\(\\(\\w\\|_[^_]\\)+\\)_\\)\\(\\s-\\|[?!.,;]\\)"
2 3 gnus-emphasis-underline)))
"*Alist that says how to fontify certain phrases.
"Face used for displaying highlighted words."
:group 'gnus-article-emphasis)
-(defcustom gnus-article-time-format "%a, %b %d %Y %T %Z"
+(defcustom gnus-article-time-format "%a, %d %b %Y %T %Z"
"Format for display of Date headers in article bodies.
See `format-time-string' for the possible values.
The variable can also be function, which should return a complete Date
header. The function is called with one argument, the time, which can
be fed to `format-time-string'."
- :type '(choice string symbol)
+ :type '(choice string function)
:link '(custom-manual "(gnus)Article Date")
:group 'gnus-article-washing)
To see e.g. security buttons you could set this to
`(\"multipart/signed\")'.
This variable is only used when `gnus-inhibit-mime-unbuttonizing' is nil."
- :version "21.1"
+ :version "21.4"
:group 'gnus-article-mime
:type '(repeat regexp))
When nil (the default value), then some MIME parts do not get buttons,
as described by the variables `gnus-buttonized-mime-types' and
`gnus-unbuttonized-mime-types'."
- :version "21.3"
+ :version "21.4"
:group 'gnus-article-mime
:type 'boolean)
"String used to delimit header and body.
This variable is used by `gnus-article-treat-body-boundary' which can
be controlled by `gnus-treat-body-boundary'."
+ :version "21.4"
:group 'gnus-article-various
: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"
+ :version "21.4"
:type '(repeat directory)
:link '(url-link :tag "download"
"http://www.cs.indiana.edu/picons/ftp/index.html")
"Remove carriage returns.
Valid values are nil, t, `head', `last', an integer or a predicate.
See Info node `(gnus)Customizing Articles' for details."
+ :version "21.4"
:group 'gnus-article-treat
:link '(custom-manual "(gnus)Customizing Articles")
:type gnus-article-treat-custom)
"Remove leading whitespace in headers.
Valid values are nil, t, `head', `last', an integer or a predicate.
See Info node `(gnus)Customizing Articles' for details."
+ :version "21.4"
:group 'gnus-article-treat
:link '(custom-manual "(gnus)Customizing Articles")
:type gnus-article-treat-custom)
"Display the Date in a format that can be read aloud in English.
Valid values are nil, t, `head', `last', an integer or a predicate.
See Info node `(gnus)Customizing Articles' for details."
+ :version "21.4"
:group 'gnus-article-treat
:link '(custom-manual "(gnus)Customizing Articles")
:type gnus-article-treat-head-custom)
"Fold headers.
Valid values are nil, t, `head', `last', an integer or a predicate.
See Info node `(gnus)Customizing Articles' for details."
+ :version "21.4"
:group 'gnus-article-treat
:link '(custom-manual "(gnus)Customizing Articles")
:type gnus-article-treat-custom)
"Fold the Newsgroups and Followup-To headers.
Valid values are nil, t, `head', `last', an integer or a predicate.
See Info node `(gnus)Customizing Articles' for details."
+ :version "21.4"
:group 'gnus-article-treat
:link '(custom-manual "(gnus)Customizing Articles")
:type gnus-article-treat-custom)
(defcustom gnus-treat-display-x-face
(and (not noninteractive)
- (or (memq gnus-article-x-face-command
- '(x-face-decode-message-header
- x-face-mule-gnus-article-display-x-face))
+ (or (eq gnus-article-x-face-command
+ 'x-face-mule-gnus-article-display-x-face)
(and (fboundp 'image-type-available-p)
(image-type-available-p 'xbm)
(string-match "^0x" (shell-command-to-string "uncompface"))
(defcustom gnus-treat-display-face
(and (not noninteractive)
- ;; x-face-e21 handles both X-Face and Face headers.
- (not (and (eq gnus-article-x-face-command 'x-face-decode-message-header)
- (module-installed-p 'x-face-e21)))
(or (and (fboundp 'image-type-available-p)
(image-type-available-p 'png))
(and (featurep 'xemacs)
See Info node `(gnus)Customizing Articles' and Info node
`(gnus)X-Face' for details."
:group 'gnus-article-treat
- :version "21.1"
+ :version "21.4"
:link '(custom-manual "(gnus)Customizing Articles")
:link '(custom-manual "(gnus)X-Face")
:type gnus-article-treat-head-custom)
Valid values are nil, t, `head', `last', an integer or a predicate.
See Info node `(gnus)Customizing Articles' and Info node
`(gnus)Picons' for details."
+ :version "21.4"
:group 'gnus-article-treat
:group 'gnus-picon
:link '(custom-manual "(gnus)Customizing Articles")
(put 'gnus-treat-newsgroups-picon 'highlight t)
(defcustom gnus-treat-body-boundary
- (if (or gnus-treat-newsgroups-picon
- gnus-treat-mail-picon
- gnus-treat-from-picon)
+ (if (and (eq window-system 'x)
+ (or gnus-treat-newsgroups-picon
+ gnus-treat-mail-picon
+ gnus-treat-from-picon))
'head nil)
"Draw a boundary at the end of the headers.
Valid values are nil and `head'.
See Info node `(gnus)Customizing Articles' for details."
- :version "21.1"
+ :version "21.4"
:group 'gnus-article-treat
:link '(custom-manual "(gnus)Customizing Articles")
:type gnus-article-treat-head-custom)
"Format as HTML.
Valid values are nil, t, `head', `last', an integer or a predicate.
See Info node `(gnus)Customizing Articles' for details."
+ :version "21.4"
:group 'gnus-article-treat
:link '(custom-manual "(gnus)Customizing Articles")
:type gnus-article-treat-custom)
(defcustom gnus-article-encrypt-protocol "PGP"
"The protocol used for encrypt articles.
It is a string, such as \"PGP\". If nil, ask user."
+ :version "21.4"
:type 'string
:group 'mime-security)
(executable-find idna-program))
"Whether IDNA decoding of headers is used when viewing messages.
This requires GNU Libidn, and by default only enabled if it is found."
+ :version "21.4"
:group 'gnus-article-headers
:type 'boolean)
(defcustom gnus-article-over-scroll nil
"If non-nil, allow scrolling the article buffer even when there no more text."
+ :version "21.4"
:group 'gnus-article
:type 'boolean)
`(save-excursion
(set-buffer gnus-article-buffer)
(save-restriction
- (let ((buffer-read-only nil)
+ (let ((inhibit-read-only t)
(inhibit-point-motion-hooks t)
(case-fold-search t))
(article-narrow-to-head)
(defmacro gnus-with-article-buffer (&rest forms)
`(save-excursion
(set-buffer gnus-article-buffer)
- (let ((buffer-read-only nil))
+ (let ((inhibit-read-only t))
,@forms)))
(put 'gnus-with-article-buffer 'lisp-indent-function 0)
(when (eq 1 (point-min))
(set-window-start (get-buffer-window (current-buffer)) 1)))
(unless gnus-inhibit-hiding
- (save-excursion
- (save-restriction
- (let ((inhibit-read-only t)
- (case-fold-search t)
- (max (1+ (length gnus-sorted-header-list)))
- (ignored (when (not gnus-visible-headers)
- (cond ((stringp gnus-ignored-headers)
- gnus-ignored-headers)
- ((listp gnus-ignored-headers)
- (mapconcat 'identity gnus-ignored-headers
- "\\|")))))
- (visible
- (cond ((stringp gnus-visible-headers)
- gnus-visible-headers)
- ((and gnus-visible-headers
- (listp gnus-visible-headers))
- (mapconcat 'identity gnus-visible-headers "\\|"))))
- (inhibit-point-motion-hooks t)
- beg)
+ (let ((inhibit-read-only t)
+ (case-fold-search t)
+ (max (1+ (length gnus-sorted-header-list)))
+ (inhibit-point-motion-hooks t)
+ (cur (current-buffer))
+ ignored visible beg)
+ (save-excursion
+ ;; `gnus-ignored-headers' and `gnus-visible-headers' may be
+ ;; group parameters, so we should go to the summary buffer.
+ (when (prog1
+ (condition-case nil
+ (progn (set-buffer gnus-summary-buffer) t)
+ (error nil))
+ (setq ignored (when (not gnus-visible-headers)
+ (cond ((stringp gnus-ignored-headers)
+ gnus-ignored-headers)
+ ((listp gnus-ignored-headers)
+ (mapconcat 'identity
+ gnus-ignored-headers
+ "\\|"))))
+ visible (cond ((stringp gnus-visible-headers)
+ gnus-visible-headers)
+ ((and gnus-visible-headers
+ (listp gnus-visible-headers))
+ (mapconcat 'identity
+ gnus-visible-headers
+ "\\|")))))
+ (set-buffer cur))
+ (save-restriction
;; First we narrow to just the headers.
(article-narrow-to-head)
;; Hide any "From " lines at the beginning of (mail) articles.
(not gnus-show-all-headers))
(save-excursion
(save-restriction
- (let ((buffer-read-only nil)
- (list gnus-boring-article-headers)
- (inhibit-point-motion-hooks t)
- elem)
+ (let ((inhibit-read-only t)
+ (inhibit-point-motion-hooks t))
(article-narrow-to-head)
- (while list
- (setq elem (pop list))
+ (dolist (elem gnus-boring-article-headers)
(goto-char (point-min))
(cond
;; Hide empty headers.
(defun article-normalize-headers ()
"Make all header lines 40 characters long."
(interactive)
- (let ((buffer-read-only nil)
+ (let ((inhibit-read-only t)
column)
(save-excursion
(save-restriction
characters to translate to."
(save-excursion
(when (article-goto-body)
- (let ((buffer-read-only nil)
+ (let ((inhibit-read-only t)
(x (make-string 225 ?x))
(i -1))
(while (< (incf i) (length x))
MAP is an alist where the elements are on the form (\"from\" \"to\")."
(save-excursion
(when (article-goto-body)
- (let ((buffer-read-only nil)
- elem)
- (while (setq elem (pop map))
+ (let ((inhibit-read-only t))
+ (dolist (elem map)
(save-excursion
(while (search-forward (car elem) nil t)
(replace-match (cadr elem)))))))))
(interactive)
(save-excursion
(when (article-goto-body)
- (let ((buffer-read-only nil))
+ (let ((inhibit-read-only t))
(while (search-forward "\b" nil t)
(let ((next (char-after))
start end previous)
(interactive)
(save-excursion
(when (article-goto-body)
- (let ((buffer-read-only nil))
+ (let ((inhibit-read-only t))
(ansi-color-apply-on-region (point) (point-max))))))
(defun gnus-article-treat-unfold-headers ()
"Fill lines that are wider than the window width."
(interactive)
(save-excursion
- (let ((buffer-read-only nil)
+ (let ((inhibit-read-only t)
(width (window-width (get-buffer-window (current-buffer)))))
(save-restriction
(article-goto-body)
"Capitalize the first word in each sentence."
(interactive)
(save-excursion
- (let ((buffer-read-only nil)
+ (let ((inhibit-read-only t)
(paragraph-start "^[\n\^L]"))
(article-goto-body)
(while (not (eobp))
"Remove trailing CRs and then translate remaining CRs into LFs."
(interactive)
(save-excursion
- (let ((buffer-read-only nil))
+ (let ((inhibit-read-only t))
(goto-char (point-min))
(while (re-search-forward "\r+$" nil t)
(replace-match "" t t))
"Remove all trailing blank lines from the article."
(interactive)
(save-excursion
- (let ((buffer-read-only nil))
+ (let ((inhibit-read-only t))
(goto-char (point-max))
(delete-region
(point)
(mail-narrow-to-head)
(while (gnus-article-goto-header "Face")
(setq faces (nconc faces (list (mail-header-field-value)))))))
- (while (setq face (pop faces))
+ (dolist (face faces)
(let ((png (gnus-convert-face-to-png face))
image)
(when png
If PROMPT (the prefix), prompt for a coding system to use."
(interactive "P")
(let ((inhibit-point-motion-hooks t) (case-fold-search t)
- buffer-read-only
+ (inhibit-read-only t)
(mail-parse-charset gnus-newsgroup-charset)
(mail-parse-ignored-charsets
(save-excursion (condition-case nil
(defun article-decode-encoded-words ()
"Remove encoded-word encoding from headers."
- (let (buffer-read-only)
- (let ((charset (save-excursion
- (set-buffer gnus-summary-buffer)
- default-mime-charset)))
- (mime-decode-header-in-buffer charset))))
+ (let ((charset (save-excursion
+ (set-buffer gnus-summary-buffer)
+ default-mime-charset))
+ (inhibit-read-only t))
+ (mime-decode-header-in-buffer charset)))
(defun article-decode-group-name ()
"Decode group names in `Newsgroups:'."
(let ((inhibit-point-motion-hooks t)
- buffer-read-only
+ (inhibit-read-only t)
(method (gnus-find-method-for-group gnus-newsgroup-name)))
(when (and (or gnus-group-name-charset-method-alist
gnus-group-name-charset-group-alist)
(when gnus-use-idna
(save-restriction
(let ((inhibit-point-motion-hooks t)
- buffer-read-only)
+ (inhibit-read-only t))
(article-narrow-to-head)
(goto-char (point-min))
- (while (re-search-forward "\\(xn--[-A-Za-z0-9.]*\\)[ \t\n\r,>]" nil t)
+ (while (re-search-forward "@.*\\(xn--[-A-Za-z0-9.]*\\)[ \t\n\r,>]" nil t)
(let (ace unicode)
(when (save-match-data
(and (setq ace (match-string 1))
(save-excursion
(and (re-search-backward "^[^ \t]" nil t)
(looking-at "From\\|To\\|Cc")))
- (save-excursion (backward-char)
- (message-idna-inside-rhs-p))
(setq unicode (idna-to-unicode ace))))
(unless (string= ace unicode)
(replace-match unicode nil nil nil 1)))))))))
If READ-CHARSET, ask for a coding system."
(interactive (list 'force current-prefix-arg))
(save-excursion
- (let ((buffer-read-only nil) type charset)
+ (let ((inhibit-read-only t) type charset)
(if (gnus-buffer-live-p gnus-original-article-buffer)
(with-current-buffer gnus-original-article-buffer
(setq type
If READ-CHARSET, ask for a coding system."
(interactive (list 'force current-prefix-arg))
(save-excursion
- (let ((buffer-read-only nil) type charset)
+ (let ((inhibit-read-only t) type charset)
(if (gnus-buffer-live-p gnus-original-article-buffer)
(with-current-buffer gnus-original-article-buffer
(setq type
(interactive)
(require 'rfc1843)
(save-excursion
- (let ((buffer-read-only nil))
+ (let ((inhibit-read-only t))
(rfc1843-decode-region (point-min) (point-max)))))
(defun article-unsplit-urls ()
"Remove the newlines that some other mailers insert into URLs."
(interactive)
(save-excursion
- (let ((buffer-read-only nil))
+ (let ((inhibit-read-only t))
(goto-char (point-min))
(while (re-search-forward
"^\\(\\(https?\\|ftp\\)://\\S-+\\) *\n\\(\\S-+\\)" nil t)
If READ-CHARSET, ask for a coding system."
(interactive "P")
(save-excursion
- (let ((buffer-read-only nil)
+ (let ((inhibit-read-only t)
charset)
(when (gnus-buffer-live-p gnus-original-article-buffer)
(with-current-buffer gnus-original-article-buffer
(regexp (if (consp gnus-list-identifiers)
(mapconcat 'identity gnus-list-identifiers " *\\|")
gnus-list-identifiers))
- buffer-read-only)
+ (inhibit-read-only t))
(when regexp
(save-excursion
(save-restriction
(interactive (gnus-article-hidden-arg))
(unless (gnus-article-check-hidden-text 'pem arg)
(save-excursion
- (let (buffer-read-only end)
+ (let ((inhibit-read-only t) end)
(goto-char (point-min))
;; Hide the horrendously ugly "header".
(when (and (search-forward
(save-restriction
(let ((inhibit-point-motion-hooks t)
(gnus-signature-limit nil)
- buffer-read-only)
+ (inhibit-read-only t))
(article-goto-body)
(cond
((eq banner 'signature)
(article-goto-body))
(goto-char (point-min)))
(unless (gnus-article-check-hidden-text 'signature arg)
- (let ((buffer-read-only nil)
+ (let ((inhibit-read-only t)
(button (point)))
(while (setq button (text-property-any button (point-max)
'gnus-callback
(interactive)
(save-excursion
(let ((inhibit-point-motion-hooks t)
- buffer-read-only)
+ (inhibit-read-only t))
(when (article-goto-body)
(while (and (not (eobp))
(looking-at "[ \t]*$"))
(interactive)
(save-excursion
(let ((inhibit-point-motion-hooks t)
- buffer-read-only)
+ (inhibit-read-only t))
;; First make all blank lines empty.
(article-goto-body)
(while (re-search-forward "^[ \t]+$" nil t)
(interactive)
(save-excursion
(let ((inhibit-point-motion-hooks t)
- buffer-read-only)
+ (inhibit-read-only t))
(article-goto-body)
(while (re-search-forward "^[ \t]+" nil t)
(replace-match "" t t)))))
(interactive)
(save-excursion
(let ((inhibit-point-motion-hooks t)
- buffer-read-only)
+ (inhibit-read-only t))
(article-goto-body)
(while (re-search-forward "[ \t]+$" nil t)
(replace-match "" t t)))))
(interactive)
(save-excursion
(let ((inhibit-point-motion-hooks t)
- buffer-read-only)
+ (inhibit-read-only t))
(article-goto-body)
(while (re-search-forward "^[ \t]*\n" nil t)
(replace-match "" t t)))))
(defun gnus-article-show-hidden-text (type &optional dummy)
"Show all hidden text of type TYPE.
Originally it is hide instead of DUMMY."
- (let ((buffer-read-only nil)
+ (let ((inhibit-read-only t)
(inhibit-point-motion-hooks t))
(gnus-remove-text-properties-when
'article-type type
date)
eface (get-text-property (1- (point-at-eol))
'face)))
- (let ((buffer-read-only nil))
+ (let ((inhibit-read-only t))
;; Delete any old X-Sent headers.
(when (setq date-pos
(text-property-any (point-min) (point-max)
(forward-line -1)
;; Do highlighting.
(when (looking-at "\\([^:]+\\): *\\(.*\\)$")
- (put-text-property (match-beginning 1) (1+ (match-end 1))
- 'original-date date)
- (put-text-property (match-beginning 1) (1+ (match-end 1))
- 'face bface)
+ (add-text-properties (match-beginning 1) (1+ (match-end 1))
+ (list 'original-date date 'face bface))
(put-text-property (match-beginning 2) (match-end 2)
'face eface))))))))
(cond
;; Convert to the local timezone.
((eq type 'local)
- (let ((tz (car (current-time-zone time))))
- (format "Date: %s %s%02d%02d" (current-time-string time)
- (if (> tz 0) "+" "-") (/ (abs tz) 3600)
- (/ (% (abs tz) 3600) 60))))
+ (concat "Date: " (message-make-date time)))
;; Convert to Universal Time.
((eq type 'ut)
(concat "Date: "
- (current-time-string
- (let* ((e (parse-time-string date))
- (tm (apply 'encode-time e))
- (ms (car tm))
- (ls (- (cadr tm) (car (current-time-zone time)))))
- (cond ((< ls 0) (list (1- ms) (+ ls 65536)))
- ((> ls 65535) (list (1+ ms) (- ls 65536)))
- (t (list ms ls)))))
- " UT"))
+ (substring
+ (message-make-date
+ (let* ((e (parse-time-string date))
+ (tm (apply 'encode-time e))
+ (ms (car tm))
+ (ls (- (cadr tm) (car (current-time-zone time)))))
+ (cond ((< ls 0) (list (1- ms) (+ ls 65536)))
+ ((> ls 65535) (list (1+ ms) (- ls 65536)))
+ (t (list ms ls)))))
+ 0 -5)
+ "UT"))
;; Get the original date from the article.
((eq type 'original)
(concat "Date: " (if (string-match "\n+$" date)
;; (interactive)
;; (save-excursion
;; (widen)
-;; (let ((buffer-read-only nil))
+;; (let ((inhibit-read-only t))
;; (gnus-article-unhide-text (point-min) (point-max))
;; (gnus-remove-text-with-property 'gnus-prev)
;; (gnus-remove-text-with-property 'gnus-next))))
(save-restriction
(widen)
(article-narrow-to-head)
- (let ((buffer-read-only nil))
+ (let ((inhibit-read-only t))
(gnus-article-unhide-text (point-min) (point-max))))))
(defun article-remove-leading-whitespace ()
(interactive)
(save-excursion
(save-restriction
- (let ((buffer-read-only nil))
+ (let ((inhibit-read-only t))
(article-narrow-to-head)
(goto-char (point-min))
(while (re-search-forward "^[^ :]+: \\([ \t]+\\)" nil t)
gnus-article-emphasis-alist)
(error))
gnus-emphasis-alist))
- (buffer-read-only nil)
+ (inhibit-read-only t)
(props (append '(article-type emphasis)
gnus-hidden-properties))
regexp elem beg invisible visible face)
(mm-handle-multipart-ctl-parameter
mm-security-handle 'gnus-info)))))
(when info
- (let (buffer-read-only bface eface)
+ (let ((inhibit-read-only t) bface eface)
(save-restriction
(message-narrow-to-head)
(goto-char (point-max))
(require 'navi2ch-mona)
(set-face-font (make-face 'gnus-mona-face) navi2ch-mona-font))
(save-excursion
- (let ((buffer-read-only nil))
+ (let ((inhibit-read-only t))
(article-goto-body)
(gnus-overlay-put
(gnus-make-overlay (point) (point-max))
(make-local-variable 'gnus-article-ignored-charsets)
(gnus-set-default-directory)
(buffer-disable-undo)
- (setq buffer-read-only t)
+ (setq buffer-read-only t
+ show-trailing-whitespace nil)
(set-syntax-table gnus-article-mode-syntax-table)
(gnus-run-hooks 'gnus-article-mode-hook))
(defun gnus-article-display-traditional-message ()
"Article display method for traditional message."
(set-buffer gnus-article-buffer)
- (let (buffer-read-only)
+ (let ((inhibit-read-only t))
(erase-buffer)
(insert-buffer-substring gnus-original-article-buffer)))
(when (and (boundp 'transient-mark-mode)
transient-mark-mode)
(setq mark-active nil))
- (if (not (setq result (let ((buffer-read-only nil))
+ (if (not (setq result (let ((inhibit-read-only t))
(gnus-request-article-this-buffer
article group))))
;; There is no such article.
(defun gnus-article-prepare-display ()
"Make the current buffer look like a nice article."
(let ((gnus-article-buffer (current-buffer))
- buffer-read-only)
+ buffer-read-only
+ (inhibit-read-only t))
(unless (eq major-mode 'gnus-article-mode)
(gnus-article-mode))
(setq buffer-read-only nil
(mm-remove-parts handles)
(goto-char (point-min))
(or (search-forward "\n\n") (goto-char (point-max)))
- (let (buffer-read-only)
+ (let ((inhibit-read-only t))
(delete-region (point) (point-max))
(mm-display-parts handles))))))
(let* ((handle (or handle (get-text-property (point) 'gnus-data)))
contents charset
(b (point))
- buffer-read-only)
+ (inhibit-read-only t))
(when handle
(if (and (not arg) (mm-handle-undisplayer handle))
(mm-remove-part handle)
(let* ((handle (or handle (get-text-property (point) 'gnus-data)))
contents charset
(b (point))
- buffer-read-only)
+ (inhibit-read-only t))
(when handle
(if (mm-handle-undisplayer handle)
(mm-remove-part handle))
(mail-parse-ignored-charsets
(with-current-buffer gnus-summary-buffer
gnus-newsgroup-ignored-charsets))
- buffer-read-only)
+ (inhibit-read-only t))
(when handle
(if (mm-handle-undisplayer handle)
(mm-remove-part handle)
(defun gnus-article-mime-match-handle-first (condition)
(if condition
- (let ((alist gnus-article-mime-handle-alist) ihandle n)
- (while (setq ihandle (pop alist))
+ (let (n)
+ (dolist (ihandle gnus-article-mime-handle-alist)
(if (and (cond
((functionp condition)
(funcall condition (cdr ihandle)))
"Display HANDLE and fix MIME button."
(let ((id (get-text-property (point) 'gnus-part))
(point (point))
- buffer-read-only)
+ (inhibit-read-only t))
(forward-line 1)
(prog1
(let ((window (selected-window))
(mm-dissect-buffer nil gnus-article-loose-mime)
(and gnus-article-emulate-mime
(mm-uu-dissect))))
- buffer-read-only handle name type b e display)
+ (inhibit-read-only t) handle name type b e display)
(when (and (not ihandles)
(not gnus-displaying-mime))
;; Top-level call; we clean up.
(defcustom gnus-mime-display-multipart-alternative-as-mixed nil
"Display \"multipart/alternative\" parts as \"multipart/mixed\"."
+ :version "21.4"
:group 'gnus-article-mime
:type 'boolean)
If displaying \"text/html\" is discouraged \(see
`mm-discouraged-alternatives'\) images or other material inside a
\"multipart/related\" part might be overlooked when this variable is nil."
+ :version "21.4"
:group 'gnus-article-mime
:type 'boolean)
(let* ((preferred (or preferred (mm-preferred-alternative handles)))
(ihandles handles)
(point (point))
- handle buffer-read-only from props begend not-pref)
+ handle (inhibit-read-only t) from props begend not-pref)
(save-window-excursion
(save-restriction
(when ibegend
(widen)
;; Remove any old next/prev buttons.
(when (gnus-visual-p 'page-marker)
- (let ((buffer-read-only nil))
+ (let ((inhibit-read-only t))
(gnus-remove-text-with-property 'gnus-prev)
(gnus-remove-text-with-property 'gnus-next)))
(if
(match-beginning 0)
(point)))
(when (and (gnus-visual-p 'page-marker)
- (not (= (point-min) 1)))
+ (> (point-min) (save-restriction (widen) (point-min))))
(save-excursion
(goto-char (point-min))
(gnus-insert-prev-page-button)))
(save-excursion
(save-restriction
(widen)
+ (forward-line)
(eobp)))) ;Real end-of-buffer?
(progn
(when gnus-article-over-scroll
(interactive "P")
(let ((article (cdr gnus-article-current))
contents)
- (if (not (gnus-mark-active-p))
+ (if (not (gnus-region-active-p))
(with-current-buffer gnus-summary-buffer
(gnus-summary-reply (list (list article)) wide))
(setq contents (buffer-substring (point) (mark t)))
(interactive)
(let ((article (cdr gnus-article-current))
contents)
- (if (not (gnus-mark-active-p))
+ (if (not (gnus-region-active-p))
(with-current-buffer gnus-summary-buffer
(gnus-summary-followup (list (list article))))
(setq contents (buffer-substring (point) (mark t)))
(backend (car (gnus-find-method-for-group
gnus-newsgroup-name)))
result
- (buffer-read-only nil))
+ (inhibit-read-only t))
(if (or (not (listp methods))
(and (symbolp (car methods))
(assq (car methods) nnoo-definition-alist)))
(buffer-disable-undo)
(setq major-mode 'gnus-original-article-mode)
(setq buffer-read-only t))
- (let (buffer-read-only)
+ (let ((inhibit-read-only t))
(erase-buffer)
(insert-buffer-substring gnus-article-buffer))
(setq gnus-original-article (cons group article)))
["Body" message-goto-body t]
["Signature" message-goto-signature t]))
-(define-derived-mode gnus-article-edit-mode text-mode "Article Edit"
+(define-derived-mode gnus-article-edit-mode message-mode "Article Edit"
"Major mode for editing articles.
This is an extended text-mode.
(defcustom gnus-button-valid-fqdn-regexp
message-valid-fqdn-regexp
"Regular expression that matches a valid FQDN."
+ :version "21.4"
:group 'gnus-article-buttons
:type 'regexp)
"Function to use for displaying man pages.
The function must take at least one argument with a string naming the
man page."
+ :version "21.4"
:type '(choice (function-item :tag "Man" manual-entry)
(function-item :tag "Woman" woman)
(function :tag "Other"))
If the default site is too slow, try to find a CTAN mirror, see
<URL:http://tug.ctan.org/tex-archive/CTAN.sites?action=/index.html>. See also
the variable `gnus-button-handle-ctan'."
+ :version "21.4"
:group 'gnus-article-buttons
:link '(custom-manual "(gnus)Group Parameters")
:type '(choice (const "http://www.tex.ac.uk/tex-archive/")
(defcustom gnus-button-ctan-handler 'browse-url
"Function to use for displaying CTAN links.
The function must take one argument, the string naming the URL."
+ :version "21.4"
:type '(choice (function-item :tag "Browse Url" browse-url)
(function :tag "Other"))
:group 'gnus-article-buttons)
(defcustom gnus-button-handle-ctan-bogus-regexp "^/?tex-archive/\\|^/"
"Bogus strings removed from CTAN URLs."
+ :version "21.4"
:group 'gnus-article-buttons
:type '(choice (const "^/?tex-archive/\\|/")
(regexp :tag "Other")))
"\\)")
"Regular expression for ctan directories.
It should match all directories in the top level of `gnus-ctan-url'."
+ :version "21.4"
:group 'gnus-article-buttons
:type 'regexp)
gnus-button-valid-fqdn-regexp
">?\\)\\b")
"Regular expression that matches a message ID or a mail address."
+ :version "21.4"
:group 'gnus-article-buttons
:type 'regexp)
symbol `ask', always query the user what do do. If it is a function, this
function will be called with the string as it's only argument. The function
must return `mid', `mail', `invalid' or `ask'."
+ :version "21.4"
:group 'gnus-article-buttons
:type '(choice (function-item :tag "Heuristic function"
gnus-button-mid-or-mail-heuristic)
A negative RATE indicates a message IDs, whereas a positive indicates a mail
address. The REGEXP is processed with `case-fold-search' set to nil."
+ :version "21.4"
:group 'gnus-article-buttons
:type '(repeat (cons (number :tag "Rate")
(regexp :tag "Regexp"))))
specific groups. Setting it higher in TeX groups is probably a good idea.
See Info node `(gnus)Group Parameters' and the variable `gnus-parameters' on
how to set variables in specific groups."
+ :version "21.4"
:group 'gnus-article-buttons
:link '(custom-manual "(gnus)Group Parameters")
:type 'integer)
specific groups. Setting it higher in Unix groups is probably a good idea.
See Info node `(gnus)Group Parameters' and the variable `gnus-parameters' on
how to set variables in specific groups."
+ :version "21.4"
:group 'gnus-article-buttons
:link '(custom-manual "(gnus)Group Parameters")
:type 'integer)
specific groups. Setting it higher in Emacs or Gnus related groups is
probably a good idea. See Info node `(gnus)Group Parameters' and the variable
`gnus-parameters' on how to set variables in specific groups."
+ :version "21.4"
:group 'gnus-article-buttons
:link '(custom-manual "(gnus)Group Parameters")
:type 'integer)
The higher the number, the more buttons will appear and the more false
positives are possible."
;; mail addresses, MIDs, URLs for news, ...
+ :version "21.4"
:group 'gnus-article-buttons
:type 'integer)
The higher the number, the more buttons will appear and the more false
positives are possible."
;; stuff handled by `browse-url' or `gnus-button-embedded-url'
+ :version "21.4"
:group 'gnus-article-buttons
:type 'integer)
("M-x[ \t\n]+apropos-documentation[ \t\n]+RET[ \t\n]+\\([^ \t\n]+\\)[ \t\n]+RET"
0 (>= gnus-button-emacs-level 1) gnus-button-handle-apropos-documentation 1)
;; The following entries may lead to many false positives so don't enable
- ;; them by default (use a high button level):
- ("/\\([a-z][-a-z0-9]+\\.el\\)\\>"
+ ;; them by default (use a high button level).
+ ("/\\([a-z][-a-z0-9]+\\.el\\)\\>[^.?]"
+ ;; Exclude [.?] for URLs in gmane.emacs.cvs
1 (>= gnus-button-emacs-level 8) gnus-button-handle-library 1)
("`\\([a-z][-a-z0-9]+\\.el\\)'"
1 (>= gnus-button-emacs-level 8) gnus-button-handle-library 1)
(gnus-button-url-regexp
0 (>= gnus-button-browse-level 0) browse-url 0)
;; man pages
- ("\\b\\([a-z][a-z]+\\)([1-9])\\W"
+ ("\\b\\([a-z][a-z]+([1-9])\\)\\W"
0 (and (>= gnus-button-man-level 1) (< gnus-button-man-level 3))
gnus-button-handle-man 1)
;; more man pages: resolv.conf(5), iso_8859-1(7), xterm(1x)
- ("\\b\\([a-z][-_.a-z0-9]+\\)([1-9])\\W"
+ ("\\b\\([a-z][-_.a-z0-9]+([1-9])\\)\\W"
0 (and (>= gnus-button-man-level 3) (< gnus-button-man-level 5))
gnus-button-handle-man 1)
;; even more: Apache::PerlRun(3pm), PDL::IO::FastRaw(3pm),
;; SoWWWAnchor(3iv), XSelectInput(3X11), X(1), X(7)
- ("\\b\\([a-z][-+_.:a-z0-9]+\\)([1-9][X1a-z]*)\\W\\|\\b\\(X\\)([1-9])\\W"
+ ("\\b\\(\\(?:[a-z][-+_.:a-z0-9]+([1-9][X1a-z]*)\\)\\|\\b\\(?:X([1-9])\\)\\)\\W"
0 (>= gnus-button-man-level 5) gnus-button-handle-man 1)
;; 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
"Highlight article headers as specified by `gnus-header-face-alist'."
(interactive)
(gnus-with-article-headers
- (let ((alist gnus-header-face-alist)
- entry regexp header-face field-face from hpoints fpoints)
- (while (setq entry (pop alist))
+ (let (regexp header-face field-face from hpoints fpoints)
+ (dolist (entry gnus-header-face-alist)
(goto-char (point-min))
(setq regexp (concat "^\\("
(if (string-equal "" (nth 0 entry))
(interactive)
(save-excursion
(set-buffer gnus-article-buffer)
- (let ((buffer-read-only nil)
+ (let ((inhibit-read-only t)
(inhibit-point-motion-hooks t))
(when (gnus-article-search-signature)
(gnus-article-add-button (match-beginning 0) (match-end 0)
"Add buttons to the head of the article."
(interactive)
(gnus-with-article-headers
- (let ((alist gnus-header-button-alist)
- entry beg end)
- (while alist
+ (let (beg end)
+ (dolist (entry gnus-header-button-alist)
;; Each alist entry.
- (setq entry (pop alist))
(goto-char (point-min))
(while (re-search-forward (car entry) nil t)
;; Each header matching the entry.
(defun gnus-button-handle-man (url)
"Fetch a man page."
+ (gnus-message 9 "`%s' `%s'" gnus-button-man-handler url)
+ (when (eq gnus-button-man-handler 'woman)
+ (setq url (gnus-replace-in-string url "([1-9][X1a-z]*).*\\'" "")))
+ (gnus-message 9 "`%s' `%s'" gnus-button-man-handler url)
(funcall gnus-button-man-handler url))
(defun gnus-button-handle-info-url (url)
(defvar gnus-next-page-map
(let ((map (make-sparse-keymap)))
+ (unless (>= emacs-major-version 21)
+ ;; XEmacs doesn't care.
+ (set-keymap-parent map gnus-article-mode-map))
(define-key map gnus-mouse-2 'gnus-button-next-page)
(define-key map "\r" 'gnus-button-next-page)
map))
(defun gnus-insert-prev-page-button ()
(let ((b (point))
- (buffer-read-only nil)
+ (inhibit-read-only t)
(situation (get-text-property (point-min) 'mime-view-situation)))
(gnus-eval-format
gnus-prev-page-line-format nil
(defun gnus-insert-next-page-button ()
(let ((b (point))
- (buffer-read-only nil)
+ (inhibit-read-only t)
(situation (get-text-property (point-min) 'mime-view-situation)))
(gnus-eval-format gnus-next-page-line-format nil
`(keymap ,gnus-next-page-map
"List of methods used to decode headers.
This variable is a list of FUNCTION or (REGEXP . FUNCTION). If item
-is FUNCTION, FUNCTION will be apply to all newsgroups. If item is a
+is FUNCTION, FUNCTION will be applied to all newsgroups. If item is a
\(REGEXP . FUNCTION), FUNCTION will be only apply to the newsgroups
whose names match REGEXP.
(setq references
(or (mail-header-references gnus-current-headers) ""))
(set-buffer gnus-article-buffer)
- (let* ((buffer-read-only nil)
+ (let* ((inhibit-read-only t)
(headers
(mapcar (lambda (field)
(and (save-restriction
(defun gnus-mime-security-verify-or-decrypt (handle)
(mm-remove-parts (cdr handle))
(let ((region (mm-handle-multipart-ctl-parameter handle 'gnus-region))
- point buffer-read-only)
+ point (inhibit-read-only t))
(if region
(goto-char (car region)))
(save-restriction
(not (get-text-property (point) 'gnus-mime-details)))
(gnus-mime-security-button-line-format
(get-text-property (point) 'gnus-line-format))
- buffer-read-only)
+ (inhibit-read-only t))
(forward-char -1)
(while (eq (get-text-property (point) 'gnus-line-format)
gnus-mime-security-button-line-format)