From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nikolaus Demmel Newsgroups: gmane.emacs.bugs Subject: bug#14293: 23.4; Unclarity in documentation: flet replaced by cl-flet of cl-letf in 24.3 and up. Date: Sat, 27 Apr 2013 13:37:46 +0200 Message-ID: <0174328B-6C51-4143-8FD7-DE02EB82E86D@nikolaus-demmel.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Apple Message framework v1085) Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1367085604 15817 80.91.229.3 (27 Apr 2013 18:00:04 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 27 Apr 2013 18:00:04 +0000 (UTC) To: 14293@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Apr 27 20:00:08 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UW9Pq-0002pG-7e for geb-bug-gnu-emacs@m.gmane.org; Sat, 27 Apr 2013 20:00:06 +0200 Original-Received: from localhost ([::1]:37011 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UW9Pp-0005dX-VL for geb-bug-gnu-emacs@m.gmane.org; Sat, 27 Apr 2013 14:00:05 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:54554) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UW9Pj-0005bp-9Z for bug-gnu-emacs@gnu.org; Sat, 27 Apr 2013 14:00:03 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UW9Pf-0001Vj-V0 for bug-gnu-emacs@gnu.org; Sat, 27 Apr 2013 13:59:59 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:43141) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UW9Pf-0001Vf-Ru for bug-gnu-emacs@gnu.org; Sat, 27 Apr 2013 13:59:55 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1UW9Pm-0000wJ-SB for bug-gnu-emacs@gnu.org; Sat, 27 Apr 2013 14:00:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Nikolaus Demmel Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 27 Apr 2013 18:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 14293 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.13670855743534 (code B ref -1); Sat, 27 Apr 2013 18:00:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 27 Apr 2013 17:59:34 +0000 Original-Received: from localhost ([127.0.0.1]:47249 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UW9PJ-0000uw-Jg for submit@debbugs.gnu.org; Sat, 27 Apr 2013 13:59:34 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:48128) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UW3SD-0001zX-4h for submit@debbugs.gnu.org; Sat, 27 Apr 2013 07:38:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UW3S3-0002bs-8T for submit@debbugs.gnu.org; Sat, 27 Apr 2013 07:38:02 -0400 Original-Received: from lists.gnu.org ([208.118.235.17]:54521) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UW3S3-0002bo-4u for submit@debbugs.gnu.org; Sat, 27 Apr 2013 07:37:59 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:59453) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UW3Rz-0003yw-Ef for bug-gnu-emacs@gnu.org; Sat, 27 Apr 2013 07:37:59 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UW3Rv-0002ZS-Ut for bug-gnu-emacs@gnu.org; Sat, 27 Apr 2013 07:37:55 -0400 Original-Received: from moutng.kundenserver.de ([212.227.17.9]:64052) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UW3Rv-0002YU-IK for bug-gnu-emacs@gnu.org; Sat, 27 Apr 2013 07:37:51 -0400 Original-Received: from mbpdemmel.fritz.box (dslb-188-099-118-004.pools.arcor-ip.net [188.99.118.4]) by mrelayeu.kundenserver.de (node=mrbap2) with ESMTP (Nemesis) id 0Lg6Fn-1UopkH3Qh1-00pO8q; Sat, 27 Apr 2013 13:37:47 +0200 X-Mailer: Apple Mail (2.1085) X-Provags-ID: V02:K0:m+ISpopg+5Kk64/yAuQb0FUZT/oHBRt2nAR3P+aEhl9 4cXwL3ezxPEP5M/TtFJ4MPSed67JjQUnFjrsg1kZs3GlGFInjG /akRyFB5kR8pYfUlFDMBUC28WtGvCzsLozHoThP8lhVHkapt4K GDHRoocf47kN7+AHYqynXxdYta0aAXRwSi8BASEGi3g3Rn4t1w 0w6k+d0iBwpO1lj9ol/jphViS4r8xlU6VRNOKlUZNP0RwSQrXX +uBrOWZfSg98WjUQPgkLyvOOBfPz6aeIEXOqH9ixU4mLocduE7 PdYMtP9noqEWQpUqhkbj9YBkq9gOZ05OpdWeuz2gL9ARWV2tMw R9ovcNu0C0ZY834LuyDXse/r/yEd/wkXxS7x27Bh/ltaETyI3g XTJb6BhoBYZgZGvwwfTqS3B80nUKEeA39M= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Mailman-Approved-At: Sat, 27 Apr 2013 13:59:31 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:73785 Archived-At: This is a documentation bug that is not about my emacs version, but about the documentation for a change in 24.3. flet has been made obsolete. This is a follow up to my question on [7], where Drew Adams suggested I file a bug. =46rom that discussion: ----- I'm referring to the documentation [1,2,3,4]. Together with the notification `flet' is an obsolete macro (as of 24.3); use either `cl-flet' or `cl-letf'. as reported here [5], this documentation does not really tell me what to do if I want to keep relying on the dynamic scoping of flet. A brief google search [6] leads me to believe that (cl-letf (((symbol-function 'foo) #'(lambda (...) ...))) ...) is the suggested solution, however I wanted to make sure that is the case. ----- Stefan Monnier has confirmed the suggested solution, but also hinted that using defadvice might be more appropriate. Maybe the information about how to precisely replace flet (i.e. same call if using cl-flet, different syntax if dynamic binding is desired using cl-letf, with an hint that defadvice might be better) could be included somewhere in the docs, maybe in [2]? Thanks, Niko [1] = http://www.gnu.org/software/emacs/manual/html_node/cl/Function-Bindings.ht= ml#index-cl_002dflet-24 [2] = http://www.gnu.org/software/emacs/manual/html_node/cl/Obsolete-Macros.html= #index-flet-173 [3] = http://www.gnu.org/software/emacs/manual/html_node/cl/Obsolete-Macros.html= #index-letf-175 [4] = http://www.gnu.org/software/emacs/manual/html_node/cl/Modify-Macros.html#i= ndex-cl_002dletf-19 [5] https://github.com/moesenle/rosemacs-debs/issues/2 [6] = https://groups.google.com/forum/#!msg/gnu.emacs.help/eaopyFH5hmY/emHfn-DYZ= ZIJ=20 [7] = https://groups.google.com/forum/?fromgroups=3D#!topic/gnu.emacs.help/eXjBL= qncchs This bug report will be sent to the Free Software Foundation, not to your local site managers! Please write in English if possible, because the Emacs maintainers usually do not have translators to read other languages for them. Your report will be posted to the bug-gnu-emacs@gnu.org mailing list and the gnu.emacs.bug news group, and at http://debbugs.gnu.org. Please describe exactly what actions triggered the bug and the precise symptoms of the bug. If you can, give a recipe starting from `emacs -Q': If Emacs crashed, and you have the Emacs process in the gdb debugger, please include the output from the following gdb commands: `bt full' and `xbacktrace'. For information about debugging Emacs, please read the file /Applications/Emacs.app/Contents/Resources/etc/DEBUG. In GNU Emacs 23.4.1 (x86_64-apple-darwin10.8.0, NS apple-appkit-1038.36) of 2012-05-21 on MBPdemmel.local Windowing system distributor `Apple', version 10.3.1038 configured using `configure '--with-ns' 'LDFLAGS=3D-L/opt/local/lib' = 'CPPFLAGS=3D-I/opt/local/include'' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: nil value of $XMODIFIERS: nil locale-coding-system: nil default enable-multibyte-characters: t Major mode: Text Minor modes in effect: nxhtml-menu-mode: t show-paren-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 blink-cursor-mode: t auto-encryption-mode: t auto-compression-mode: t column-number-mode: t line-number-mode: t transient-mark-mode: t Recent input: M-x e m a c s =DF r e =20 - r e =20 b =20 =20 =20 =20 r e p o r Recent messages: majmodpri-apply-priorities running ... (done) Loading = /Users/demmeln/.emacs.d/site/nxhtml/nxhtml/nxhtml-autoload...done ... nXhtml loading 0.6 seconds elapsed ... =3D=3D=3D Loaded at nxhtml/autostart.el end: (feature 'nxhtml-menu)=3Dt Nxml/Nxhtml Autostart.el loaded in 0.7 seconds trace: loading flymake-files Loading /Users/demmeln/.emacs.d/site/nxhtml/autostart.el (source)...done For information about GNU Emacs and the GNU system, type C-h C-a. Making completion list... Load-path shadows: /Users/demmeln/.emacs.d/site/nxhtml/util/org-panel hides = ~/.emacs.d/site/org-mode/contrib/lisp/org-panel /Users/demmeln/.emacs.d/site/nxhtml/util/org-odt hides = ~/.emacs.d/site/org-mode/lisp/org-odt ~/.emacs.d/site/python/python hides = /Applications/Emacs.app/Contents/Resources/lisp/progmodes/python ~/.emacs.d/site/prolog hides = /Applications/Emacs.app/Contents/Resources/lisp/progmodes/prolog ~/.emacs.d/site/org-mode/lisp/org hides = /Applications/Emacs.app/Contents/Resources/lisp/org/org ~/.emacs.d/site/org-mode/lisp/org-xoxo hides = /Applications/Emacs.app/Contents/Resources/lisp/org/org-xoxo ~/.emacs.d/site/org-mode/lisp/org-wl hides = /Applications/Emacs.app/Contents/Resources/lisp/org/org-wl ~/.emacs.d/site/org-mode/lisp/org-w3m hides = /Applications/Emacs.app/Contents/Resources/lisp/org/org-w3m ~/.emacs.d/site/org-mode/lisp/org-vm hides = /Applications/Emacs.app/Contents/Resources/lisp/org/org-vm ~/.emacs.d/site/org-mode/lisp/org-timer hides = /Applications/Emacs.app/Contents/Resources/lisp/org/org-timer ~/.emacs.d/site/org-mode/lisp/org-table hides = /Applications/Emacs.app/Contents/Resources/lisp/org/org-table ~/.emacs.d/site/org-mode/lisp/org-src hides = /Applications/Emacs.app/Contents/Resources/lisp/org/org-src ~/.emacs.d/site/org-mode/lisp/org-rmail hides = /Applications/Emacs.app/Contents/Resources/lisp/org/org-rmail ~/.emacs.d/site/org-mode/lisp/org-remember hides = /Applications/Emacs.app/Contents/Resources/lisp/org/org-remember ~/.emacs.d/site/org-mode/lisp/org-publish hides = /Applications/Emacs.app/Contents/Resources/lisp/org/org-publish ~/.emacs.d/site/org-mode/lisp/org-protocol hides = /Applications/Emacs.app/Contents/Resources/lisp/org/org-protocol ~/.emacs.d/site/org-mode/lisp/org-plot hides = /Applications/Emacs.app/Contents/Resources/lisp/org/org-plot ~/.emacs.d/site/org-mode/lisp/org-mouse hides = /Applications/Emacs.app/Contents/Resources/lisp/org/org-mouse ~/.emacs.d/site/org-mode/lisp/org-mobile hides = /Applications/Emacs.app/Contents/Resources/lisp/org/org-mobile ~/.emacs.d/site/org-mode/lisp/org-mhe hides = /Applications/Emacs.app/Contents/Resources/lisp/org/org-mhe ~/.emacs.d/site/org-mode/lisp/org-mew hides = /Applications/Emacs.app/Contents/Resources/lisp/org/org-mew ~/.emacs.d/site/org-mode/lisp/org-macs hides = /Applications/Emacs.app/Contents/Resources/lisp/org/org-macs ~/.emacs.d/site/org-mode/lisp/org-mac-message hides = /Applications/Emacs.app/Contents/Resources/lisp/org/org-mac-message ~/.emacs.d/site/org-mode/lisp/org-list hides = /Applications/Emacs.app/Contents/Resources/lisp/org/org-list ~/.emacs.d/site/org-mode/lisp/org-latex hides = /Applications/Emacs.app/Contents/Resources/lisp/org/org-latex ~/.emacs.d/site/org-mode/lisp/org-jsinfo hides = /Applications/Emacs.app/Contents/Resources/lisp/org/org-jsinfo ~/.emacs.d/site/org-mode/lisp/org-irc hides = /Applications/Emacs.app/Contents/Resources/lisp/org/org-irc ~/.emacs.d/site/org-mode/lisp/org-install hides = /Applications/Emacs.app/Contents/Resources/lisp/org/org-install ~/.emacs.d/site/org-mode/lisp/org-inlinetask hides = /Applications/Emacs.app/Contents/Resources/lisp/org/org-inlinetask ~/.emacs.d/site/org-mode/lisp/org-info hides = /Applications/Emacs.app/Contents/Resources/lisp/org/org-info ~/.emacs.d/site/org-mode/lisp/org-indent hides = /Applications/Emacs.app/Contents/Resources/lisp/org/org-indent ~/.emacs.d/site/org-mode/lisp/org-id hides = /Applications/Emacs.app/Contents/Resources/lisp/org/org-id ~/.emacs.d/site/org-mode/lisp/org-icalendar hides = /Applications/Emacs.app/Contents/Resources/lisp/org/org-icalendar ~/.emacs.d/site/org-mode/lisp/org-html hides = /Applications/Emacs.app/Contents/Resources/lisp/org/org-html ~/.emacs.d/site/org-mode/lisp/org-habit hides = /Applications/Emacs.app/Contents/Resources/lisp/org/org-habit ~/.emacs.d/site/org-mode/lisp/org-gnus hides = /Applications/Emacs.app/Contents/Resources/lisp/org/org-gnus ~/.emacs.d/site/org-mode/lisp/org-freemind hides = /Applications/Emacs.app/Contents/Resources/lisp/org/org-freemind ~/.emacs.d/site/org-mode/lisp/org-footnote hides = /Applications/Emacs.app/Contents/Resources/lisp/org/org-footnote ~/.emacs.d/site/org-mode/lisp/org-feed hides = /Applications/Emacs.app/Contents/Resources/lisp/org/org-feed ~/.emacs.d/site/org-mode/lisp/org-faces hides = /Applications/Emacs.app/Contents/Resources/lisp/org/org-faces ~/.emacs.d/site/org-mode/lisp/org-exp hides = /Applications/Emacs.app/Contents/Resources/lisp/org/org-exp ~/.emacs.d/site/org-mode/lisp/org-exp-blocks hides = /Applications/Emacs.app/Contents/Resources/lisp/org/org-exp-blocks ~/.emacs.d/site/org-mode/lisp/org-docbook hides = /Applications/Emacs.app/Contents/Resources/lisp/org/org-docbook ~/.emacs.d/site/org-mode/lisp/org-datetree hides = /Applications/Emacs.app/Contents/Resources/lisp/org/org-datetree ~/.emacs.d/site/org-mode/lisp/org-crypt hides = /Applications/Emacs.app/Contents/Resources/lisp/org/org-crypt ~/.emacs.d/site/org-mode/lisp/org-compat hides = /Applications/Emacs.app/Contents/Resources/lisp/org/org-compat ~/.emacs.d/site/org-mode/lisp/org-colview hides = /Applications/Emacs.app/Contents/Resources/lisp/org/org-colview ~/.emacs.d/site/org-mode/lisp/org-clock hides = /Applications/Emacs.app/Contents/Resources/lisp/org/org-clock ~/.emacs.d/site/org-mode/lisp/org-bibtex hides = /Applications/Emacs.app/Contents/Resources/lisp/org/org-bibtex ~/.emacs.d/site/org-mode/lisp/org-bbdb hides = /Applications/Emacs.app/Contents/Resources/lisp/org/org-bbdb ~/.emacs.d/site/org-mode/lisp/org-attach hides = /Applications/Emacs.app/Contents/Resources/lisp/org/org-attach ~/.emacs.d/site/org-mode/lisp/org-ascii hides = /Applications/Emacs.app/Contents/Resources/lisp/org/org-ascii ~/.emacs.d/site/org-mode/lisp/org-archive hides = /Applications/Emacs.app/Contents/Resources/lisp/org/org-archive ~/.emacs.d/site/org-mode/lisp/org-agenda hides = /Applications/Emacs.app/Contents/Resources/lisp/org/org-agenda ~/.emacs.d/site/python/sym-comp hides = /Applications/Emacs.app/Contents/Resources/lisp/obsolete/sym-comp Features: (shadow sort mail-extr message ecomplete rfc822 mml mml-sec password-cache mm-decode mm-bodies mm-encode mailcap mail-parse rfc2231 rfc2047 rfc2045 qp ietf-drums mailabbrev nnheader gnus-util netrc mm-util mail-prsvr gmm-utils wid-edit mailheader canlock hashcash mail-utils emacsbug help-mode view flymake-files flymakemsg nxhtml-autostart nxhtml-autoload majmodpri vc-bzr sha1 hex-util nxhtml-menu web-autoload nxhtml-base paredit-zoink paredit slime-autoloads cc-mode cc-fonts cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs hs-lint tex-site auto-loads ido ielm pp edmacro kmacro ob-dot ob-ditaa ob-R org-latex org-export-latex org-beamer org-exp ob-exp org-exp-blocks org-agenda org byte-opt warnings bytecomp byte-compile advice help-fns advice-preload ob-emacs-lisp ob-tangle ob-ref ob-lob ob-table org-footnote org-src ob-comint ob-keys ob ob-eval org-pcomplete pcomplete org-list org-faces org-compat org-entities org-macs time-date noutline outline cal-menu calendar cal-loaddefs footnote org-install flymake python-21 python skeleton info derived regexp-opt rx sym-comp hippie-exp fill-column-indicator easy-mmode grep compile comint ring paren tooltip ediff-hook vc-hooks lisp-float-type mwheel ns-win easymenu tool-bar dnd fontset image fringe lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar mldrag 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 loaddefs button minibuffer faces cus-face files text-properties overlay md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process dbusbind ns multi-tty emacs)