`(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)
(not gnus-show-all-headers))
(save-excursion
(save-restriction
- (let ((buffer-read-only nil)
+ (let ((inhibit-read-only t)
(list gnus-boring-article-headers)
(inhibit-point-motion-hooks t)
elem)
(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)
+ (let ((inhibit-read-only t)
elem)
(while (setq elem (pop map))
(save-excursion
(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)
(defun article-display-face ()
"Display any Face headers in the header."
(interactive)
- (let ((wash-face-p buffer-read-only))
+ (let ((wash-face-p (inhibit-read-only t)))
(gnus-with-article-headers
;; When displaying parts, this function can be called several times on
;; the same article, without any intended toggle semantic (as typing `W
(defun article-display-x-face (&optional force)
"Look for an X-Face header and display it if present."
(interactive (list 'force))
- (let ((wash-face-p buffer-read-only)) ;; When type `W f'
+ (let ((wash-face-p (inhibit-read-only t))) ;; When type `W f'
(gnus-with-article-headers
;; Delete the old process, if any.
(when (process-status "article-x-face")
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)
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)
;; (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))
(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)
"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.
(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)))
(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.
(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)
(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)