emacs-devel
[Top][All Lists]
Advanced

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

Re: master d5bf26f488b: Move side-effect-free and pure declarations to f


From: Robert Pluim
Subject: Re: master d5bf26f488b: Move side-effect-free and pure declarations to function definitions
Date: Fri, 17 Feb 2023 16:23:21 +0100

>>>>> On Fri, 17 Feb 2023 09:19:46 -0500 (EST), Mattias Engdegård 
>>>>> <mattiase@acm.org> said:

    Mattias> branch: master
    Mattias> commit d5bf26f488b7968feed9f43e612a90da2aab15a8
    Mattias> Author: Mattias Engdegård <mattiase@acm.org>
    Mattias> Commit: Mattias Engdegård <mattiase@acm.org>

    Mattias>     Move side-effect-free and pure declarations to function 
definitions
    
    Mattias>     Some Lisp functions still had their `side-effect-free` and 
`pure`
    Mattias>     properties declared in byte-opt.el; do it at their definition 
instead.
    Mattias>     The lists in byte-opt.el now only contain functions 
implemented in C
    Mattias>     and function aliases.

This causes the following failure to bootstrap:

Loading env (source)...

Error: void-function (macroexp-warn-and-return)
  mapbacktrace(#[1028 
"\1\4\203\24\0\301\302!\210\300\4!\210\301\303!\210\202\35\0\301\304!\210\3\3B\262\1\211\2035\0\300\1@!\210\211A\211\262\2\2035\0\301\305!\210\202!\0\301\306!\207"
 [prin1 princ "  " "(" "  (" " " ")\n"] 7 "\n\n(fn EVALD FUNC ARGS FLAGS)"])
  debug-early-backtrace()
  debug-early(error (void-function macroexp-warn-and-return))
  macroexp-warn-and-return("‘declare’ after ‘interactive’" nil nil t (declare 
(side-effect-free t)))
  #[771 "\2\300\301\4!\302\211\303\6\6%\4\242B\240\207" 
[macroexp-warn-and-return format-message nil t] 10 "\n\n(fn WARNINGS MSG 
FORM)"]((nil) "`declare' after `interactive'" (declare (side-effect-free t)))
  byte-run--parse-body(("Get the value of environment variable 
VARIABLE.\nVARIABLE should be a string.  Value is nil if VARIABLE is undefined 
in\nthe environment.  Otherwise, value is a string.\n\nIf optional parameter 
FRAME is non-nil, then it should be a\nframe.  This function will look up 
VARIABLE in its `environment'\nparameter.\n\nOtherwise, this function searches 
`process-environment' for\nVARIABLE.  If it is not found there, then it 
continues the search\nin the environment list of the selected frame." 
(interactive (list (read-envvar-name "Get environment variable: " t))) (declare 
(side-effect-free t)) (let ((value (getenv-internal (if (multibyte-string-p 
variable) (encode-coding-string variable locale-coding-system) variable) (and 
frame (assq 'environment (frame-parameters frame)))))) (if (and 
enable-multibyte-characters value) (setq value (decode-coding-string value 
locale-coding-system))) (when (called-interactively-p 'interactive) (message 
"%s" (if value value "Not set"))) value)) t)
  #[642 
"\2\204\11\0\301\302\4\"\210\1<\203\30\0\303\304\305\306\5\"\"\203\35\0\301\307\3\"\210\310\1\304\"\211@\1A@\311\38\312\48\313\58\3\205>\0\314\6\11\6\11\6\6A\315\10%\1\3\244\262\3\211A\3\244\262\3\3\203R\0\3\3B\262\3\5\203[\0\5\3B\262\3\2\204b\0\316\262\3\317\320\6\13D\321\322\6\f\6\7BBDE\1\203|\0\323\1\3@BB\207\207"
 [defun-declarations-alist error "Cannot define '%s' as a function" delq t 
mapcar symbolp "Malformed arglist: %s" byte-run--parse-body 2 3 4 
byte-run--parse-declarations defun (nil) defalias quote function lambda prog1] 
16 ("/home/rpluim/repos/emacs/lisp/emacs-lisp/byte-run.elc" . 9649)](getenv 
(variable &optional frame) "Get the value of environment variable 
VARIABLE.\nVARIABLE should be a string.  Value is nil if VARIABLE is undefined 
in\nthe environment.  Otherwise, value is a string.\n\nIf optional parameter 
FRAME is non-nil, then it should be a\nframe.  This function will look up 
VARIABLE in its `environment'\nparameter.\n\nOtherwise, this function searches 
`process-environment' for\nVARIABLE.  If it is not found there, then it 
continues the search\nin the environment list of the selected frame." 
(interactive (list (read-envvar-name "Get environment variable: " t))) (declare 
(side-effect-free t)) (let ((value (getenv-internal (if (multibyte-string-p 
variable) (encode-coding-string variable locale-coding-system) variable) (and 
frame (assq 'environment (frame-parameters frame)))))) (if (and 
enable-multibyte-characters value) (setq value (decode-coding-string value 
locale-coding-system))) (when (called-interactively-p 'interactive) (message 
"%s" (if value value "Not set"))) value))
  (defun getenv (variable &optional frame) "Get the value of environment 
variable VARIABLE.\nVARIABLE should be a string.  Value is nil if VARIABLE is 
undefined in\nthe environment.  Otherwise, value is a string.\n\nIf optional 
parameter FRAME is non-nil, then it should be a\nframe.  This function will 
look up VARIABLE in its `environment'\nparameter.\n\nOtherwise, this function 
searches `process-environment' for\nVARIABLE.  If it is not found there, then 
it continues the search\nin the environment list of the selected frame." 
(interactive (list (read-envvar-name "Get environment variable: " t))) (declare 
(side-effect-free t)) (let ((value (getenv-internal (if (multibyte-string-p 
variable) (encode-coding-string variable locale-coding-system) variable) (and 
frame (assq 'environment (frame-parameters frame)))))) (if (and 
enable-multibyte-characters value) (setq value (decode-coding-string value 
locale-coding-system))) (when (called-interactively-p 'interactive) (message 
"%s" (if value value "Not set"))) value))
  load("env")
  load("loadup.el")

Iʼll push the obvious fix to master once savannah comes back to life
if nodbody beats me to it.

Robert
-- 



reply via email to

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