* lexical-let void function @ 2022-03-26 23:29 GNU Hacker 2022-03-26 23:42 ` Óscar Fuentes 2022-03-26 23:46 ` Emanuel Berg via Users list for the GNU Emacs text editor 0 siblings, 2 replies; 7+ messages in thread From: GNU Hacker @ 2022-03-26 23:29 UTC (permalink / raw) To: Help GNU Emacs I find `lexical-let' func in a old emacs script, but it is a void function in my emacs version 28.0.92 maybe require it any emacs package? ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: lexical-let void function 2022-03-26 23:29 lexical-let void function GNU Hacker @ 2022-03-26 23:42 ` Óscar Fuentes 2022-03-26 23:54 ` Emanuel Berg via Users list for the GNU Emacs text editor 2022-03-27 0:08 ` GNU Hacker 2022-03-26 23:46 ` Emanuel Berg via Users list for the GNU Emacs text editor 1 sibling, 2 replies; 7+ messages in thread From: Óscar Fuentes @ 2022-03-26 23:42 UTC (permalink / raw) To: help-gnu-emacs GNU Hacker <project@gnuhacker.org> writes: > I find `lexical-let' func in a old emacs script, but it is a void > function in my emacs version 28.0.92 > > maybe require it any emacs package? (require 'cl) Emacs now provides "native" lexical binding. See the "Lexical binding" node in the Elisp manual. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: lexical-let void function 2022-03-26 23:42 ` Óscar Fuentes @ 2022-03-26 23:54 ` Emanuel Berg via Users list for the GNU Emacs text editor 2022-03-27 0:08 ` GNU Hacker 1 sibling, 0 replies; 7+ messages in thread From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2022-03-26 23:54 UTC (permalink / raw) To: help-gnu-emacs Óscar Fuentes wrote: >> maybe require it any emacs package? > > (require 'cl) But that's deprecated and it isn't in `cl-lib' ... See? I told you ... > Emacs now provides "native" lexical binding Sure, but the CL extentions are in Elisp as well and they are shipped with vanilla Emacs. (Just saying, I agree it's much better LOL.) > See the "Lexical binding" node in the Elisp manual. :) -- underground experts united https://dataswamp.org/~incal ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: lexical-let void function 2022-03-26 23:42 ` Óscar Fuentes 2022-03-26 23:54 ` Emanuel Berg via Users list for the GNU Emacs text editor @ 2022-03-27 0:08 ` GNU Hacker 2022-03-27 0:40 ` Emanuel Berg via Users list for the GNU Emacs text editor 2022-03-27 0:49 ` Emanuel Berg via Users list for the GNU Emacs text editor 1 sibling, 2 replies; 7+ messages in thread From: GNU Hacker @ 2022-03-27 0:08 UTC (permalink / raw) To: help-gnu-emacs Óscar Fuentes <ofv@wanadoo.es> writes: > GNU Hacker <project@gnuhacker.org> writes: >> I find `lexical-let' func in a old emacs script, but it is a void >> function in my emacs version 28.0.92 >> maybe require it any emacs package? > (require 'cl) > Emacs now provides "native" lexical binding. See the "Lexical binding" > node in the Elisp manual. Package cl is deprecated in emacs 28.0.92 I fixed it adding -*- lexical-binding: t; -*- to the first line Just do M-x elisp-enable-lexical-binding -- Emacs Lover. FSF Member. Free/Libre Software supporter. stallmansupport.org - Disinformation succeeds because so many people care deeply about injustice but do not take the time to check the facts. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: lexical-let void function 2022-03-27 0:08 ` GNU Hacker @ 2022-03-27 0:40 ` Emanuel Berg via Users list for the GNU Emacs text editor 2022-03-27 0:49 ` Emanuel Berg via Users list for the GNU Emacs text editor 1 sibling, 0 replies; 7+ messages in thread From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2022-03-27 0:40 UTC (permalink / raw) To: help-gnu-emacs GNU Hacker wrote: > I fixed it adding > > -*- lexical-binding: t; -*- > > to the first line Not adding ;;; -*- lexical-binding: t -*- in Joe Sixpack Elisp is considered a bug today, even. And I guess I agree since I always thought such a cookie is a poor man's solution! Badnesses: not the Lisp syntax, a misuse of comment notation, reminds me of the C preprocessor, etc ... Sorry to repeat this like a paleo-parrot on Terra Prima, but give us explicit code i.e. dlet/llet/slet ... (Where `let' would be an alias to `llet', or the other way around perhaps.) > Just do > > M-x elisp-enable-lexical-binding Fragile. -- underground experts united https://dataswamp.org/~incal ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: lexical-let void function 2022-03-27 0:08 ` GNU Hacker 2022-03-27 0:40 ` Emanuel Berg via Users list for the GNU Emacs text editor @ 2022-03-27 0:49 ` Emanuel Berg via Users list for the GNU Emacs text editor 1 sibling, 0 replies; 7+ messages in thread From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2022-03-27 0:49 UTC (permalink / raw) To: help-gnu-emacs GNU Hacker wrote: > I fixed it adding > > -*- lexical-binding: t; -*- > > to the first line Now fix all the rest: $ grep -L lexical-binding **/*.el -- underground experts united https://dataswamp.org/~incal ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: lexical-let void function 2022-03-26 23:29 lexical-let void function GNU Hacker 2022-03-26 23:42 ` Óscar Fuentes @ 2022-03-26 23:46 ` Emanuel Berg via Users list for the GNU Emacs text editor 1 sibling, 0 replies; 7+ messages in thread From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2022-03-26 23:46 UTC (permalink / raw) To: help-gnu-emacs GNU Hacker wrote: > I find `lexical-let' func in a old emacs script, but it is > a void function in my emacs version 28.0.92 > > maybe require it any emacs package? My intuition tells me to avoid using that ... Use ;;; -*- lexical-binding: t -*- topmost and then just `let' even tho it's ugly. Something's up with `lexical-let' ... but don't know what? But as for what it is, it is lexical-let is a Lisp macro in ‘cl.el’. (lexical-let BINDINGS BODY) Like ‘let’, but lexically scoped. The main visible difference is that lambdas inside BODY will create lexical closures as in Common Lisp. Probably introduced at or before Emacs version 24.3. That docstring isn't good either BTW as has been mentioned ... -- underground experts united https://dataswamp.org/~incal ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2022-03-27 0:49 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2022-03-26 23:29 lexical-let void function GNU Hacker 2022-03-26 23:42 ` Óscar Fuentes 2022-03-26 23:54 ` Emanuel Berg via Users list for the GNU Emacs text editor 2022-03-27 0:08 ` GNU Hacker 2022-03-27 0:40 ` Emanuel Berg via Users list for the GNU Emacs text editor 2022-03-27 0:49 ` Emanuel Berg via Users list for the GNU Emacs text editor 2022-03-26 23:46 ` Emanuel Berg via Users list for the GNU Emacs text editor
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.