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-mode
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
Hi Tassilo,
Tassilo Horn tass...@member.fsf.org 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
Carsten Dominik carsten.domi...@gmail.com 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)
On Sep 5, 2011, at 9:36 AM, Tassilo Horn wrote:
Stefan Reichör ste...@xsteve.at 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
Tassilo Horn tass...@member.fsf.org writes:
Stefan Reichör ste...@xsteve.at 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
Stefan Reichör ste...@xsteve.at 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'
2011-09-02 Stefan Reichoer ste...@xsteve.at
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
Stefan Reichör ste...@xsteve.at 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