unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Ted Zlatanov <tzz@lifelogs.com>
To: emacs-devel@gnu.org
Subject: Re: prog-mode not available in earlier Emacsen, need help with cfengine.el
Date: Sat, 26 Nov 2011 21:06:42 -0500	[thread overview]
Message-ID: <87hb1qb9ot.fsf@lifelogs.com> (raw)
In-Reply-To: 877h2ngnhb.fsf@marauder.physik.uni-ulm.de

On Sat, 26 Nov 2011 11:57:36 +0100 Reiner Steib <reinersteib+gmane@imap.cc> 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




  reply	other threads:[~2011-11-27  2:06 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-22 17:18 prog-mode not available in earlier Emacsen, need help with cfengine.el Ted Zlatanov
2011-11-22 18:05 ` Eli Zaretskii
2011-11-22 18:45   ` Ted Zlatanov
2011-11-22 22:30     ` Stefan Monnier
2011-11-23  2:09       ` Ted Zlatanov
2011-11-23  6:03         ` Chong Yidong
2011-11-23 13:35           ` Ted Zlatanov
2011-11-24  6:03             ` Chong Yidong
2011-11-25 13:17               ` Ted Zlatanov
2011-11-26 10:57                 ` Reiner Steib
2011-11-27  2:06                   ` Ted Zlatanov [this message]
2011-12-01 15:39                     ` Ted Zlatanov
2011-12-02 16:12                       ` changes to cfengine-mode (was: prog-mode not available in earlier Emacsen, need help with cfengine.el) Ted Zlatanov
2011-12-02 20:32                         ` changes to cfengine-mode Stefan Monnier
2011-12-07 11:04                           ` Ted Zlatanov
2011-12-07 16:10                             ` Stefan Monnier
2011-12-08  9:52                               ` Chong Yidong
2011-12-13 17:21                               ` Ted Zlatanov
2011-12-13 19:51                                 ` Stefan Monnier
2011-12-13 21:46                                   ` Ted Zlatanov
2011-12-17  0:45                                     ` Stefan Monnier
2011-12-21 11:31                                       ` Ted Zlatanov
2011-12-13 17:23                               ` Ted Zlatanov
2011-12-07 16:12                             ` Stefan Monnier
2011-12-13 15:47                               ` Ted Zlatanov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87hb1qb9ot.fsf@lifelogs.com \
    --to=tzz@lifelogs.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).