From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: storm@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.devel Subject: Re: eval-after-load as a macro (and eval-next-after-load) Date: 10 Apr 2003 01:41:53 +0200 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <5xr88bdyri.fsf@kfs2.cua.dk> References: <200304042030.h34KUEQL008262@rum.cs.yale.edu> <200304062105.h36L55Jn019873@rum.cs.yale.edu> <84y92mslqe.fsf@lucy.is.informatik.uni-duisburg.de> <84brziwhsi.fsf@lucy.is.informatik.uni-duisburg.de> <5xhe99z2q8.fsf@kfs2.cua.dk> <200304081817.h38IHwst029188@rum.cs.yale.edu> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1049924672 20546 80.91.224.249 (9 Apr 2003 21:44:32 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 9 Apr 2003 21:44:32 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Wed Apr 09 23:44:30 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 193NMs-0005Kt-00 for ; Wed, 09 Apr 2003 23:44:30 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 193NRX-0007U5-00 for ; Wed, 09 Apr 2003 23:49:19 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 193NN0-00041E-03 for emacs-devel@quimby.gnus.org; Wed, 09 Apr 2003 17:44:38 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 193NMQ-0003ZB-00 for emacs-devel@gnu.org; Wed, 09 Apr 2003 17:44:02 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 193NMG-0003A2-00 for emacs-devel@gnu.org; Wed, 09 Apr 2003 17:43:54 -0400 Original-Received: from mail.filanet.dk ([195.215.206.179]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 193NLh-0002Ei-00 for emacs-devel@gnu.org; Wed, 09 Apr 2003 17:43:17 -0400 Original-Received: from kfs2.cua.dk.cua.dk (unknown [10.1.82.3]) by mail.filanet.dk (Postfix) with SMTP id DA4977C012; Wed, 9 Apr 2003 23:43:13 +0200 (CEST) Original-To: "Stefan Monnier" In-Reply-To: <200304081817.h38IHwst029188@rum.cs.yale.edu> Original-Lines: 19 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Emacs development discussions. List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:13089 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:13089 "Stefan Monnier" writes: > > > The usual way to handle this is with hooks. Does cua mode have > > > a cua-mode-hook? > > > > It does not, but I can add one. > > How about defining it using define-minor-mode ? > Something like the untested patch below. I have no principle objections doing that, but the message printed when cua-mode is enabled or disabled is not a trivial Enabled/Disabled message as normal minor modes have; the message explicitly mentions interactions with delete-selection-mode and pc-selection-mode (when applicable). I don't know if define-minor-mode can handle that, but your patch doesn't seem to address that specific issue... -- Kim F. Storm http://www.cua.dk