From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juanma Barranquero Newsgroups: gmane.emacs.devel Subject: Re: major mode in new buffers Date: Thu, 1 Apr 2010 23:08:24 +0200 Message-ID: References: <2f8988ff1003300457w38ee4bf0h259cd7a7187298e0@mail.gmail.com> <87oci5ev6a.fsf@mail.jurta.org> <87oci41zrg.fsf@mail.jurta.org> <87fx3f5d15.fsf@mail.jurta.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1270156137 14481 80.91.229.12 (1 Apr 2010 21:08:57 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 1 Apr 2010 21:08:57 +0000 (UTC) Cc: =?UTF-8?Q?Ren=C3=A9_Kyllingstad?= , Stefan Monnier , emacs-devel@gnu.org To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Apr 01 23:08:52 2010 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.69) (envelope-from ) id 1NxRdE-0002If-IK for ged-emacs-devel@m.gmane.org; Thu, 01 Apr 2010 23:08:52 +0200 Original-Received: from localhost ([127.0.0.1]:52814 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NxRdD-0000cX-Sr for ged-emacs-devel@m.gmane.org; Thu, 01 Apr 2010 17:08:51 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NxRd9-0000bt-MH for emacs-devel@gnu.org; Thu, 01 Apr 2010 17:08:47 -0400 Original-Received: from [140.186.70.92] (port=47355 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NxRd8-0000bC-HS for emacs-devel@gnu.org; Thu, 01 Apr 2010 17:08:47 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NxRd6-0000Qh-Nj for emacs-devel@gnu.org; Thu, 01 Apr 2010 17:08:46 -0400 Original-Received: from mail-bw0-f219.google.com ([209.85.218.219]:64186) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NxRd6-0000OG-He for emacs-devel@gnu.org; Thu, 01 Apr 2010 17:08:44 -0400 Original-Received: by mail-bw0-f219.google.com with SMTP id 19so140821bwz.26 for ; Thu, 01 Apr 2010 14:08:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:received:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=p1hwVB75eo9QfAAiJHwo/VMAy/4KkCCh86i6ZUmcxYw=; b=WXgY5JsTUCpynY6jS7gGiXZDm2zFMhjjQF9NsIhQ7L9VCYKZjWJlh8K6mUhirBZzlh d6iJgvSije/e4h8diAYop9NYY0M0V6GCM4Inbo/K1bzuO953j1M5clQfHzQWCJxc/aF4 cDgKteGhvYuRnpV4XYAN+k9mSGnbmoXMLC00I= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=mSw1hy+GCq8KIiORLIaK2c5XoYXMx5djtDcyC8hWEWy/hBVJrulFYn9yaeWCmFToxQ 7m8bBETE0HjqKLOzbtIvhtk69IzaZhIHZ5q6/X9mEcrWOERkY6Om48sincjv8zcCQ/2y Nx6apdiFihUEwzKAsb0dqTOVArthbvXtK4lTc= Original-Received: by 10.204.156.9 with HTTP; Thu, 1 Apr 2010 14:08:24 -0700 (PDT) In-Reply-To: <87fx3f5d15.fsf@mail.jurta.org> Original-Received: by 10.204.3.147 with SMTP id 19mr2075518bkn.42.1270156124094; Thu, 01 Apr 2010 14:08:44 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) 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:123036 Archived-At: 2010/4/1 Juri Linkov : > I know nothing about ehelp.el, but it seems this patch fixes it: Yes, thanks. Please install it. Two small comments: > +(defvar electric-help-orig-major-mode nil) > + > =C2=A0(defun electric-help-mode () > =C2=A0 "`with-electric-help' temporarily places its buffer in this mode. > -\(On exit from `with-electric-help', the buffer is put in default `major= -mode'.)" > +\(On exit from `with-electric-help', the original `major-mode' is restor= ed.)" > =C2=A0 (setq buffer-read-only t) > + =C2=A0(set (make-local-variable 'electric-help-orig-major-mode) major-m= ode) It makes sense for `electric-help-orig-major-mode' to be automatically buffer-local, as it will ever be used as such. > =C2=A0 =C2=A0 =C2=A0 ;; call to help-mode won't cut it; at least RET is b= ound wrong > =C2=A0 =C2=A0 =C2=A0 ;; afterwards. =C2=A0It's also not clear that `help-= mode' is always > =C2=A0 =C2=A0 =C2=A0 ;; the right thing, maybe we should add an optional = parameter. This part of the comment (and the missing first line that precedes it) is no longer true and should be deleted. Juanma