From unknown Sat Aug 16 20:58:40 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#16067 <16067@debbugs.gnu.org> To: bug#16067 <16067@debbugs.gnu.org> Subject: Status: 24.3; Documentation bug: Example code in (elisp) Anonymous Functions Reply-To: bug#16067 <16067@debbugs.gnu.org> Date: Sun, 17 Aug 2025 03:58:40 +0000 retitle 16067 24.3; Documentation bug: Example code in (elisp) Anonymous Fu= nctions reassign 16067 emacs submitter 16067 "Phil Sainty" severity 16067 minor thanks From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 06 01:19:24 2013 Received: (at submit) by debbugs.gnu.org; 6 Dec 2013 06:19:24 +0000 Received: from localhost ([127.0.0.1]:32836 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vool1-0006W0-E7 for submit@debbugs.gnu.org; Fri, 06 Dec 2013 01:19:24 -0500 Received: from eggs.gnu.org ([208.118.235.92]:37778) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vooky-0006Vq-88 for submit@debbugs.gnu.org; Fri, 06 Dec 2013 01:19:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vookq-0001sW-QI for submit@debbugs.gnu.org; Fri, 06 Dec 2013 01:19:19 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:40293) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vookq-0001sS-N6 for submit@debbugs.gnu.org; Fri, 06 Dec 2013 01:19:12 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39476) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vookk-0001P6-6N for bug-gnu-emacs@gnu.org; Fri, 06 Dec 2013 01:19:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vookd-0001qE-Uo for bug-gnu-emacs@gnu.org; Fri, 06 Dec 2013 01:19:06 -0500 Received: from nctlincom02.orcon.net.nz ([60.234.4.76]:55412) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vookd-0001pZ-Cr for bug-gnu-emacs@gnu.org; Fri, 06 Dec 2013 01:18:59 -0500 Received: from mx5.orcon.net.nz (mx5.orcon.net.nz [219.88.242.55]) by nctlincom02.orcon.net.nz (8.14.3/8.14.3/Debian-9.4) with ESMTP id rB66NoGh019913 for ; Fri, 6 Dec 2013 19:23:51 +1300 Received: from Debian-exim by mx5.orcon.net.nz with local (Exim 4.69) (envelope-from ) id 1VookX-00043F-5c for bug-gnu-emacs@gnu.org; Fri, 06 Dec 2013 19:18:53 +1300 Received: from [172.16.100.200] (helo=mail.orcon.net.nz) by mx5.orcon.net.nz with esmtp (Exim 4.69) (envelope-from ) id 1VookX-000438-2k for bug-gnu-emacs@gnu.org; Fri, 06 Dec 2013 19:18:53 +1300 Received: from 202.78.240.7 (SquirrelMail authenticated user 15631029) by mail.orcon.net.nz with HTTP; Fri, 6 Dec 2013 19:18:53 +1300 (NZDT) Message-ID: <46834.202.78.240.7.1386310733.squirrel@mail.orcon.net.nz> Date: Fri, 6 Dec 2013 19:18:53 +1300 (NZDT) Subject: 24.3; Documentation bug: Example code in (elisp) Anonymous Functions From: "Phil Sainty" To: bug-gnu-emacs@gnu.org User-Agent: SquirrelMail/1.4.5 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal X-DSPAM-Check: by mx5.orcon.net.nz on Fri, 06 Dec 2013 19:18:53 +1300 X-DSPAM-Result: Innocent X-DSPAM-Processed: Fri Dec 6 19:18:53 2013 X-DSPAM-Confidence: 0.5730 X-DSPAM-Probability: 0.0000 X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN, default) X-CanIt-Geo: No geolocation information available for 172.16.100.200 X-CanItPRO-Stream: base:default X-Canit-Stats-ID: 05KW6nPVL - 2ef5be4a77cb - 20131206 X-Scanned-By: CanIt (www . roaringpenguin . com) on 172.16.100.175 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Re: Info node (elisp) Anonymous Functions The final piece of code is prefixed with "This would not happen if, say, you had constructed the anonymous function by quoting it as a list", but the code then fails to actually do that. It is actually identical to the initial version of the function: > In the following example, we define a `change-property' function > that takes a function as its third argument, followed by a > `double-property' function that makes use of `change-property' by > passing it an anonymous function: > > (defun change-property (symbol prop function) > (let ((value (get symbol prop))) > (put symbol prop (funcall function value)))) > > (defun double-property (symbol prop) > (change-property symbol prop (lambda (x) (* 2 x)))) > > Note that we do not quote the `lambda' form. > > If you compile the above code, the anonymous function is also > compiled. This would not happen if, say, you had constructed the > anonymous function by quoting it as a list: > > (defun double-property (symbol prop) > (change-property symbol prop (lambda (x) (* 2 x)))) > > In that case, the anonymous function is kept as a lambda expression in > the compiled code. The byte-compiler cannot assume this list is a > function, even though it looks like one, since it does not know that > `change-property' intends to use it as a function. In GNU Emacs 24.3.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.20.1) of 2013-12-06 on scmp-qa Windowing system distributor `The X.Org Foundation', version 11.0.11103000 System Description: Ubuntu 10.04.4 LTS Configured using: `configure '--prefix=/var/data/emacs/emacs24/emacs-24.3/usr/local' '--without-sound'' Important settings: value of $LANG: en_NZ.UTF-8 locale-coding-system: utf-8 default enable-multibyte-characters: t Major mode: Info Minor modes in effect: my-keys-minor-mode: t yas/global-mode: t savehist-mode: t global-smart-tab-mode: t show-paren-mode: t cua-mode: t minibuffer-depth-indicate-mode: t winner-mode: t global-subword-mode: t subword-mode: t global-hl-line-mode: t display-time-mode: t keep-buffers-mode: t auto-compile-on-load-mode: t auto-compile-on-save-mode: t tooltip-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t buffer-read-only: t line-number-mode: t transient-mark-mode: t Recent input: C-a C-h i g ( e l i s p ) SPC A n o n y m o u s SPC F u n c t i o n s C-s C-w C-w C-w C-w C-w C-w C-w C-w C-w C-w C-w C-w C-w C-w C-w C-w C-w C-w C-w C-w C-w C-w C-w C-w C-w C-w C-w C-w C-s C-s C-s C-s C-s C-s C-a C-SPC M-w M-x r e p o r t Recent messages: Loading /root/.emacs.d/.mc-lists.el (source)...done Waiting for `el-get' to complete... done post-merge git hook not installed. Init file loaded in 24.09s For information about GNU Emacs and the GNU system, type C-a. Package assoc is obsolete! Composing main Info directory...done Mark set Mark saved where search started byte-code: End of buffer [2 times] Load-path shadows: /root/.emacs.d/el-get/scratch/el-get hides /root/.emacs.d/el-get/el-get/el-get /root/.emacs.d/lisp/python hides /var/data/emacs/emacs24/emacs-24.3/usr/local/share/emacs/24.3/lisp/progmodes/python /root/.emacs.d/el-get/magit/.dir-locals hides /var/data/emacs/emacs24/emacs-24.3/usr/local/share/emacs/24.3/lisp/gnus/.dir-locals /root/.emacs.d/lisp/sym-comp hides /var/data/emacs/emacs24/emacs-24.3/usr/local/share/emacs/24.3/lisp/obsolete/sym-comp Features: (shadow sort mail-extr emacsbug message format-spec rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mail-utils misearch multi-isearch lexbind-mode disp-table whitespace eldoc rainbow-delimiters idle-highlight etags-select-autoloads idle-highlight-autoloads project-local-variables-autoloads wtf-autoloads yasnippet-bundle-autoloads yasnippet-bundle dropdown-list yasnippet assoc my-projects my-session savehist desktop my-theme hl-sexp zenburn-theme my-libraries sudo framemove windmove my-version-control my-images my-text my-programming my-python my-whitespace ws-trim my-indentation smart-tab my-rectangles my-utilities browse-kill-ring derived my-configuration dired-details dired-x uniquify highlight-parentheses paren delsel cua-base ffap url-parse auth-source eieio gnus-util mm-util mail-prsvr password-cache url-vars mb-depth winner ring subword hl-line time cus-edit cus-start cus-load wid-edit my-externals .loaddefs dtrt-indent multiple-cursors mc-separate-operations rectangular-region-mode mc-mark-pop mc-mark-more thingatpt mc-cycle-cursors mc-edit-lines multiple-cursors-core rect sauron windcycle iedit transpose-frame rainbow-mode mo-git-blame info notify dbus xml keep-buffers el-get cl-macs gv help-mode easymenu autoload cl dired my-elpa package my-local my-keybindings easy-mmode edmacro kmacro jka-compr byte-opt warnings auto-compile advice help-fns advice-preload packed cl-lib bytecomp byte-compile cconv time-date tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process dbusbind dynamic-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs) From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 06 09:17:30 2013 Received: (at 16067-done) by debbugs.gnu.org; 6 Dec 2013 14:17:30 +0000 Received: from localhost ([127.0.0.1]:33442 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VowDh-0002l4-Nb for submit@debbugs.gnu.org; Fri, 06 Dec 2013 09:17:29 -0500 Received: from fencepost.gnu.org ([208.118.235.10]:43019) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VowDf-0002kx-Nr for 16067-done@debbugs.gnu.org; Fri, 06 Dec 2013 09:17:28 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1VowDe-0008Up-AQ; Fri, 06 Dec 2013 09:17:26 -0500 From: Glenn Morris To: 16067-done@debbugs.gnu.org Subject: Re: bug#16067: 24.3; Documentation bug: Example code in (elisp) Anonymous Functions References: <46834.202.78.240.7.1386310733.squirrel@mail.orcon.net.nz> X-Spook: Verisign morse militia world domination Rule Psix DES X-Ran: 9=^2^@>"8+VT6'8zu?8W["os3C?[5Oh}b5mpcCv[8su,2X&Zsc\,HsgINUkP;w`)C7A?q) X-Hue: black X-Debbugs-No-Ack: yes X-Attribution: GM Date: Fri, 06 Dec 2013 09:17:26 -0500 In-Reply-To: <46834.202.78.240.7.1386310733.squirrel@mail.orcon.net.nz> (Phil Sainty's message of "Fri, 6 Dec 2013 19:18:53 +1300 (NZDT)") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -5.2 (-----) X-Debbugs-Envelope-To: 16067-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.2 (-----) Version: 24.4 Thanks. This was fixed some months ago in the sources. From unknown Sat Aug 16 20:58:40 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 04 Jan 2014 12:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator