From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: John Anthony Newsgroups: gmane.emacs.bugs Subject: bug#15599: [PATCH] Inferior Lisp Mode Menu Date: Thu, 24 Oct 2013 15:05:18 +0100 Message-ID: <20131024140518.GA10721@jo.hnanthony.com> References: <20131012170846.GA688@jo.hnanthony.com> <20131023214701.GA8211@jo.hnanthony.com> <561snf83x.fsf@fencepost.gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1382623576 18351 80.91.229.3 (24 Oct 2013 14:06:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 24 Oct 2013 14:06:16 +0000 (UTC) Cc: 15599@debbugs.gnu.org To: Glenn Morris Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Oct 24 16:06:21 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 1VZLYG-0008T1-8g for geb-bug-gnu-emacs@m.gmane.org; Thu, 24 Oct 2013 16:06:16 +0200 Original-Received: from localhost ([::1]:54578 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VZLYF-0007I4-NI for geb-bug-gnu-emacs@m.gmane.org; Thu, 24 Oct 2013 10:06:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50824) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VZLY7-0007HZ-RQ for bug-gnu-emacs@gnu.org; Thu, 24 Oct 2013 10:06:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VZLY2-0002Ec-TI for bug-gnu-emacs@gnu.org; Thu, 24 Oct 2013 10:06:07 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:55343) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VZLY2-0002EX-Pu for bug-gnu-emacs@gnu.org; Thu, 24 Oct 2013 10:06:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1VZLY2-0007wD-FN for bug-gnu-emacs@gnu.org; Thu, 24 Oct 2013 10:06:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: John Anthony Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 24 Oct 2013 14:06:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 15599 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 15599-submit@debbugs.gnu.org id=B15599.138262352630461 (code B ref 15599); Thu, 24 Oct 2013 14:06:02 +0000 Original-Received: (at 15599) by debbugs.gnu.org; 24 Oct 2013 14:05:26 +0000 Original-Received: from localhost ([127.0.0.1]:41127 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VZLXR-0007vE-UN for submit@debbugs.gnu.org; Thu, 24 Oct 2013 10:05:26 -0400 Original-Received: from [198.46.132.138] (port=46463 helo=jo.hnanthony.com) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VZLXO-0007v4-Sf for 15599@debbugs.gnu.org; Thu, 24 Oct 2013 10:05:23 -0400 Original-Received: from jo.hnanthony.com (localhost.localdomain [127.0.0.1]) by jo.hnanthony.com (8.14.3/8.14.3/Debian-9.4) with ESMTP id r9OE5KoX010762; Thu, 24 Oct 2013 15:05:21 +0100 Original-Received: (from john@localhost) by jo.hnanthony.com (8.14.3/8.14.3/Submit) id r9OE5Khi010761; Thu, 24 Oct 2013 15:05:20 +0100 Content-Disposition: inline In-Reply-To: <561snf83x.fsf@fencepost.gnu.org> User-Agent: Mutt/1.5.20 (2009-06-14) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.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:79584 Archived-At: Glenn Morris wrote: > > To use a working example, should I disable "Eval Last Sexp" in the > > menu if the cursor is not positioned after a valid sexp? > > But that seems like too much. I'd leave such an item always enabled. I'll be honest - I was always expecting the answer to be "it depends on the context". Here's a patch with your style advice applied: diff --git a/lisp/progmodes/inf-lisp.el b/lisp/progmodes/inf-lisp.el index d73e948..a9953e2 100644 --- a/lisp/progmodes/inf-lisp.el +++ b/lisp/progmodes/inf-lisp.el @@ -91,6 +91,21 @@ mode. Default is whitespace followed by 0 or 1 single-letter colon-keyword (define-key map "\C-c\C-v" 'lisp-show-variable-documentation) map)) +(easy-menu-define + inferior-lisp-menu + inferior-lisp-mode-map + "Inferior Lisp Menu" + '("Inf-Lisp" + ["Eval Last Sexp" lisp-eval-last-sexp t] + "--" + ["Load File..." lisp-load-file t] + ["Compile File..." lisp-compile-file t] + "--" + ["Show Arglist..." lisp-show-arglist t] + ["Describe Symbol..." lisp-describe-sym t] + ["Show Documentation for Function..." lisp-show-function-documentation t] + ["Show Documentation for Variable..." lisp-show-variable-documentation t])) + ;;; These commands augment Lisp mode, so you can process Lisp code in ;;; the source files. (define-key lisp-mode-map "\M-\C-x" 'lisp-eval-defun) ; Gnu convention -- John Anthony http://jo.hnanthony.com