aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorUlf Jasper2011-09-24 16:04:46 +0200
committerUlf Jasper2011-09-24 16:04:46 +0200
commit2ac2721a7f792e5a85588dc402fe9670225be6e6 (patch)
treef3640eaddaa9ac5f53160071f4aa7beab4363d96 /lisp
parente3cbd34b8793d52fb3252c8e0406bc5d67c2db44 (diff)
downloademacs-2ac2721a7f792e5a85588dc402fe9670225be6e6.tar.gz
emacs-2ac2721a7f792e5a85588dc402fe9670225be6e6.zip
newsticker: automatically load html rendering packages.
lisp/ChangeLog: 2011-09-24 Ulf Jasper <ulf.jasper@web.de> * net/newst-reader.el (newsticker-html-renderer) (newsticker-show-news): Automatically load html rendering package if newsticker-html-renderer is set. Fixes "Warning: defvar ignored because w3m-fill-column is let-bound" and the error "Symbol's value as variable is void: w3m-fill-column".
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog9
-rw-r--r--lisp/net/newst-reader.el37
2 files changed, 23 insertions, 23 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 6f322d5f3bf..bf63cacf728 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,12 @@
12011-09-24 Ulf Jasper <ulf.jasper@web.de>
2
3 * net/newst-reader.el (newsticker-html-renderer)
4 (newsticker-show-news): Automatically
5 load html rendering package if newsticker-html-renderer is
6 set. Fixes "Warning: defvar ignored because w3m-fill-column is
7 let-bound" and the error "Symbol's value as variable is void:
8 w3m-fill-column".
9
12011-09-24 Michael Albinus <michael.albinus@gmx.de> 102011-09-24 Michael Albinus <michael.albinus@gmx.de>
2 11
3 * net/dbus.el (dbus-unregister-object): Remove match rule of signals. 12 * net/dbus.el (dbus-unregister-object): Remove match rule of signals.
diff --git a/lisp/net/newst-reader.el b/lisp/net/newst-reader.el
index 1fbba29ec14..f9975c45fb3 100644
--- a/lisp/net/newst-reader.el
+++ b/lisp/net/newst-reader.el
@@ -5,7 +5,7 @@
5;; Author: Ulf Jasper <ulf.jasper@web.de> 5;; Author: Ulf Jasper <ulf.jasper@web.de>
6;; Filename: newst-reader.el 6;; Filename: newst-reader.el
7;; URL: http://www.nongnu.org/newsticker 7;; URL: http://www.nongnu.org/newsticker
8;; Time-stamp: "13. Mai 2011, 20:55:24 (ulf)" 8;; Time-stamp: "24. September 2011, 15:47:49 (ulf)"
9;; Package: newsticker 9;; Package: newsticker
10 10
11;; ====================================================================== 11;; ======================================================================
@@ -103,28 +103,11 @@ window is used when filling. See also `newsticker-justification'."
103(defcustom newsticker-html-renderer 103(defcustom newsticker-html-renderer
104 nil 104 nil
105 "Function for rendering HTML contents. 105 "Function for rendering HTML contents.
106If non-nil, newsticker.el will call this function whenever it finds 106If non-nil, newsticker.el will call this function whenever it
107HTML-like tags in item descriptions. Possible functions are, for 107finds HTML-like tags in item descriptions. Possible functions
108example, `w3m-region', `w3-region', and (if you have htmlr.el installed) 108are `w3m-region', `w3-region', and `newsticker-htmlr-render'.
109`newsticker-htmlr-render'. 109Newsticker automatically loads the respective package w3m, w3, or
110 110htmlr if this option is set."
111In order to make sure that the HTML renderer is loaded when you
112run newsticker, you should add one of the following statements to
113your .emacs. If you use w3m,
114
115 (autoload 'w3m-region \"w3m\"
116 \"Render region in current buffer and replace with result.\" t)
117
118 (autoload 'w3m-toggle-inline-image \"w3m\"
119 \"Toggle the visibility of an image under point.\" t)
120
121or, if you use w3,
122
123 (require 'w3-auto)
124
125or, if you use htmlr
126
127 (require 'htmlr)"
128 :type '(choice :tag "Function" 111 :type '(choice :tag "Function"
129 (const :tag "None" nil) 112 (const :tag "None" nil)
130 (const :tag "w3" w3-region) 113 (const :tag "w3" w3-region)
@@ -286,6 +269,14 @@ Return the image."
286 "Start reading news. You may want to bind this to a key." 269 "Start reading news. You may want to bind this to a key."
287 (interactive) 270 (interactive)
288 (newsticker-start t) ;; will start only if not running 271 (newsticker-start t) ;; will start only if not running
272 ;; Load the html rendering packages
273 (if newsticker-html-renderer
274 (cond ((eq newsticker-html-renderer 'w3m-region)
275 (require 'w3m))
276 ((eq newsticker-html-renderer 'w3-region)
277 (require 'w3-auto))
278 ((eq newsticker-html-renderer 'newsticker-htmlr-render)
279 (require 'htmlr))))
289 (funcall newsticker-frontend)) 280 (funcall newsticker-frontend))
290 281
291;; ====================================================================== 282;; ======================================================================