From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: enriched-mode and switching major modes. Date: Fri, 10 Sep 2004 13:40:51 -0400 Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Message-ID: References: <200409042358.i84Nwjt19152@raven.dms.auburn.edu> <200409060059.i860xdo20431@raven.dms.auburn.edu> Reply-To: rms@gnu.org NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1094838112 25227 80.91.224.253 (10 Sep 2004 17:41:52 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 10 Sep 2004 17:41:52 +0000 (UTC) Cc: boris@gnu.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Sep 10 19:41:46 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1C5pP8-0006LV-00 for ; Fri, 10 Sep 2004 19:41:46 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1C5pUV-000347-Ng for ged-emacs-devel@m.gmane.org; Fri, 10 Sep 2004 13:47:19 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1C5pUN-00033S-Gv for emacs-devel@gnu.org; Fri, 10 Sep 2004 13:47:11 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1C5pUL-00032b-Qp for emacs-devel@gnu.org; Fri, 10 Sep 2004 13:47:10 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1C5pUL-00032Y-NR for emacs-devel@gnu.org; Fri, 10 Sep 2004 13:47:09 -0400 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1C5pOR-0005ys-Kc for emacs-devel@gnu.org; Fri, 10 Sep 2004 13:41:03 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.34) id 1C5pOF-0007dn-7X; Fri, 10 Sep 2004 13:40:53 -0400 Original-To: Luc Teirlinck In-reply-to: <200409060059.i860xdo20431@raven.dms.auburn.edu> (message from Luc Teirlinck on Sun, 5 Sep 2004 19:59:39 -0500 (CDT)) 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: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:26976 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:26976 I now believe that Enriched mode should be temporarily disabled when switching major modes and later re-enabled by post-command-hook. I think you are on the right track, except for the detail that post-command-hook does the job too late. enriched-mode ought to get reenabled as soon as the new major mode is set up; it should not wait until the command finishes. One way to make this work is by adding a feature to run-mode-hooks. enriched-mode's change-major-mode-hook could then do someting to tell run-mode-hooks to reenable enriched-mode. Want to try that?