all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Re: puzzling byte-compile-file message: `=' called for effect
@ 2005-11-15 17:12 Jim Ottaway
  0 siblings, 0 replies; 7+ messages in thread
From: Jim Ottaway @ 2005-11-15 17:12 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 83 bytes --]


Sorry, I meant to cc this to the emacs-devel list, but forgot to add
the header.


[-- Attachment #2: Type: message/rfc822, Size: 1692 bytes --]

From: Jim Ottaway <j.ottaway@lse.ac.uk>
To: help-gnu-emacs@gnu.org
Cc: 
Subject: Re: puzzling byte-compile-file message: `=' called for effect
Date: Tue, 15 Nov 2005 17:09:35 +0000
Message-ID: <87lkzpltww.fsf@lse.ac.uk>

>>>>> Drew Adams <drew.adams@oracle.com> writes:

> The term "for effect" is correct here, but I don't think it is as clear as
> it could be. The compiler is suggesting that, if the `=' expression is
> useful, it must be useful because of side effects that occur during its
> evaluation.

> I think the compiler should explicitly say that the resulting _value_ of the
> `=' expression is not used. It might also say that the `=' expression may be
> useful for its side effects (or side effects of its subexpressions), but the
> resulting value has no effect on the overall code. At a minimum, the word
> "side" should be added to "effect".

Yes, I agree.  I was so puzzled by the elliptical message that I
missed the obvious error in my code.

> The message might better say:

>  "Warning: `=' return value ignored. Is the expression useful
>            for its side effects?"

Something like that, I agree, even simply "`=' called for side effect
alone".

> Ccing emacs-devel, as I think the message should be clarified
> somehow. 

Me too.

Regards,

-- 
Jim Ottaway

[-- Attachment #3: Type: text/plain, Size: 18 bytes --]



-- 
Jim Ottaway

[-- Attachment #4: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread
[parent not found: <mailman.15359.1132072766.20277.help-gnu-emacs@gnu.org>]
* puzzling byte-compile-file message: `=' called for effect
@ 2005-11-15 14:42 Jim Ottaway
  0 siblings, 0 replies; 7+ messages in thread
From: Jim Ottaway @ 2005-11-15 14:42 UTC (permalink / raw)



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?

-- 
Jim Ottaway

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2005-11-15 23:22 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.15349.1132065762.20277.help-gnu-emacs@gnu.org>
2005-11-15 16:07 ` puzzling byte-compile-file message: `=' called for effect Yevgeniy Makarov
2005-11-15 16:19   ` Jim Ottaway
2005-11-15 16:39   ` Drew Adams
2005-11-15 23:22     ` Richard M. Stallman
2005-11-15 17:12 Jim Ottaway
     [not found] <mailman.15359.1132072766.20277.help-gnu-emacs@gnu.org>
2005-11-15 17:09 ` Jim Ottaway
  -- strict thread matches above, loose matches on Subject: below --
2005-11-15 14:42 Jim Ottaway

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.