From: Yevgeniy Makarov <emakarov@cs.indiana.edu>
Subject: Re: puzzling byte-compile-file message: `=' called for effect
Date: Tue, 15 Nov 2005 11:07:43 -0500 [thread overview]
Message-ID: <437A07CF.2030008@cs.indiana.edu> (raw)
In-Reply-To: <mailman.15349.1132065762.20277.help-gnu-emacs@gnu.org>
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
next parent reply other threads:[~2005-11-15 16:07 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.15349.1132065762.20277.help-gnu-emacs@gnu.org>
2005-11-15 16:07 ` Yevgeniy Makarov [this message]
2005-11-15 16:19 ` puzzling byte-compile-file message: `=' called for effect Jim Ottaway
2005-11-15 16:39 ` Drew Adams
2005-11-15 23:22 ` Richard M. Stallman
[not found] <mailman.15359.1132072766.20277.help-gnu-emacs@gnu.org>
2005-11-15 17:09 ` Jim Ottaway
2005-11-15 14:42 Jim Ottaway
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=437A07CF.2030008@cs.indiana.edu \
--to=emakarov@cs.indiana.edu \
/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.
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).