[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: line-beginning-position/line-end-position undefined

From: Reiner Steib
Subject: Re: line-beginning-position/line-end-position undefined
Date: Fri, 04 Apr 2008 17:46:29 +0200
User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.2.50 (gnu/linux)

On Tue, Mar 25 2008, Kurt Hornik wrote:

> I see that ESS has
> ;; XEmacs <= 21.4.15 needs this
> (if (not (fboundp 'line-beginning-position))
>     (defalias 'line-beginning-position 'point-at-bol))
> so this should do the job.  

Bad idea.  This is a recipe for trouble.  No package should define
function out of its own namespace.  Please report it as a bug to the
ESS maintainer.

,----[ (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/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]