GNU bug report logs - #16067
24.3; Documentation bug: Example code in (elisp) Anonymous Functions

Previous Next

Package: emacs;

Reported by: "Phil Sainty" <psainty <at> orcon.net.nz>

Date: Fri, 6 Dec 2013 06:20:01 UTC

Severity: minor

Found in version 24.3

Fixed in version 24.4

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 16067 in the body.
You can then email your comments to 16067 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#16067; Package emacs. (Fri, 06 Dec 2013 06:20:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Phil Sainty" <psainty <at> orcon.net.nz>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 06 Dec 2013 06:20:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: "Phil Sainty" <psainty <at> orcon.net.nz>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.3; Documentation bug: Example code in (elisp) Anonymous Functions
Date: Fri, 6 Dec 2013 19:18:53 +1300 (NZDT)
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:
<down-mouse-1> <mouse-1> 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 <return>
<C-end> <up> <up> <up> <up> <up> <up> <up> <up> <up>
<up> <up> <up> <up> <up> <up> <up> 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 <down> <down> <down> <down>
<down> <down> <down> <down> <up> <up> <up> <up> <up>
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up>
<up> <up> <up> <up> <up> <up> <up> <up> <up> C-SPC
<C-end> M-w <C-home> <C-end> M-x r e p o r t <tab>
<return>

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 <f1> 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)






Reply sent to Glenn Morris <rgm <at> gnu.org>:
You have taken responsibility. (Fri, 06 Dec 2013 14:18:01 GMT) Full text and rfc822 format available.

Notification sent to "Phil Sainty" <psainty <at> orcon.net.nz>:
bug acknowledged by developer. (Fri, 06 Dec 2013 14:18:02 GMT) Full text and rfc822 format available.

Message #10 received at 16067-done <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: 16067-done <at> debbugs.gnu.org
Subject: Re: bug#16067: 24.3;
 Documentation bug: Example code in (elisp) Anonymous Functions
Date: Fri, 06 Dec 2013 09:17:26 -0500
Version: 24.4

Thanks. This was fixed some months ago in the sources.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 04 Jan 2014 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 11 years and 226 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.