From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Reiner Steib Newsgroups: gmane.emacs.devel Subject: Re: prog-mode not available in earlier Emacsen, need help with cfengine.el Date: Sat, 26 Nov 2011 11:57:36 +0100 Message-ID: <877h2ngnhb.fsf@marauder.physik.uni-ulm.de> 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> Reply-To: Reiner Steib NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1322313267 18516 80.91.229.12 (26 Nov 2011 13:14:27 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 26 Nov 2011 13:14:27 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Nov 26 14:14:23 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 1RUI5H-0006kD-6s for ged-emacs-devel@m.gmane.org; Sat, 26 Nov 2011 14:14:23 +0100 Original-Received: from localhost ([::1]:47455 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RUI5G-0001xb-NI for ged-emacs-devel@m.gmane.org; Sat, 26 Nov 2011 08:14:22 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:51545) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RUI5E-0001xV-1d for emacs-devel@gnu.org; Sat, 26 Nov 2011 08:14:21 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RUI5C-000540-5O for emacs-devel@gnu.org; Sat, 26 Nov 2011 08:14:19 -0500 Original-Received: from lo.gmane.org ([80.91.229.12]:45357) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RUI5B-00053u-PA for emacs-devel@gnu.org; Sat, 26 Nov 2011 08:14:18 -0500 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1RUI5B-0006i0-3n for emacs-devel@gnu.org; Sat, 26 Nov 2011 14:14:17 +0100 Original-Received: from p5dcb733f.dip.t-dialin.net ([93.203.115.63]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 26 Nov 2011 14:14:17 +0100 Original-Received: from Reiner.Steib by p5dcb733f.dip.t-dialin.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 26 Nov 2011 14:14:17 +0100 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: emacs-devel@gnu.org Original-Lines: 31 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: p5dcb733f.dip.t-dialin.net X-Face: .*T0'iU(sujq_j9\J>-d4fg; N/1++U#U$_5ii6k.=|"-n'?5O:Hyz&wi'-!I~,}7~GgT=0S /&-R5sbkNy5+Xo1y{Tw2KKxi@Xh"g@]Qc|.U<*]WDd)qvGowFDvfU1F]{EDho:7P0@|oOD=Bc{K4?> WP68K[Mx:}=`ZT'6g4'f+g?;`vri2!)xGy}3:=l'(/Cea0l4lo^H5#@/Z3ev Mail-Copies-To: nobody User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:IrfdiHsPLQkenwh9h86t3loM56E= 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:146254 Archived-At: On Fri, Nov 25 2011, Ted Zlatanov wrote: | On Tue, Nov 22 2011, Stefan Monnier wrote: | > I think that | > (unless (fboundp 'prog-mode) (defalias 'prog-mode 'fundamental-mode)) | > should do the trick. > I'll change the non-Emacs one so it explains this and has compatibility > code. Please don't define/defalias prog-mode, because other code might test for (fboundp 'prog-mode) an expect a real prog-mode. ,----[ (info "(elisp)Coding Conventions") ] | * If a package needs to define an alias or a new function for | compatibility with some other version of Emacs, name it with the | package prefix, not with the raw name with which it occurs in the | other version. Here is an example from Gnus, which provides many | examples of such compatibility issues. | | (defalias 'gnus-point-at-bol | (if (fboundp 'point-at-bol) | 'point-at-bol | 'line-beginning-position)) `---- Bye, Reiner. -- ,,, (o o) ---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/