emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/net/newsticker.el


From: Juanma Barranquero
Subject: [Emacs-diffs] Changes to emacs/lisp/net/newsticker.el
Date: Tue, 13 Sep 2005 04:47:45 -0400

Index: emacs/lisp/net/newsticker.el
diff -c emacs/lisp/net/newsticker.el:1.2 emacs/lisp/net/newsticker.el:1.3
*** emacs/lisp/net/newsticker.el:1.2    Mon Sep 12 22:54:28 2005
--- emacs/lisp/net/newsticker.el        Tue Sep 13 08:47:44 2005
***************
*** 10,16 ****
  ;; Created:     17. June 2003
  ;; Keywords:    News, RSS
  ;; Time-stamp:  "26. August 2005, 16:33:46 (ulf)"
! ;; CVS-Version: $Id: newsticker.el,v 1.2 2005/09/12 22:54:28 miles Exp $
  
  (defconst newsticker-version "1.8" "Version number of newsticker.el.")
  
--- 10,16 ----
  ;; Created:     17. June 2003
  ;; Keywords:    News, RSS
  ;; Time-stamp:  "26. August 2005, 16:33:46 (ulf)"
! ;; CVS-Version: $Id: newsticker.el,v 1.3 2005/09/13 08:47:44 lektu Exp $
  
  (defconst newsticker-version "1.8" "Version number of newsticker.el.")
  
***************
*** 86,92 ****
  ;; following.
  ;;   (add-hook 'newsticker-mode-hook 'imenu-add-menubar-index)
  
! ;; That's it. 
  
  ;; Usage
  ;; -----
--- 86,92 ----
  ;; following.
  ;;   (add-hook 'newsticker-mode-hook 'imenu-add-menubar-index)
  
! ;; That's it.
  
  ;; Usage
  ;; -----
***************
*** 353,358 ****
--- 353,363 ----
  (require 'derived)
  (require 'xml)
  
+ ;; Silence warnings
+ (defvar tool-bar-map)
+ (defvar w3-mode-map)
+ (defvar w3m-minor-mode-map)
+ 
  ;; ======================================================================
  ;;; Customizables
  ;; ======================================================================
***************
*** 967,973 ****
    :type 'boolean
    :set 'newsticker--set-customvar
    :group 'newsticker-ticker)
!   
  (defcustom newsticker-hide-old-items-in-echo-area
    t
    "Decides whether to show only the newest news items in the ticker.
--- 972,978 ----
    :type 'boolean
    :set 'newsticker--set-customvar
    :group 'newsticker-ticker)
! 
  (defcustom newsticker-hide-old-items-in-echo-area
    t
    "Decides whether to show only the newest news items in the ticker.
***************
*** 2368,2374 ****
              (run-at-time newsticker-display-interval
                           newsticker-display-interval
                           'newsticker--display-tick))))
!   
  (defun newsticker-stop ()
    "Stop the newsticker and the newsticker-ticker.
  Cancel the timers for display and retrieval.  Run `newsticker-stop-hook'
--- 2373,2379 ----
              (run-at-time newsticker-display-interval
                           newsticker-display-interval
                           'newsticker--display-tick))))
! 
  (defun newsticker-stop ()
    "Stop the newsticker and the newsticker-ticker.
  Cancel the timers for display and retrieval.  Run `newsticker-stop-hook'
***************
*** 2429,2435 ****
         ;; Emacs 21.3.50 does not care if we turn off auto-fill in the
         ;; definition of newsticker-mode, so we do it here (again)
         (auto-fill-mode -1)
!        
         (set-buffer-file-coding-system 'utf-8)
  
         (if newsticker-use-full-width
--- 2434,2440 ----
         ;; Emacs 21.3.50 does not care if we turn off auto-fill in the
         ;; definition of newsticker-mode, so we do it here (again)
         (auto-fill-mode -1)
! 
         (set-buffer-file-coding-system 'utf-8)
  
         (if newsticker-use-full-width
***************
*** 2521,2527 ****
                            (w3m-remove-image
                             pos (next-single-property-change pos 'w3m-image))
                          (w3m-toggle-inline-image t))))))))))))
!   
  ;; ======================================================================
  ;;; keymap stuff
  ;; ======================================================================
--- 2526,2532 ----
                            (w3m-remove-image
                             pos (next-single-property-change pos 'w3m-image))
                          (w3m-toggle-inline-image t))))))))))))
! 
  ;; ======================================================================
  ;;; keymap stuff
  ;; ======================================================================
***************
*** 2789,2795 ****
    (interactive)
    (newsticker--buffer-hideshow 'desc-old nil)
    (newsticker--buffer-redraw))
!   
  (defun newsticker-show-old-item-desc ()
    "Show the description of old items."
    (interactive)
--- 2794,2800 ----
    (interactive)
    (newsticker--buffer-hideshow 'desc-old nil)
    (newsticker--buffer-redraw))
! 
  (defun newsticker-show-old-item-desc ()
    "Show the description of old items."
    (interactive)
***************
*** 2863,2869 ****
    "Hide description of entry at point."
    (interactive)
    (save-excursion
!     (let* (pos1 pos2 
                  (inhibit-read-only t)
                  inv-prop org-inv-prop
                  is-invisible)
--- 2868,2874 ----
    "Hide description of entry at point."
    (interactive)
    (save-excursion
!     (let* (pos1 pos2
                  (inhibit-read-only t)
                  inv-prop org-inv-prop
                  is-invisible)
***************
*** 2890,2896 ****
    "Show description of entry at point."
    (interactive)
    (save-excursion
!     (let* (pos1 pos2 
                  (inhibit-read-only t)
                  inv-prop org-inv-prop
                  is-invisible)
--- 2895,2901 ----
    "Show description of entry at point."
    (interactive)
    (save-excursion
!     (let* (pos1 pos2
                  (inhibit-read-only t)
                  inv-prop org-inv-prop
                  is-invisible)
***************
*** 3049,3055 ****
          (set-process-coding-system proc 'no-conversion 'no-conversion)
          (set-process-sentinel proc 'newsticker--sentinel)))))
  
!   
  (defun newsticker-mouse-browse-url (event)
    "Call `browse-url' for the link of the item at which the EVENT occurred."
    (interactive "e")
--- 3054,3060 ----
          (set-process-coding-system proc 'no-conversion 'no-conversion)
          (set-process-sentinel proc 'newsticker--sentinel)))))
  
! 
  (defun newsticker-mouse-browse-url (event)
    "Call `browse-url' for the link of the item at which the EVENT occurred."
    (interactive "e")
***************
*** 3157,3163 ****
                    (let ((start (match-beginning 0)))
                      (unless (search-forward "-->" nil t)
                        (error "Can't find end of comment"))
!                     (delete-region start (point)))) 
                  ;; And another one (20050702)! If description is HTML
                  ;; encoded and starts with a `<', wrap the whole
                  ;; description in a CDATA expression.  This happened for
--- 3162,3168 ----
                    (let ((start (match-beginning 0)))
                      (unless (search-forward "-->" nil t)
                        (error "Can't find end of comment"))
!                     (delete-region start (point))))
                  ;; And another one (20050702)! If description is HTML
                  ;; encoded and starts with a `<', wrap the whole
                  ;; description in a CDATA expression.  This happened for
***************
*** 3324,3330 ****
                               (guid (if (stringp tguid)
                                         tguid
                                       (car (xml-node-children tguid)))))
!                         ;;(message "guid=%s" guid) 
                          (setq old-item
                                (newsticker--cache-contains newsticker--cache
                                                            name-symbol title
--- 3329,3335 ----
                               (guid (if (stringp tguid)
                                         tguid
                                       (car (xml-node-children tguid)))))
!                         ;;(message "guid=%s" guid)
                          (setq old-item
                                (newsticker--cache-contains newsticker--cache
                                                            name-symbol title
***************
*** 3396,3402 ****
          (when (and imageurl
                     (string-match "%l" newsticker-heading-format))
            (newsticker--image-get name imageurl))))))
!   
  (defun newsticker--display-tick ()
    "Called from the display timer.
  This function calls a display function, according to the variable
--- 3401,3407 ----
          (when (and imageurl
                     (string-match "%l" newsticker-heading-format))
            (newsticker--image-get name imageurl))))))
! 
  (defun newsticker--display-tick ()
    "Called from the display timer.
  This function calls a display function, according to the variable
***************
*** 3828,3844 ****
                                                            feed-name-symbol)))
                      items)
                (put-text-property pos (point) 'feed (car feed))
!               
                ;; insert empty line between feeds
                (let ((p (point)))
                  (insert "\n")
                  (put-text-property p (point) 'hard t)))))
          (append newsticker-url-list newsticker-url-list-defaults))
!   
    (newsticker--buffer-set-faces (point-min) (point-max))
    (newsticker--buffer-set-invisibility (point-min) (point-max))
    (goto-char (point-min)))
!   
  (defun newsticker--buffer-insert-item (item &optional feed-name-symbol)
    "Insert a news item in the current buffer.
  Insert the string PREFIX and a formatted representation of the
--- 3833,3849 ----
                                                            feed-name-symbol)))
                      items)
                (put-text-property pos (point) 'feed (car feed))
! 
                ;; insert empty line between feeds
                (let ((p (point)))
                  (insert "\n")
                  (put-text-property p (point) 'hard t)))))
          (append newsticker-url-list newsticker-url-list-defaults))
! 
    (newsticker--buffer-set-faces (point-min) (point-max))
    (newsticker--buffer-set-invisibility (point-min) (point-max))
    (goto-char (point-min)))
! 
  (defun newsticker--buffer-insert-item (item &optional feed-name-symbol)
    "Insert a news item in the current buffer.
  Insert the string PREFIX and a formatted representation of the
***************
*** 3889,3895 ****
                 (setq format newsticker-item-format)
               (if (eq type 'feed)
                   (setq format newsticker-heading-format)))
!            
             (while (> (length format) 0)
               (let ((prefix (if (> (length format) 1)
                                 (substring format 0 2)
--- 3894,3900 ----
                 (setq format newsticker-item-format)
               (if (eq type 'feed)
                   (setq format newsticker-heading-format)))
! 
             (while (> (length format) 0)
               (let ((prefix (if (> (length format) 1)
                                 (substring format 0 2)
***************
*** 3971,3977 ****
                          ;; in case that the format string contained newlines
                          (put-text-property p (point) 'hard t))
                        (setq format (substring format (match-beginning 2)))))))
!     
             ;; decode HTML if possible...
             (let ((is-rendered-HTML nil))
               (when (and newsticker-html-renderer pos-text-start pos-text-end)
--- 3976,3982 ----
                          ;; in case that the format string contained newlines
                          (put-text-property p (point) 'hard t))
                        (setq format (substring format (match-beginning 2)))))))
! 
             ;; decode HTML if possible...
             (let ((is-rendered-HTML nil))
               (when (and newsticker-html-renderer pos-text-start pos-text-end)
***************
*** 3990,3997 ****
                           (save-excursion
                             (funcall newsticker-html-renderer pos-text-start
                                      pos-text-end)))
-                        ;; FIXME: compiler warning about free variable
-                        ;; w3m-minor-mode-map
                         (cond ((eq newsticker-html-renderer 'w3m-region)
                                (add-text-properties pos (point-max)
                                                     (list 'keymap
--- 3995,4000 ----
***************
*** 4060,4066 ****
               (add-text-properties pos (point)
                                    (list 'nt-title (newsticker--title item)
                                          'nt-desc (newsticker--desc item))))
!     
             (add-text-properties pos (point)
                                  (list 'nt-type type
                                        'nt-face type
--- 4063,4069 ----
               (add-text-properties pos (point)
                                    (list 'nt-title (newsticker--title item)
                                          'nt-desc (newsticker--desc item))))
! 
             (add-text-properties pos (point)
                                  (list 'nt-type type
                                        'nt-face type
***************
*** 4083,4089 ****
             ;; left margin
             ;;(unless (memq type '(feed item))
             ;;(set-left-margin pos (1- (point)) 1))
!            
             ;; save rendered stuff
             (cond ((eq type 'desc)
                  ;; preformatted contents
--- 4086,4092 ----
             ;; left margin
             ;;(unless (memq type '(feed item))
             ;;(set-left-margin pos (1- (point)) 1))
! 
             ;; save rendered stuff
             (cond ((eq type 'desc)
                  ;; preformatted contents
***************
*** 4201,4208 ****
          (put-text-property (max (point-min) pos1) (1- pos2)
                             'invisible
                             (list (intern
!                                   (concat 
!                                    (symbol-name 
                                      (if (eq nt-type 'extra) 'desc nt-type))
                                     "-"
                                     (symbol-name nt-age)))
--- 4204,4211 ----
          (put-text-property (max (point-min) pos1) (1- pos2)
                             'invisible
                             (list (intern
!                                   (concat
!                                    (symbol-name
                                      (if (eq nt-type 'extra) 'desc nt-type))
                                     "-"
                                     (symbol-name nt-age)))
***************
*** 4218,4225 ****
          (put-text-property (1- pos1) (1- pos2)
                             'invisible
                             (list (intern
!                                   (concat 
!                                    (symbol-name 
                                      (if (eq nt-type 'extra) 'desc nt-type))
                                     "-"
                                     (symbol-name nt-age)))
--- 4221,4228 ----
          (put-text-property (1- pos1) (1- pos2)
                             'invisible
                             (list (intern
!                                   (concat
!                                    (symbol-name
                                      (if (eq nt-type 'extra) 'desc nt-type))
                                     "-"
                                     (symbol-name nt-age)))
***************
*** 4253,4259 ****
                       'newsticker-enclosure-face))))
      (when face
        (put-text-property pos1 (max pos1 pos2) 'face face))))
!          
  (defun newsticker--insert-image (img string)
    "Insert IMG with STRING at point.
  This is a work-around for a strange behavior of Emacs versions before
--- 4256,4262 ----
                       'newsticker-enclosure-face))))
      (when face
        (put-text-property pos1 (max pos1 pos2) 'face face))))
! 
  (defun newsticker--insert-image (img string)
    "Insert IMG with STRING at point.
  This is a work-around for a strange behavior of Emacs versions before
***************
*** 4528,4534 ****
                    (newsticker--debug-msg
                     "Item `%s' from %s has expired on %s"
                     (newsticker--title item)
!                    (format-time-string "%Y-%02m-%d, %H:%M" 
                                         (newsticker--time item))
                     (format-time-string "%Y-%02m-%d, %H:%M" exp-time))
                    (setcar (nthcdr 4 item) new-age)))))
--- 4531,4537 ----
                    (newsticker--debug-msg
                     "Item `%s' from %s has expired on %s"
                     (newsticker--title item)
!                    (format-time-string "%Y-%02m-%d, %H:%M"
                                         (newsticker--time item))
                     (format-time-string "%Y-%02m-%d, %H:%M" exp-time))
                    (setcar (nthcdr 4 item) new-age)))))
***************
*** 4746,4752 ****
              (setcdr feed-list (sort (cdr feed-list)
                                      sort-fun)))
            newsticker--cache)))
!   
  (defun newsticker--cache-update (&optional save)
    "Update newsticker cache file.
  If optional argument SAVE is not nil the cache file is saved to disk."
--- 4749,4755 ----
              (setcdr feed-list (sort (cdr feed-list)
                                      sort-fun)))
            newsticker--cache)))
! 
  (defun newsticker--cache-update (&optional save)
    "Update newsticker cache file.
  If optional argument SAVE is not nil the cache file is saved to disk."
***************
*** 4832,4838 ****
                             (list name url nil nil nil) t)))
            outlines))
    (customize-variable 'newsticker-url-list))
!   
  ;; ======================================================================
  ;;; Auto marking
  ;; ======================================================================
--- 4835,4841 ----
                             (list name url nil nil nil) t)))
            outlines))
    (customize-variable 'newsticker-url-list))
! 
  ;; ======================================================================
  ;;; Auto marking
  ;; ======================================================================




reply via email to

[Prev in Thread] Current Thread [Next in Thread]