From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Reiner Steib Newsgroups: gmane.emacs.gnus.general,gmane.emacs.devel Subject: Re: hard-newline changes in lisp/gnus/message.el Date: Sat, 19 Nov 2005 21:47:30 +0100 Message-ID: References: <87sltstq1s.fsf@stupidchicken.com> Reply-To: Reiner Steib NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1132486355 28828 80.91.229.2 (20 Nov 2005 11:32:35 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 20 Nov 2005 11:32:35 +0000 (UTC) Original-X-From: ding-owner+m9926@lists.math.uh.edu Sun Nov 20 12:32:27 2005 Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EdnQS-00084m-TK for ding-account@gmane.org; Sun, 20 Nov 2005 12:32:05 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu ident=lists) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 1EdnQG-0006W9-00; Sun, 20 Nov 2005 05:31:52 -0600 Original-Received: from nas01.math.uh.edu ([129.7.128.39]) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1EdnLM-0006W4-00 for ding@lists.math.uh.edu; Sun, 20 Nov 2005 05:26:48 -0600 Original-Received: from quimby.gnus.org ([80.91.224.244]) by nas01.math.uh.edu with esmtp (Exim 4.52) id 1EdnLH-0002Go-Rw for ding@lists.math.uh.edu; Sun, 20 Nov 2005 05:26:48 -0600 Original-Received: from mail.uni-ulm.de ([134.60.1.1]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1EdnLG-0004As-00 for ; Sun, 20 Nov 2005 12:26:42 +0100 Original-Received: from bridgekeeper.physik.uni-ulm.de (bridgekeeper.physik.uni-ulm.de [134.60.10.123]) by mail.uni-ulm.de (8.13.4/8.13.4) with ESMTP id jAKBQUWG010068; Sun, 20 Nov 2005 12:26:31 +0100 (MET) Original-Received: from me (bridgekeeper.physik.uni-ulm.de [134.60.10.123]) by bridgekeeper.physik.uni-ulm.de (Postfix) with SMTP id 16AAF10BEF; Sun, 20 Nov 2005 12:26:25 +0100 (CET) Original-Received: (nullmailer pid 12429 invoked by uid 170); Sat, 19 Nov 2005 20:47:31 -0000 Original-To: Emacs development , Gnus Mail-Followup-To: Chong Yidong , Emacs development , Gnus X-Face: 'bg&jY[8V'W&:=~6w"|>}#4/T;w~36ei4NNMyKRR.a$n=$|sWFPF1y]a\>6kc\*#GN]UDM| Ywv,vbL^XF1nIp\:F=$Ei2o&mEe:%N~,:3]vtQ~s9u$9izmX$IF@VgGl7/,^dbuM<3|AO2}.%|%?kZ 2Y=@\U!~cll^=8Z9ihKq%wmUe1Ky(#kl3T'>Qk0Ia3mCBsTk?E(,X In-Reply-To: <87sltstq1s.fsf@stupidchicken.com> (Chong Yidong's message of "Sat, 19 Nov 2005 14:07:11 -0500") User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux) X-DCC--Metrics: gemini 1074; Body=2 Fuz1=2 Fuz2=2 X-Spam-Score: -2.5 (--) Precedence: bulk Original-Sender: ding-owner@lists.math.uh.edu Xref: news.gmane.org gmane.emacs.gnus.general:61395 gmane.emacs.devel:46329 Archived-At: On Sat, Nov 19 2005, Chong Yidong wrote: > Reiner Steib writes: >> As for `hard-newline': Obviously `hard-newline' is not defined in >> Emacs < 22. I'm not sure what's the best way to deal with this. I'd >> suggest to define `message-hard-newline' in `message.el' as follows >> and use it instead of `hard-newline'. > > Why not: > > (if (not (boundp hard-newline)) > (defvar hard-newline (propertize "\n" 'hard t 'rear-nonsticky '(hard)))) (Your suggestion should read (unless (boundp 'hard-newline) ...).) It violates Emacs Lisp coding conventions: ,----[ (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)) `---- The same applies to variables, IMO. Bye, Reiner. -- ,,, (o o) ---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/