From: Reiner Steib <reinersteib+gmane@imap.cc>
Subject: Re: hard-newline changes in lisp/gnus/message.el
Date: Sat, 19 Nov 2005 21:47:30 +0100 [thread overview]
Message-ID: <v9wtj4icv1.fsf@marauder.physik.uni-ulm.de> (raw)
In-Reply-To: <87sltstq1s.fsf@stupidchicken.com> (Chong Yidong's message of "Sat, 19 Nov 2005 14:07:11 -0500")
On Sat, Nov 19 2005, Chong Yidong wrote:
> Reiner Steib <reinersteib+gmane@imap.cc> 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/
prev parent reply other threads:[~2005-11-19 20:47 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-18 17:31 hard-newline changes in lisp/gnus/message.el Reiner Steib
2005-11-19 11:20 ` Romain Francoise
2005-11-20 2:51 ` Sam Steingold
2005-11-20 3:33 ` Chong Yidong
2005-11-19 19:07 ` Chong Yidong
2005-11-19 20:47 ` Reiner Steib [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=v9wtj4icv1.fsf@marauder.physik.uni-ulm.de \
--to=reinersteib+gmane@imap.cc \
--cc=Reiner.Steib@gmx.de \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.