From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Roland Winkler" Newsgroups: gmane.emacs.devel Subject: prefix arg when mouse clicking on header Date: Mon, 15 Dec 2008 00:42:26 +0100 Message-ID: <18757.39394.481444.293571@tfkp04.physik.uni-erlangen.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1229298169 3404 80.91.229.12 (14 Dec 2008 23:42:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 14 Dec 2008 23:42:49 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Dec 15 00:43:53 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LC0cq-0003JI-W8 for ged-emacs-devel@m.gmane.org; Mon, 15 Dec 2008 00:43:53 +0100 Original-Received: from localhost ([127.0.0.1]:51843 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LC0bd-00061U-2R for ged-emacs-devel@m.gmane.org; Sun, 14 Dec 2008 18:42:37 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LC0bX-00060x-Td for emacs-devel@gnu.org; Sun, 14 Dec 2008 18:42:31 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LC0bW-00060e-By for emacs-devel@gnu.org; Sun, 14 Dec 2008 18:42:31 -0500 Original-Received: from [199.232.76.173] (port=40933 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LC0bW-00060Z-8D for emacs-devel@gnu.org; Sun, 14 Dec 2008 18:42:30 -0500 Original-Received: from tfkpsv.physik.uni-erlangen.de ([131.188.164.197]:22537) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LC0bV-00040m-Qb for emacs-devel@gnu.org; Sun, 14 Dec 2008 18:42:30 -0500 Original-Received: from tfkp04.physik.uni-erlangen.de (tfkp04.physik.uni-erlangen.de [131.188.164.204]) by tfkpsv.physik.uni-erlangen.de (Postfix) with ESMTP id 03DA921486 for ; Mon, 15 Dec 2008 00:42:27 +0100 (CET) X-Mailer: VM 8.0.9 under Emacs 22.2.1 (i686-pc-linux-gnu) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.4-2.6 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:106915 Archived-At: I have some difficulties with the command proced-sort-header in proced.el. This command is called when the mouse is on the header line. The first arg of this command is the mouse event. I'd like to give the command an optional prefix arg. But somehow it seems to me that clicking on the header line is different from clicking elsewhere. What is the proper way to access the prefix arg when clicking on the header line? I used to have (interactive "e\nP"), but that ignores the prefix arg. Instead of "P", I really would like to have something like (interactive (list last-input-event (or current-prefix-arg 'no-arg))) (The 'no-arg is similar to 'toggle in define-derived-mode.) But again, this ignores the prefix arg. By trial an error I have found that (interactive (list last-input-event (or last-prefix-arg 'no-arg))) seems to work. But is this the right thing? Why last-prefix-arg instead of current-prefix-arg? Certainly, this is consistent with the code letter P being ignored by interactive. Also I was wondering what is the proper replacement for the code letter e used by interactive when the list is constructed by hand. last-input-event is used in commands like Buffer-menu-sort-by-column. Is last-input-event always equivalent to the code letter e? If yes, that could go into the elisp manual. If not, what would be the proper replacement? Thanks! Roland