emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] [PATCH]: New Add defun org-mode-or-derived-mode-p


From: Tassilo Horn
Subject: Re: [O] [PATCH]: New Add defun org-mode-or-derived-mode-p
Date: Tue, 11 Oct 2011 09:18:09 +0200
User-agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.90 (gnu/linux)

Carsten Dominik <address@hidden> writes:

Hi Carsten,

>> BTW: I'm not sure if there is any reasonable benefit for
>> `org-mode-p', anyway.  Checking the rest of the emacs source tree,
>> then the convention is to either use
>> 
>>  (eq major-mode 'foo-mode)
>> 
>> or
>> 
>>  (derived-mode-p 'foo-mode)
>> 
>> depending on what's needed.  I don't see why (org-mode-p) or even
>> (org-mode-p 'derived) is clearer...
>
> I agree, it is not clearer, only a bit more compact.  I don't think we
> should have a new function here.  Just make a patch that used
> derived-mode-p in places where this is needed.  I would accept such a
> patch.

Ups, I've slightly misread your suggestion.  Currently, there is only
one place in org-src.el that check for being a mode derived from
org-mode or org-mode itself.  The second is useless, because
(derived-mode-p 'org-mode) is true for org-mode, too.

But as I've said, I've misread your suggestion and made a patch that
completely erases org-mode-p and all its calls.  Feel free to apply or
discard it. :-)

Bye,
Tassilo

Attachment: 0001-Replace-org-mode-p-with-usual-eq-major-mode-org-mode.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]