At Thu, 03 Nov 2011 19:35:01 -0200,
Cassio Koshikumo wrote:
>
> Hi, all,
>
> On the last few days I've been working on a major mode derived from org-mode.
> While I was at it, I've encoutered some difficulties related to those reported
> by the OP (Stefan). Specifically: in a lot of places, org-mod
Hi, all,
On the last few days I've been working on a major mode derived from org-mode.
While I was at it, I've encoutered some difficulties related to those reported
by the OP (Stefan). Specifically: in a lot of places, org-mode will check if
it's the current major-mode and, if it's not, will refu
Hi Tassilo,
Tassilo Horn writes:
> 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.
>
> B
Carsten Dominik 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)
>>
>> depe
On Sep 5, 2011, at 9:36 AM, Tassilo Horn wrote:
> Stefan Reichör writes:
>
> Hi Stefan,
>
+(defun org-mode-or-derived-mode-p ()
+ "Check if the current buffer is in Org-mode or a derived mode."
+ (if (derived-mode-p 'org-mode) t nil))
>>>
>>> The if is superfluous. And inste
Stefan Reichör writes:
Hi Stefan,
>>> +(defun org-mode-or-derived-mode-p ()
>>> + "Check if the current buffer is in Org-mode or a derived mode."
>>> + (if (derived-mode-p 'org-mode) t nil))
>>
>> The if is superfluous. And instead of a new function, I'd rather add an
>> optional `derived' pa
Tassilo Horn writes:
> Stefan Reichör writes:
>
>> +(defun org-mode-or-derived-mode-p ()
>> + "Check if the current buffer is in Org-mode or a derived mode."
>> + (if (derived-mode-p 'org-mode) t nil))
>
> The if is superfluous. And instead of a new function, I'd rather add an
> optional `der
Stefan Reichör writes:
> +(defun org-mode-or-derived-mode-p ()
> + "Check if the current buffer is in Org-mode or a derived mode."
> + (if (derived-mode-p 'org-mode) t nil))
The if is superfluous. And instead of a new function, I'd rather add an
optional `derived' parameter to `org-mode-p'.
2011-09-02 Stefan Reichoer
Add org-mode-or-derived-mode-p to support org-mode derived modes
* org-macs.el (org-mode-or-derived-mode-p): New defun
* org-src.el (org-edit-src-code): Use org-mode-or-derived-mode-p
* org.el (org-entry-properties): Use org-mode-or-deri