From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: [BUG, PATCH] org-indent-mode not correctly deactivated Date: Thu, 16 Jan 2014 01:19:34 +0100 Message-ID: <87y52gojys.fsf@bzg.ath.cx> References: <87fvoqh7tf.fsf@bzg.ath.cx> <877ga1s8s1.fsf@gmail.com> <87txd5ryox.fsf@bzg.ath.cx> <87txd5qjoc.fsf@gmail.com> <87a9exrxte.fsf@bzg.ath.cx> <87txd5vsw9.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37085) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W3ahu-0007uA-B2 for emacs-orgmode@gnu.org; Wed, 15 Jan 2014 19:21:22 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W3ahl-00082y-Mw for emacs-orgmode@gnu.org; Wed, 15 Jan 2014 19:21:14 -0500 Received: from mail-we0-x230.google.com ([2a00:1450:400c:c03::230]:58170) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W3ahl-00081b-FP for emacs-orgmode@gnu.org; Wed, 15 Jan 2014 19:21:05 -0500 Received: by mail-we0-f176.google.com with SMTP id q58so2456138wes.21 for ; Wed, 15 Jan 2014 16:21:04 -0800 (PST) In-Reply-To: <87txd5vsw9.fsf@gmail.com> (Nicolas Goaziou's message of "Wed, 15 Jan 2014 22:26:14 +0100") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Nicolas Goaziou Cc: emacs-orgmode@gnu.org Nicolas Goaziou writes: > (defun org-mode-restart () > (interactive) > (let ((indent-status (org-bound-and-true-p org-indent-mode))) > (funcall major-mode) > (hack-local-variables) > (when (and indent-status (not (org-bound-and-true-p org-indent-mode))) > (org-indent-mode -1))) > (message "%s restarted" major-mode)) > > Still not pretty, but a bit better, IMO. Definitely better, I applied this. > Also, there's a dangling (defvar org-indent-mode nil) in org.el that > looks suspicious. I don't think we need it if we use > `org-bound-and-true-p' whenever we need to check for `org-indent-mode' > value. Indeed, I removed this. Thanks! -- Bastien