From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Richard M. Stallman" Newsgroups: gmane.emacs.devel Subject: Re: File modes facilities. Date: Wed, 26 Oct 2005 21:31:07 -0400 Message-ID: References: <87hdbdxo94.fsf@mahaena.lrde> <877jc92o37.fsf@mahaena.lrde> <17238.50816.352274.312799@kahikatea.snap.net.nz> <87u0fd9let.fsf@mahaena.lrde> <87oe5jmu9j.fsf-monnier+emacs@gnu.org> <87y84n81q2.fsf@mahaena.lrde> Reply-To: rms@gnu.org NNTP-Posting-Host: main.gmane.org Content-Type: text/plain; charset=ISO-8859-15 X-Trace: sea.gmane.org 1130376912 10713 80.91.229.2 (27 Oct 2005 01:35:12 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 27 Oct 2005 01:35:12 +0000 (UTC) Cc: schwab@suse.de, michael.cadilhac-@t-lrde.epita.fr, emacs-devel@gnu.org, monnier@iro.umontreal.ca, eliz@gnu.org, snogglethorpe@gmail.com, miles@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Oct 27 03:35:09 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EUwew-0001mD-1J for ged-emacs-devel@m.gmane.org; Thu, 27 Oct 2005 03:34:26 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EUwev-0007Pi-GM for ged-emacs-devel@m.gmane.org; Wed, 26 Oct 2005 21:34:25 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EUwbl-0005Mf-IT for emacs-devel@gnu.org; Wed, 26 Oct 2005 21:31:09 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EUwbk-0005MH-DD for emacs-devel@gnu.org; Wed, 26 Oct 2005 21:31:08 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EUwbk-0005M9-0u for emacs-devel@gnu.org; Wed, 26 Oct 2005 21:31:08 -0400 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EUwbk-0001lF-6H for emacs-devel@gnu.org; Wed, 26 Oct 2005 21:31:08 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.34) id 1EUwbj-0003nB-5m; Wed, 26 Oct 2005 21:31:07 -0400 Original-To: storm@cua.dk (Kim F. Storm) In-reply-to: (storm@cua.dk) 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:44938 Archived-At: .. and it easily forms the foundation for implementing your preferred approach, i.e. include the lisp form directly in the C source file like this: DEFUN ("set-file-modes", Fset_file_modes, Sset_file_modes, 2, 2, "(list" " (read-file-name \"File: \")" " (read-number \"Modes: \"))", doc: /* Set mode bits of file named FILENAME to MODE (an integer). That is what I would like to implement. My approach also allow aliases to be defined with a different interactive spec like this: (defalias 'chmod 'set-file-modes "Interactive frontend to `set-file-modes'." "fFile: \nnModes: ") I don't like the idea of defining aliases with different interactive specs, because it distorts the meaning of "alias". Aliases should be equivalent to the original function. It is cleaner if people define that chmod function thus: (defun chmod (file mode) "Interactive frontend to `set-file-modes'." (interactive "fFile: \nnModes: ") (set-file-modes file mode)) Defining a new function in this way is better than defining an alias which isn't really an alias.