emacs-devel
[Top][All Lists]
Advanced

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

Bug references in newsticker's docstrings


From: Juanma Barranquero
Subject: Bug references in newsticker's docstrings
Date: Mon, 27 Nov 2006 12:18:06 +0100

net/newsticker.el contains some bits from its pre-CVS past that should
be updated:

 (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
21.3.50.  Images inserted with `insert-image' vanished after doing
`fill-region'."
  ;; This should work:
  ;;(insert-image img string)
  ;; but it does not. Therefore we do this, which should be equivalent!
  (let ((pos (point)))
    ;;(insert string)
    (insert ":-)")
    (add-text-properties pos (point) (list 'display img))))

 (defun newsticker--buffer-redraw ()
  "Sometimes (CVS) Emacs forgets to update the window..."
  (if (fboundp 'force-window-update)
      (force-window-update (current-buffer))
    (redraw-frame (selected-frame)))
  (run-hooks 'newsticker-buffer-change-hook)
  (sit-for 0))

At the very least, the docstrings should be changed IMO. But the
question is: are they still relevant, i.e., do they refer to real
bugs, or it is now cargo cult and should be fixed?

AFAICS, the comment in `newsticker--insert-image' is not true anymore
(at least, no image has vanished in my tests).

`newsticker--buffer-redraw' is used mostly after calling
`add-to-visibility-spec' and `remove-from-visibility-spec', and in two
cases after adding or removing text properties. Should
`force-window-update' (or even `redraw-frame') be necessary after
that? (If so, `force-window-update' can be directly called, as it is
always going to be defined anyway.)

                   /L/e/k/t/u




reply via email to

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