Permalink
Browse files

Replace let-bindings of buffer-read-only to nil with inhibit-read-onl…

…y to t.

* octet.el (octet-find-file)
* w3m-form.el (w3m-fontify-textareas, w3m-form-replace)
* w3m-proc.el (w3m-process-filter)
* w3m-session.el (w3m-session-select-list-all-sessions)
(w3m-session-select-list-session-group, w3m-session-select-next)
* w3m.el (w3m-idle-images-show, w3m-toggle-inline-images-internal)
(w3m-resize-inline-image-internal, w3m-fontify, w3m-refontify-anchor)
(w3m-cache-remove-oldest, w3m-cache-remove, w3m-cache-contents)
(w3m-cache-request-contents, w3m-create-text-page)
(w3m-create-image-page, w3m-select-buffer-generate-contents)
(w3m-select-buffer-recheck): Replace let-bindings of buffer-read-only
to nil with inhibit-read-only to t.
  • Loading branch information...
yamaoka
yamaoka committed Aug 18, 2010
1 parent b4d3bb0 commit d810aea68058ef7112002bc10666f701613ce6cc
Showing with 51 additions and 35 deletions.
  1. +15 −0 ChangeLog
  2. +2 −2 octet.el
  3. +4 −3 w3m-form.el
  4. +2 −2 w3m-proc.el
  5. +7 −7 w3m-session.el
  6. +21 −21 w3m.el
View
@@ -1,3 +1,18 @@
+2010-08-18 Katsumi Yamaoka <yamaoka@jpl.org>
+
+ * octet.el (octet-find-file)
+ * w3m-form.el (w3m-fontify-textareas, w3m-form-replace)
+ * w3m-proc.el (w3m-process-filter)
+ * w3m-session.el (w3m-session-select-list-all-sessions)
+ (w3m-session-select-list-session-group, w3m-session-select-next)
+ * w3m.el (w3m-idle-images-show, w3m-toggle-inline-images-internal)
+ (w3m-resize-inline-image-internal, w3m-fontify, w3m-refontify-anchor)
+ (w3m-cache-remove-oldest, w3m-cache-remove, w3m-cache-contents)
+ (w3m-cache-request-contents, w3m-create-text-page)
+ (w3m-create-image-page, w3m-select-buffer-generate-contents)
+ (w3m-select-buffer-recheck): Replace let-bindings of buffer-read-only
+ to nil with inhibit-read-only to t.
+
2010-08-18 Katsumi Yamaoka <yamaoka@jpl.org>
* w3m-search.el (w3m-search-engine-alist): Fix `google news' url forms
View
@@ -1,6 +1,6 @@
;;; octet.el --- An octet stream viewer.
-;; Copyright (C) 2000, 2002, 2003, 2004, 2005
+;; Copyright (C) 2000, 2002, 2003, 2004, 2005, 2010
;; Yuuichi Teranishi <teranisi@gohome.org>
;; Author: Yuuichi Teranishi <teranisi@gohome.org>
@@ -415,7 +415,7 @@ If optional CONTENT-TYPE is specified, it is used for type guess."
(interactive "fFilename: ")
(as-binary-input-file (find-file file))
(unwind-protect
- (let (buffer-read-only)
+ (let ((inhibit-read-only t))
(octet-buffer))
(goto-char (point-min))
(set-buffer-modified-p nil)
View
@@ -540,8 +540,9 @@ fid=\\([^/]+\\)/type=\\([^/]+\\)/name=\\([^/]*\\)/id=\\(.*\\)$"
(when w3m-form-treat-textarea-size
(save-excursion
(goto-char (point-min))
- (let (form fid start end type name rows start-column end-column
- hseq abs-hseq buffer-read-only text id filename readonly)
+ (let ((inhibit-read-only t)
+ form fid start end type name rows start-column end-column
+ hseq abs-hseq text id filename readonly)
(while (w3m-form-goto-next-field)
(setq fid (get-text-property (point) 'w3m-form-field-id))
(setq filename (get-text-property (point) 'w3m-form-file-name))
@@ -940,7 +941,7 @@ If optional REUSE-FORMS is non-nil, reuse it as `w3m-current-form'."
(next-single-property-change start 'w3m-action))))
(prop (text-properties-at start))
(p (point))
- (buffer-read-only))
+ (inhibit-read-only t))
(goto-char start)
(insert (setq string
(if invisible
View
@@ -1,6 +1,6 @@
;;; w3m-proc.el --- Functions and macros to control sub-processes
-;; Copyright (C) 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009
+;; Copyright (C) 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010
;; TSUCHIYA Masatoshi <tsuchiya@namazu.org>
;; Authors: TSUCHIYA Masatoshi <tsuchiya@namazu.org>,
@@ -583,7 +583,7 @@ evaluated in a temporary buffer."
(defun w3m-process-filter (process string)
(when (buffer-name (process-buffer process))
(with-current-buffer (process-buffer process)
- (let ((buffer-read-only nil)
+ (let ((inhibit-read-only t)
(case-fold-search nil))
(goto-char (process-mark process))
(insert string)
View
@@ -434,11 +434,11 @@ Sorry, an error found in \"%s\"; may we remove it? "
(defun w3m-session-select-list-all-sessions ()
"List up all saved sessions."
- (let* ((sessions w3m-session-select-sessions)
- (num 0)
- (max 0)
- (buffer-read-only nil)
- title titles time times url urls wid pos)
+ (let ((sessions w3m-session-select-sessions)
+ (num 0)
+ (max 0)
+ (inhibit-read-only t)
+ title titles time times url urls wid pos)
(if (not sessions)
(progn
(message "No saved session")
@@ -493,7 +493,7 @@ Sorry, an error found in \"%s\"; may we remove it? "
(let ((session (nth 2 (nth arg w3m-session-select-sessions)))
(num 0)
(max 0)
- (buffer-read-only nil)
+ (inhibit-read-only t)
title url wid
titles urls pos)
(when session
@@ -540,7 +540,7 @@ Sorry, an error found in \"%s\"; may we remove it? "
(interactive "p")
(unless arg (setq arg 1))
(let ((positive (< 0 arg))
- (buffer-read-only nil))
+ (inhibit-read-only t))
(beginning-of-line)
(put-text-property (point)
(next-single-property-change
View
42 w3m.el
@@ -3763,7 +3763,7 @@ The database is kept in `w3m-entity-table'."
(with-current-buffer (marker-buffer start)
(save-restriction
(widen)
- (let (buffer-read-only)
+ (let ((inhibit-read-only t))
(remove-text-properties start end '(w3m-idle-image-item))
(set-buffer-modified-p nil))
(w3m-process-with-null-handler
@@ -3784,12 +3784,12 @@ The database is kept in `w3m-entity-table'."
(widen)
(if image
(when (equal url w3m-current-url)
- (let (buffer-read-only)
+ (let ((inhibit-read-only t))
(w3m-insert-image start end image iurl))
;; Redisplay
(when w3m-force-redisplay
(sit-for 0)))
- (let (buffer-read-only)
+ (let ((inhibit-read-only t))
(w3m-add-text-properties
start end '(w3m-image-status off))))
(set-buffer-modified-p nil))
@@ -3835,7 +3835,7 @@ STATUS is current image status.
If NO-CACHE is non-nil, cache is not used.
If URL is specified, only the image with URL is toggled."
(let ((cur-point (point))
- (buffer-read-only)
+ (inhibit-read-only t)
(end (or begin-pos (point-min)))
(allow-non-secure-images (not w3m-confirm-leaving-secure-page))
start iurl image size)
@@ -3908,12 +3908,12 @@ You are retrieving non-secure image(s). Continue? ")
(with-current-buffer (marker-buffer start)
(if image
(when (equal url w3m-current-url)
- (let (buffer-read-only)
+ (let ((inhibit-read-only t))
(w3m-insert-image start end image iurl))
;; Redisplay
(when w3m-force-redisplay
(sit-for 0)))
- (let (buffer-read-only)
+ (let ((inhibit-read-only t))
(w3m-add-text-properties
start end '(w3m-image-status off))))
(set-buffer-modified-p nil)))
@@ -4094,7 +4094,7 @@ variable is non-nil (default=t)."
"Resize an inline image on the cursor position.
URL is a url of an image. RATE is a number of percent used when
resizing an image."
- (let* ((buffer-read-only)
+ (let* ((inhibit-read-only t)
(start (point))
(end (or (next-single-property-change start 'w3m-image)
(point-max)))
@@ -4143,14 +4143,14 @@ You are retrieving non-secure image(s). Continue? ")
(with-current-buffer (marker-buffer start)
(if image
(when (equal url w3m-current-url)
- (let (buffer-read-only)
+ (let ((inhibit-read-only t))
(w3m-static-when (featurep 'xemacs)
(w3m-remove-image start end))
(w3m-insert-image start end image iurl))
;; Redisplay
(when w3m-force-redisplay
(sit-for 0)))
- (let (buffer-read-only)
+ (let ((inhibit-read-only t))
(w3m-add-text-properties
start end '(w3m-image-status off))))
(set-buffer-modified-p nil))
@@ -4256,7 +4256,7 @@ If optional KEEP-PROPERTIES is non-nil, text property is reserved."
(defun w3m-fontify ()
"Fontify the current buffer."
(let ((case-fold-search t)
- (buffer-read-only))
+ (inhibit-read-only t))
(w3m-message "Fontifying...")
(run-hooks 'w3m-fontify-before-hook)
;; Remove hidden anchors like "<a href=url> </a>".
@@ -4332,9 +4332,9 @@ It replaces the faces on the arrived anchors from `w3m-anchor' to
(setq prop (get-text-property (point) 'face))
(listp prop)
(member 'w3m-anchor prop))
- (let* ((start)
- (end (next-single-property-change (point) 'w3m-anchor-sequence))
- (buffer-read-only))
+ (let ((start)
+ (end (next-single-property-change (point) 'w3m-anchor-sequence))
+ (inhibit-read-only t))
(when (and end
(setq start (previous-single-property-change
end 'w3m-anchor-sequence))
@@ -4652,7 +4652,7 @@ already been the data corresponding to URL in the cache."
(goto-char (point-min))
(unless (zerop (buffer-size))
(let ((ident (get-text-property (point) 'w3m-cache))
- buffer-read-only)
+ (inhibit-read-only t))
;; Remove the ident from the list of articles.
(when ident
(setq w3m-cache-articles (delq ident w3m-cache-articles)))
@@ -4669,7 +4669,7 @@ already been the data corresponding to URL in the cache."
(when (memq ident w3m-cache-articles)
;; It was in the cache.
(with-current-buffer w3m-cache-buffer
- (let (buffer-read-only)
+ (let ((inhibit-read-only t))
(when (setq beg (text-property-any
(point-min) (point-max) 'w3m-cache ident))
;; Find the end (i. e., the beginning of the next article).
@@ -4691,7 +4691,7 @@ identifies the data in the cache."
(w3m-cache-remove-oldest))
;; Insert the new article.
(with-current-buffer w3m-cache-buffer
- (let (buffer-read-only)
+ (let ((inhibit-read-only t))
(goto-char (point-max))
(let ((b (point)))
(insert-buffer-substring buffer)
@@ -4721,7 +4721,7 @@ BUFFER is nil, all contents will be inserted in the current buffer."
(and beg
end
(with-current-buffer (or buffer (current-buffer))
- (let (buffer-read-only)
+ (let ((inhibit-read-only t))
(insert-buffer-substring w3m-cache-buffer beg end))
t))))))
@@ -6223,7 +6223,7 @@ If so return \"text/html\", otherwise \"text/plain\"."
url)))))
(let ((result-buffer (current-buffer)))
(with-current-buffer page-buffer
- (let (buffer-read-only)
+ (let ((inhibit-read-only t))
(widen)
(delete-region (point-min) (point-max))
(insert-buffer-substring result-buffer)
@@ -6242,7 +6242,7 @@ If so return \"text/html\", otherwise \"text/plain\"."
(defun w3m-create-image-page (url type charset page-buffer)
(when (w3m-image-type-available-p (w3m-image-type type))
(with-current-buffer page-buffer
- (let (buffer-read-only)
+ (let ((inhibit-read-only t))
(w3m-clear-local-variables)
(setq w3m-current-url (w3m-real-url url)
w3m-current-title (file-name-nondirectory url))
@@ -10283,7 +10283,7 @@ buffer list. The following command keys are available:
(defun w3m-select-buffer-generate-contents (current-buffer)
(let ((i 0)
- (buffer-read-only))
+ (inhibit-read-only t))
(delete-region (point-min) (point-max))
(dolist (buffer (w3m-list-buffers))
(put-text-property (point)
@@ -10387,7 +10387,7 @@ buffer list. The following command keys are available:
(defun w3m-select-buffer-recheck ()
"Do the roll call to all emacs-w3m buffers and regenerate the menu."
(interactive)
- (let ((buffer-read-only nil))
+ (let ((inhibit-read-only t))
(erase-buffer))
(w3m-select-buffer-generate-contents
(window-buffer w3m-select-buffer-window))

0 comments on commit d810aea

Please sign in to comment.