]> code.delx.au - gnu-emacs/blobdiff - lisp/net/newst-plainview.el
Merge from emacs-24; up to 2014-07-27T09:41:59Z!ttn@gnu.org
[gnu-emacs] / lisp / net / newst-plainview.el
index d1b042cad662b2e7acccb7a9f682b7699f706ad1..dea24f12a978a61f4778c87a1cd006be046f65e2 100644 (file)
@@ -1,11 +1,10 @@
 ;;; newst-plainview.el --- Single buffer frontend for newsticker.
 
-;; Copyright (C) 2003-201 Free Software Foundation, Inc.
+;; Copyright (C) 2003-2014 Free Software Foundation, Inc.
 
 ;; Author:      Ulf Jasper <ulf.jasper@web.de>
 ;; Filename:    newst-plainview.el
 ;; URL:         http://www.nongnu.org/newsticker
-;; Time-stamp:  "13. Mai 2011, 19:28:34 (ulf)"
 ;; Package:     newsticker
 
 ;; ======================================================================
@@ -155,61 +154,39 @@ The following printf-like specifiers can be used:
 ;; ======================================================================
 ;; faces
 
-(defface newsticker-new-item-face
-  '((((class color) (background dark))
-     (:family "sans" :bold t))
-    (((class color) (background light))
-     (:family "sans" :bold t)))
+(defface newsticker-new-item-face '((t :weight bold))
   "Face for new news items."
   :group 'newsticker-faces)
 
 (defface newsticker-old-item-face
-  '((((class color) (background dark))
-     (:family "sans" :bold t :foreground "orange3"))
-    (((class color) (background light))
-     (:family "sans" :bold t :foreground "red4")))
+  '((default :weight bold)
+    (((class color) (background dark))  :foreground "orange3")
+    (((class color) (background light)) :foreground "red4"))
   "Face for old news items."
   :group 'newsticker-faces)
 
 (defface newsticker-immortal-item-face
-  '((((class color) (background dark))
-     (:family "sans" :bold t :italic t :foreground "orange"))
-    (((class color) (background light))
-     (:family "sans" :bold t :italic t :foreground "blue")))
+  '((default :weight bold :slant italic)
+    (((class color) (background dark))  :foreground "orange")
+    (((class color) (background light)) :foreground "blue"))
   "Face for immortal news items."
   :group 'newsticker-faces)
 
 (defface newsticker-obsolete-item-face
-  '((((class color) (background dark))
-     (:family "sans" :bold t :strike-through t))
-    (((class color) (background light))
-     (:family "sans" :bold t :strike-through t)))
+  '((t :weight bold :strike-through t))
   "Face for old news items."
   :group 'newsticker-faces)
 
-(defface newsticker-date-face
-  '((((class color) (background dark))
-     (:family "sans" :italic t :height 0.8))
-    (((class color) (background light))
-     (:family "sans" :italic t :height 0.8)))
+(defface newsticker-date-face '((t :slant italic :height 0.8))
   "Face for newsticker dates."
   :group 'newsticker-faces)
 
-(defface newsticker-statistics-face
-  '((((class color) (background dark))
-     (:family "sans" :italic t :height 0.8))
-    (((class color) (background light))
-     (:family "sans" :italic t :height 0.8)))
+(defface newsticker-statistics-face '((t :slant italic :height 0.8))
   "Face for newsticker dates."
   :group 'newsticker-faces)
 
-(defface newsticker-default-face
-  '((((class color) (background dark))
-     (:inherit default))
-    (((class color) (background light))
-     (:inherit default)))
+(defface newsticker-default-face '((t))
   "Face for the description of news items."
-  ;;:set 'newsticker--set-customvar
   :group 'newsticker-faces)
 
 (defcustom newsticker-hide-old-items-in-newsticker-buffer
@@ -427,7 +404,8 @@ images."
     (define-key map "sx" 'newsticker-show-extra)
     (define-key map "hx" 'newsticker-hide-extra)
 
-    (define-key map " "  'scroll-up)
+    (define-key map [?\S-\ ] 'scroll-down-command)
+    (define-key map " "  'scroll-up-command)
     (define-key map "q"  'newsticker-close-buffer)
     (define-key map "p"  'newsticker-previous-item)
     (define-key map "P"  'newsticker-previous-new-item)
@@ -783,11 +761,11 @@ Return new buffer position."
       (newsticker--buffer-set-uptodate nil)
       (newsticker--ticker-text-setup)
       (newsticker-buffer-update)
-      ;; go back to where we came frome
+      ;; Go back to where we came from.
       (goto-char pos)
       (end-of-line)
       (newsticker--buffer-goto '(feed) nil t))))
-  
+
 (defun newsticker-mark-all-items-at-point-as-read ()
   "Mark all items as read and clear ticker contents."
   (interactive)
@@ -1209,7 +1187,7 @@ The mode-line is changed accordingly."
   "Redraw the newsticker window."
   (if (fboundp 'force-window-update)
       (force-window-update (current-buffer))
-    (redraw-frame (selected-frame)))
+    (redraw-frame))
   (run-hooks 'newsticker-buffer-change-hook)
   (sit-for 0))
 
@@ -1574,7 +1552,7 @@ property to '(<nt-type>-<nt-age> <nt-type> <nt-age>)."
       (while (and (setq pos2 (next-single-property-change pos1 'nt-type))
                   (<= pos2 end)
                   (> pos2 pos1))
-        ;; must shift one char to the left in order to handle inivisible
+        ;; must shift one char to the left in order to handle invisible
         ;; newlines, motion in invisible text areas and all that correctly
         (put-text-property (1- pos1) (1- pos2)
                            'invisible