unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Juanma Barranquero" <lekktu@gmail.com>
Subject: Bug references in newsticker's docstrings
Date: Mon, 27 Nov 2006 12:18:06 +0100	[thread overview]
Message-ID: <f7ccd24b0611270318n4761b749p7485d89589f7391a@mail.gmail.com> (raw)

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	other threads:[~2006-11-27 11:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-27 11:18 Juanma Barranquero [this message]
2007-02-03 17:36 ` Bug references in newsticker's docstrings Chong Yidong

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=f7ccd24b0611270318n4761b749p7485d89589f7391a@mail.gmail.com \
    --to=lekktu@gmail.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).