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-mod

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 refu

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

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

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

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

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 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

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

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

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

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

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

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

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

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