unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Rüdiger Sonderfeld" <ruediger@c-plusplus.de>
To: emacs-devel@gnu.org
Cc: Lars Magne Ingebrigtsen <larsi@gnus.org>,
	Ted Zlatanov <tzz@lifelogs.com>
Subject: [PATCH 3/5] eww: Use `setq-local'.
Date: Fri, 20 Dec 2013 00:44:43 +0100	[thread overview]
Message-ID: <3889158.NetLtzTgG9@descartes> (raw)
In-Reply-To: <cover.1387496431.git.ruediger@c-plusplus.de>

* lisp/net/eww.el (eww-render, eww-mode): Use `setq-local'.
---
 lisp/ChangeLog  |  1 +
 lisp/net/eww.el | 26 +++++++++++++-------------
 2 files changed, 14 insertions(+), 13 deletions(-)

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index cf8553d..54f6c77 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -6,6 +6,7 @@
 	(eww-bookmark-browse, eww-next-bookmark, eww-previous-bookmark):
 	Use `user-error'.
 	(eww-bookmark-mode-map): Add menu.
+	(eww-render, eww-mode): Use `setq-local'.
 
 2013-12-19  Teodor Zlatanov  <tzz@lifelogs.com>
 
diff --git a/lisp/net/eww.el b/lisp/net/eww.el
index 1da2bb2..a58b7ed 100644
--- a/lisp/net/eww.el
+++ b/lisp/net/eww.el
@@ -171,12 +171,12 @@ (defun eww-render (status url &optional point)
   (let ((redirect (plist-get status :redirect)))
     (when redirect
       (setq url redirect)))
-  (set (make-local-variable 'eww-next-url) nil)
-  (set (make-local-variable 'eww-previous-url) nil)
-  (set (make-local-variable 'eww-up-url) nil)
-  (set (make-local-variable 'eww-home-url) nil)
-  (set (make-local-variable 'eww-start-url) nil)
-  (set (make-local-variable 'eww-contents-url) nil)
+  (setq-local eww-next-url nil)
+  (setq-local eww-previous-url nil)
+  (setq-local eww-up-url nil)
+  (setq-local eww-home-url nil)
+  (setq-local eww-start-url nil)
+  (setq-local eww-contents-url nil)
   (let* ((headers (eww-parse-headers))
 	 (content-type
 	  (mail-header-parse-content-type
@@ -443,13 +443,13 @@ (define-derived-mode eww-mode nil "eww"
 
 \\{eww-mode-map}"
   ;; FIXME?  This seems a strange default.
-  (set (make-local-variable 'eww-current-url) 'author)
-  (set (make-local-variable 'eww-current-dom) nil)
-  (set (make-local-variable 'eww-current-source) nil)
-  (set (make-local-variable 'browse-url-browser-function) 'eww-browse-url)
-  (set (make-local-variable 'after-change-functions) 'eww-process-text-input)
-  (set (make-local-variable 'eww-history) nil)
-  (set (make-local-variable 'eww-history-position) 0)
+  (setq-local eww-current-url 'author)
+  (setq-local eww-current-dom nil)
+  (setq-local eww-current-source nil)
+  (setq-local browse-url-browser-function 'eww-browse-url)
+  (setq-local after-change-functions 'eww-process-text-input)
+  (setq-local eww-history nil)
+  (setq-local eww-history-position 0)
   (buffer-disable-undo)
   ;;(setq buffer-read-only t)
   )
-- 
1.8.5





  parent reply	other threads:[~2013-12-19 23:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1387496431.git.ruediger@c-plusplus.de>
2013-12-19 23:44 ` [PATCH 1/5] eww: Use `user-error' Rüdiger Sonderfeld
2013-12-19 23:44 ` [PATCH 2/5] eww: Add menu for `eww-bookmark-mode' Rüdiger Sonderfeld
2013-12-19 23:44 ` Rüdiger Sonderfeld [this message]
2013-12-19 23:44 ` [PATCH 4/5] eww: Add tool bar support Rüdiger Sonderfeld
2013-12-19 23:44 ` [PATCH 5/5] eww: Check for `html-mode' using `fboundp' Rüdiger Sonderfeld

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3889158.NetLtzTgG9@descartes \
    --to=ruediger@c-plusplus.de \
    --cc=emacs-devel@gnu.org \
    --cc=larsi@gnus.org \
    --cc=tzz@lifelogs.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).