From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Andreas =?UTF-8?Q?R=C3=B6hler?= Newsgroups: gmane.emacs.bugs Subject: bug#33375: 27.0.50; Nested function definitions Date: Thu, 15 Nov 2018 16:04:30 +0100 Message-ID: References: <3de36fb2-d7e6-347e-79ec-c38950aca174@easy-emacs.de> <835zwz8y77.fsf@gnu.org> <87d0r6h604.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1542293854 20624 195.159.176.226 (15 Nov 2018 14:57:34 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 15 Nov 2018 14:57:34 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux i686; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 Cc: 33375@debbugs.gnu.org To: Noam Postavsky Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Nov 15 15:57:30 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gNJ5F-0005Gc-QL for geb-bug-gnu-emacs@m.gmane.org; Thu, 15 Nov 2018 15:57:30 +0100 Original-Received: from localhost ([::1]:39345 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gNJ7M-0007TS-Al for geb-bug-gnu-emacs@m.gmane.org; Thu, 15 Nov 2018 09:59:40 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44454) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gNJ7F-0007TI-DW for bug-gnu-emacs@gnu.org; Thu, 15 Nov 2018 09:59:35 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gNJ6k-00026c-VT for bug-gnu-emacs@gnu.org; Thu, 15 Nov 2018 09:59:31 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:50096) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gNJ6k-00026V-Qo for bug-gnu-emacs@gnu.org; Thu, 15 Nov 2018 09:59:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gNJ6k-0003mN-G9 for bug-gnu-emacs@gnu.org; Thu, 15 Nov 2018 09:59:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Andreas =?UTF-8?Q?R=C3=B6hler?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 15 Nov 2018 14:59:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33375 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 33375-submit@debbugs.gnu.org id=B33375.154229393314507 (code B ref 33375); Thu, 15 Nov 2018 14:59:02 +0000 Original-Received: (at 33375) by debbugs.gnu.org; 15 Nov 2018 14:58:53 +0000 Original-Received: from localhost ([127.0.0.1]:54354 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gNJ6a-0003lu-Vm for submit@debbugs.gnu.org; Thu, 15 Nov 2018 09:58:53 -0500 Original-Received: from mout.kundenserver.de ([212.227.126.187]:57283) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gNJ6Z-0003lf-2e for 33375@debbugs.gnu.org; Thu, 15 Nov 2018 09:58:51 -0500 Original-Received: from [192.168.178.35] ([88.130.98.58]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.167]) with ESMTPSA (Nemesis) id 1Mdevh-1fnhAb03EH-00Zflz; Thu, 15 Nov 2018 15:58:44 +0100 In-Reply-To: <87d0r6h604.fsf@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LktqFa6mQd3QQ73hoNBELihValnAipjh3Dn7jz96+v5grA0K+68 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.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" Xref: news.gmane.org gmane.emacs.bugs:152420 Archived-At: On 15.11.2018 13:36, Noam Postavsky wrote: > Andreas Röhler writes: > >> What puzzles me when evaluating: >> >> >> (setq a (foo2)) >> a ==> foo3 >> (call-interactively 'foo2) ==> foo3 >> >> But M-x foo2 RET messages "Foo2" > > The last value form in `foo2' returns `foo3'. The last `message' call > displays "Foo2". Calling a command via M-x doesn't use the return > value, so you see only the last message. Note that evaluating (foo2) > also messages "Foo2" (you can see it in *Messages*), it's just covered > by the subsequent message showing the return value Okay, thanks, that makes sense. Still another observation. Open the test below, evaluations tells "foo1" as expected but than inner foo2 is not known. Debugger entered--Lisp error: (wrong-type-argument commandp foo2) call-interactively(foo2) eval((call-interactively 'foo2) nil) elisp--eval-last-sexp(nil) eval-last-sexp(nil) funcall-interactively(eval-last-sexp nil) call-interactively(eval-last-sexp nil nil) command-execute(eval-last-sexp) --- (defun foo1 () "[Some docu] (defun other-foo " (interactive) ;; defining another function inside (defun foo2 () (interactive) (message "%s" "Foo2") ;; another syntactically correct function just badly indented (defun foo3 () (interactive) (message "%s" "Foo3")) ) (message "%s" "Foo1")) ;; (call-interactively 'foo2) ==> Error ... --- In GNU Emacs 27.0.50 (build 2, i686-pc-linux-gnu, GTK+ Version 3.14.5) of 2018-11-09 built Repository revision: 4f0e54223a60a34818365475440e023747eab7e9 Windowing system distributor 'The X.Org Foundation', version 11.0.11604000 System Description: Debian GNU/Linux 8 (jessie) Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. Mark set foo1 Entering debugger... Configured using: 'configure --with-modules --enable-checking --enable-check-lisp-object-type --with-mailutils' Configured features: XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS GLIB NOTIFY INOTIFY ACL GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS GMP Important settings: value of $LANG: de_DE.utf8 value of $XMODIFIERS: @im=ibus locale-coding-system: utf-8-unix Major mode: Debugger Minor modes in effect: diff-auto-refine-mode: t tooltip-mode: t global-eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-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-composition-mode: t auto-encryption-mode: t auto-compression-mode: t buffer-read-only: t line-number-mode: t transient-mark-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message rmc puny seq byte-opt gv bytecomp byte-compile cconv format-spec rfc822 mml mml-sec password-cache epa derived epg epg-config gnus-util rmail rmail-loaddefs time-date mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils help-fns radix-tree cl-print debug backtrace help-mode find-func cl-loaddefs cl-lib vc-git diff-mode easymenu easy-mmode dired dired-loaddefs elec-pair mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads dbusbind inotify dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 8 160231 10300) (symbols 24 35005 2) (strings 16 59254 1919) (string-bytes 1 1109200) (vectors 8 16469) (vector-slots 4 534758 16220) (floats 8 56 113) (intervals 28 366 8) (buffers 528 14) (heap 1024 42785 1036))