From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Emanuel Berg Newsgroups: gmane.emacs.help Subject: lambda an (interactive) function but not a command Date: Tue, 19 Mar 2019 01:27:06 +0100 Message-ID: <86k1gvemjp.fsf@zoho.eu> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="106006"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Mar 19 01:28:11 2019 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h62by-000RS2-O8 for geh-help-gnu-emacs@m.gmane.org; Tue, 19 Mar 2019 01:28:10 +0100 Original-Received: from localhost ([127.0.0.1]:49403 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h62bx-000136-L6 for geh-help-gnu-emacs@m.gmane.org; Mon, 18 Mar 2019 20:28:09 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:35700) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h62bY-00011u-RT for help-gnu-emacs@gnu.org; Mon, 18 Mar 2019 20:27:49 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h62bX-0001Sc-Q8 for help-gnu-emacs@gnu.org; Mon, 18 Mar 2019 20:27:44 -0400 Original-Received: from [195.159.176.226] (port=41042 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1h62bW-0001Qs-9H for help-gnu-emacs@gnu.org; Mon, 18 Mar 2019 20:27:43 -0400 Original-Received: from list by blaine.gmane.org with local (Exim 4.89) (envelope-from ) id 1h62bH-000Qpr-La for help-gnu-emacs@gnu.org; Tue, 19 Mar 2019 01:27:27 +0100 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: help-gnu-emacs@gnu.org Mail-Copies-To: never Cancel-Lock: sha1:oC1eKxuP/+cx9OclEMLpMQZi5sE= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 195.159.176.226 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:119661 Archived-At: In my config file for the Gnus summary buffer [1] I have this [2]. What I wonder is, for the "F" key to invoke the `gnus-summary-followup-inline' function, for such a simple one-liner, why can't one use a lambda for that, i.e. (lambda (interactive) (gnus-summary-mail-forward 4)) ? Only then I get the error (wrong-type-argument commandp ... Is it because the whole thing is based on names, and a lambda by definition doesn't have a name, and so it can just be an anonymous *function*, not an "anonymous command" if you will? TIA [1] line 72 @ http://user.it.uu.se/~embe8573/emacs-init/gnus/summary.el [2] (defun gnus-summary-followup-inline () (interactive) (gnus-summary-mail-forward 4) ) ;;; KEYS (let ((the-map gnus-summary-mode-map)) (disable-super-global-keys the-map) (set-vertical-keys the-map) ;; group (define-key the-map "o" #'gnus-summary-insert-old-articles) (define-key the-map "w" #'gnus-summary-exit-and-update-group) ;; reply (define-key the-map "r" #'gnus-summary-followup-with-original) (define-key the-map "R" #'gnus-summary-reply-with-original) ;; message (define-key the-map "d" #'gnus-summary-delete-article) (define-key the-map "D" #'gnus-summary-mark-as-dormant) (define-key the-map "D" #'gnus-summary-mark-as-dormant) (define-key the-map "f" #'gnus-article-fill-cited-article) (define-key the-map "F" #'gnus-summary-followup-inline) (define-key the-map "U" #'gnus-summary-uncool-subject) (define-key the-map "z" #'gnus-score-edit-current-scores) (define-key the-map "\r" #'gnus-summary-show-article) ;; mark (define-key the-map "l" #'gnus-summary-put-mark-as-unread-next) (define-key the-map "s" #'gnus-summary-mark-as-read-forward) ) -- underground experts united http://user.it.uu.se/~embe8573