help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: puzzling byte-compile-file message: `=' called for effect


From: Yevgeniy Makarov
Subject: Re: puzzling byte-compile-file message: `=' called for effect
Date: Tue, 15 Nov 2005 11:07:43 -0500
User-agent: Mozilla Thunderbird 1.0.6 (X11/20050729)

Jim Ottaway wrote:
When byte-compiling a file, I get this message:

In nl-publish-markup-list:
nested-lists.el:395:19:Warning: `=' called for effect

What does this mean?  I grepped for 'for effect' in Emacs's
lisp/emacs-lisp subdirectory, and found the relevant parts of
byte-opt.el, but I am no wiser.

The code with the '=' in it is:

(when (and nl-paras-fixed-p
                     (save-excursion
                       (goto-char nl-markup-start)
                       (goto-char (muse-line-beginning-position))
                       (= (forward-line -1) 0)
                       (looking-at "^\\S-")))
            (with-current-buffer nl-temp-buffer
              (goto-char (point-min))
              (insert "\n\n")))

Any ideas? Does it mean that the byte-compiler thinks that
(forward-line -1) will always return 0 at that point? Or does 'for
effect' mean something else?


Again, I am not an expert, so I don't know if this is useful. But the fact is that save-excursion executes its arguments in turn and returns the value of the last one. Therefore, the value of (= (forward-line -1) 0) is not used. This line produces a side effect, however, namely, (forward-line -1). But the wrapping of = around it does not make sense because its value is irrelevant for the rest of the program.

Yevgeniy


reply via email to

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