[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: prog-mode not available in earlier Emacsen, need help with cfengine.
From: |
Ted Zlatanov |
Subject: |
Re: prog-mode not available in earlier Emacsen, need help with cfengine.el |
Date: |
Sat, 26 Nov 2011 21:06:42 -0500 |
User-agent: |
Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.90 (gnu/linux) |
On Sat, 26 Nov 2011 11:57:36 +0100 Reiner Steib <address@hidden> wrote:
RS> On Fri, Nov 25 2011, Ted Zlatanov wrote:
RS> | On Tue, Nov 22 2011, Stefan Monnier wrote:
RS> | > I think that
RS> | > (unless (fboundp 'prog-mode) (defalias 'prog-mode 'fundamental-mode))
RS> | > should do the trick.
>> I'll change the non-Emacs one so it explains this and has compatibility
>> code.
RS> Please don't define/defalias prog-mode, because other code might test
RS> for (fboundp 'prog-mode) an expect a real prog-mode.
RS> ,----[ (info "(elisp)Coding Conventions") ]
RS> | * If a package needs to define an alias or a new function for
RS> | compatibility with some other version of Emacs, name it with the
RS> | package prefix, not with the raw name with which it occurs in the
RS> | other version. Here is an example from Gnus, which provides many
RS> | examples of such compatibility issues.
RS> |
RS> | (defalias 'gnus-point-at-bol
RS> | (if (fboundp 'point-at-bol)
RS> | 'point-at-bol
RS> | 'line-beginning-position))
RS> `----
Understood, thanks!
Ted
- prog-mode not available in earlier Emacsen, need help with cfengine.el, Ted Zlatanov, 2011/11/22
- Re: prog-mode not available in earlier Emacsen, need help with cfengine.el, Eli Zaretskii, 2011/11/22
- Re: prog-mode not available in earlier Emacsen, need help with cfengine.el, Ted Zlatanov, 2011/11/22
- Re: prog-mode not available in earlier Emacsen, need help with cfengine.el, Stefan Monnier, 2011/11/22
- Re: prog-mode not available in earlier Emacsen, need help with cfengine.el, Ted Zlatanov, 2011/11/22
- Re: prog-mode not available in earlier Emacsen, need help with cfengine.el, Chong Yidong, 2011/11/23
- Re: prog-mode not available in earlier Emacsen, need help with cfengine.el, Ted Zlatanov, 2011/11/23
- Re: prog-mode not available in earlier Emacsen, need help with cfengine.el, Chong Yidong, 2011/11/24
- Re: prog-mode not available in earlier Emacsen, need help with cfengine.el, Ted Zlatanov, 2011/11/25
- Re: prog-mode not available in earlier Emacsen, need help with cfengine.el, Reiner Steib, 2011/11/26
- Re: prog-mode not available in earlier Emacsen, need help with cfengine.el,
Ted Zlatanov <=