[Top][All Lists]

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

RE: byte compiler warnings for different Emacs versions

From: Drew Adams
Subject: RE: byte compiler warnings for different Emacs versions
Date: Wed, 10 Nov 2004 16:34:02 -0800

If the attached file is byte-compiled in Emacs 20 and the resulting .elc
file is loaded in Emacs 21, then the error below results. If the same .elc
is loaded in Emacs 20, there is no error. If the same source file is
byte-compiled in Emacs 21 and the resulting file is loaded in Emacs 21, then
there is no error.

I'm not sure how to localize the error better, but I'm passing this along in
hopes that it may be helpful in revealing an existing bug in the byte

Debugger entered--Lisp error: (invalid-function (macro . #[(mode doc
&optional init-value lighter keymap &rest body) "A!...
Use the command `%s' to change this variable." make-variable-buffer-local
boundp byte-compile-current-file defcustom "Non-nil if %s is enabled.
See the command `%s' for a description of this minor-mode.
Setting this variable directly does not take effect;
use either \\[customize] or the function `%s'." :set (quote
custom-set-minor-mode) :initialize (quote custom-initialize-default) append
(:type (quote boolean)) file-name-nondirectory file-name-sans-extension
defun &optional arg "Toggle %s on or off.
Interactively, with no prefix argument, toggle the mode.
With universal prefix ARG turn mode on.
With zero or negative ARG turn mode off.
\\{%s}" (interactive (list (or current-prefix-arg (quote toggle)))) setq
cond (eq arg (quote toggle)) not (arg (> (prefix-numeric-value arg) 0)) if
null message "Toggling %s off; better pass an explicit argument." (nil)
run-hooks (interactive-p) customize-mark-as-set unless pretty-name globalp
group extra-args extra-keywords require hook hook-on hook-off keyw
keymap-sym load-file-name curfile doc (current-message) "%s %%sabled" ("en"
"dis") (force-mode-line-update) :autoload-end "Hook run at the end of
function `%s'." (:type (quote hook)) let m ((keymapp m) m) ((listp m)
(easy-mmode-define-keymap m)) error "Invalid keymap %S" "Keymap for `%s'."
add-minor-mode symbol-value and equal eval-after-load (1 -1)] 23
("c:/Emacs-21.3.50/lisp/emacs-lisp/easy-mmode.elc" . 1391)]))
  define-minor-mode(nil "Toggle Delete Selection mode.\nWith prefix ARG,
turn Delete Selection mode on if and only if ARG is\npositive.\n\nWhen
Delete Selection mode is enabled, Transient Mark mode is also\nenabled and
typed text replaces the selection if the selection is\nactive.  Otherwise,
typed text is just inserted at point regardless of\nany selection." :global
t :group editing-basics (tooltip-hide) nil)
  load("c:/drews-lisp-20/delsel.elc" nil nil t)



-----Original Message-----From: Stefan Monnier
> [Note: If the opposite test is made (conditionalize code for >= 21 and
> byte-compile in Emacs 20), no such warnings are issued, so this changed
> behavior is presumably a useful feature.]

The Emacs-20 byte-compiler simply doesn't have this warning at all, which is
why it won't say anything.  The condition in the `when' has nothing to do
with what you're seeing.

If a file byte-compiled on Emacs-20 doesn't run on Emacs-21 it's generally
considered as a bug (but not the other way around).

Attachment: delsel.el
Description: Binary data

reply via email to

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