emacs-devel
[Top][All Lists]
Advanced

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

Re: how-many/count-matches for non-interactive use


From: Richard Stallman
Subject: Re: how-many/count-matches for non-interactive use
Date: Sun, 24 Oct 2004 13:09:44 -0400

    Here are twenty examples:

I looked first at elide-head, and it definitely has a bug.

          (if (not (and beg end))
              (if (interactive-p)
                  (error "No header found"))

This means that the error won't occur when the command is called from
a macro.  The other call in elide.el, which is in elide-head-show, has
a similar bug.  I will change both of them to call message instead.

Next I looked at shadow-copy-files.  The code may be correct, but it
is written in a confusing way that makes it to prove that to oneself.

The rest of them seem to be correct.  It was luck that I found the
incorrect ones first.  Still, this experience shows that there
are more problems lurking here.

I wish you had made a list of the functions you didn't check,
because we should ask the maintainers of those files to check them.


Could one of you who uses shadowfile.el check whether the following
change is really correct?

*** shadowfile.el       01 Oct 2004 13:54:45 -0400      1.22
--- shadowfile.el       24 Oct 2004 04:32:07 -0400      
***************
*** 518,525 ****
  `shadow-save-buffers-kill-emacs', so it is not usually necessary to
  call it manually."
    (interactive "P")
!   (if (and (not shadow-files-to-copy) (interactive-p))
!       (message "No files need to be shadowed.")
      (save-excursion
        (map-y-or-n-p (function
                     (lambda (pair)
--- 518,526 ----
  `shadow-save-buffers-kill-emacs', so it is not usually necessary to
  call it manually."
    (interactive "P")
!   (if (not shadow-files-to-copy)
!       (if (interactive-p)
!         (message "No files need to be shadowed."))
      (save-excursion
        (map-y-or-n-p (function
                     (lambda (pair)




reply via email to

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