From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ted Zlatanov Newsgroups: gmane.emacs.devel Subject: Re: prog-mode not available in earlier Emacsen, need help with cfengine.el Date: Sat, 26 Nov 2011 21:06:42 -0500 Organization: =?utf-8?B?0KLQtdC+0LTQvtGAINCX0LvQsNGC0LDQvdC+0LI=?= @ Cienfuegos Message-ID: <87hb1qb9ot.fsf@lifelogs.com> References: <87ipmcgjot.fsf@lifelogs.com> <83lir89gne.fsf@gnu.org> <87aa7ogfo3.fsf@lifelogs.com> <87fwhffv37.fsf@lifelogs.com> <877h2ridev.fsf@gnu.org> <8739dfezc1.fsf@lifelogs.com> <87aa7m5a6b.fsf@gnu.org> <877h2oe3yj.fsf@lifelogs.com> <877h2ngnhb.fsf@marauder.physik.uni-ulm.de> Reply-To: emacs-devel@gnu.org NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1322359625 14219 80.91.229.12 (27 Nov 2011 02:07:05 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 27 Nov 2011 02:07:05 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Nov 27 03:07:01 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RUU8z-0008OO-1i for ged-emacs-devel@m.gmane.org; Sun, 27 Nov 2011 03:07:01 +0100 Original-Received: from localhost ([::1]:58859 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RUU8y-0003wg-D6 for ged-emacs-devel@m.gmane.org; Sat, 26 Nov 2011 21:07:00 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:48129) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RUU8v-0003wb-Q4 for emacs-devel@gnu.org; Sat, 26 Nov 2011 21:06:58 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RUU8u-0004G3-OE for emacs-devel@gnu.org; Sat, 26 Nov 2011 21:06:57 -0500 Original-Received: from lo.gmane.org ([80.91.229.12]:32783) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RUU8u-0004Fw-A2 for emacs-devel@gnu.org; Sat, 26 Nov 2011 21:06:56 -0500 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1RUU8r-0008MS-Tu for emacs-devel@gnu.org; Sun, 27 Nov 2011 03:06:53 +0100 Original-Received: from c-76-28-40-19.hsd1.vt.comcast.net ([76.28.40.19]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 27 Nov 2011 03:06:53 +0100 Original-Received: from tzz by c-76-28-40-19.hsd1.vt.comcast.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 27 Nov 2011 03:06:53 +0100 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: emacs-devel@gnu.org Original-Lines: 30 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: c-76-28-40-19.hsd1.vt.comcast.net X-Face: bd.DQ~'29fIs`T_%O%C\g%6jW)yi[zuz6; d4V0`@y-~$#3P_Ng{@m+e4o<4P'#(_GJQ%TT= D}[Ep*b!\e,fBZ'j_+#"Ps?s2!4H2-Y"sx" Mail-Copies-To: never User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.90 (gnu/linux) Cancel-Lock: sha1:9QOEz5AnLe8fr4VlN1xSgVowrQ0= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 80.91.229.12 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:146276 Archived-At: On Sat, 26 Nov 2011 11:57:36 +0100 Reiner Steib 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