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

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

Re: patn-insert.el requires cl which is deprecated


From: Raymond Zeitler
Subject: Re: patn-insert.el requires cl which is deprecated
Date: Sun, 12 Mar 2023 21:06:18 +0000 (UTC)

  On March 4 Stefan Monnier wrote:
> it's probably best to byte-compile it with (one of) the last> version of 
> Emacs with which it still works (it might give you hints> about uses of 
> obsolete functionality).
Although it works, it does not compile.  The compiler gives a warningabout a 
macro and then actually reports an error for the firstfunction that uses the 
macro.  Included below are the compiler messageand the macro.
Compiling file 
c:/Users/Public/Programs/emacs-25.2-x86_64/site-lisp/patn-insert.el at Sun Mar 
12 16:27:43 2023patn-insert.el:56:1:Warning: cl package required at runtime
In for-var-low-high:patn-insert.el:58:48:Warning: '(\` (let ((((\, var)) ((\, 
low))) (((\,    high-save)) ((\, high)))) (while (<= ((\, var)) ((\, 
high-save))) ((\,@    body)) (incf ((\, var))))))' is a malformed 
functionpatn-insert.el:72:1:Error: Invalid function: (\` (let ((((\, var)) ((\, 
low))) (((\, high-save)) ((\, high)))) (while (<= ((\, var)) ((\, high-save))) 
((\,@ body)) (incf ((\, var))))))
(defmacro for-var-low-high (var low high &rest body)  "For VAR from LOW to HIGH 
do BODY.  LOW and HIGH are evaluatedonce each.  No error checking -- barfs if 
either isn't a number.VAR is let-bound."  (let ((high-save (gensym)))    (`     
(let (( (, var) (, low))           ( (, high-save) (, high))           )       
(while (<= (, var) (, high-save))         (,@ body)         (incf (, var))      
   )))))


reply via email to

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