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

2011-11-06 Thread David Maus
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

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

2011-11-03 Thread Cassio Koshikumo
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

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

2011-10-22 Thread Bastien
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

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

2011-10-11 Thread Tassilo Horn
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)

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

2011-10-06 Thread Carsten Dominik
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

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

2011-09-05 Thread Stefan Reichör
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

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

2011-09-05 Thread Tassilo Horn
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'

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

2011-09-02 Thread Stefan Reichör
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

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

2011-09-02 Thread Tassilo Horn
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