Re: Any want to test buffer-substring patches?

"aardvark llama" <[email protected]>
Newsgroups gmane.lisp.ilisp.devel
Message-ID <[email protected]>
>Kevin Rosenberg <[email protected]> writes:
> > Hannu Koivisto wrote:
> >> Urgh, why didn't you just use buffer-substring-no-properties in >> the 
>code?
> >
> > Because buffer-substring-no-properties is not supported by older > emacs 
>and xemacs versions.
There was a discussion a while back talking about what versions of emacs or 
xemacs would we support and *I think* the decision was to not deliberately 
break code that worked on older (x)emacs versions but that the only 
supported versions were the current stable release.

>If that is really an issue, then I'd do either
>
>(unless (fboundp 'buffer-substring-no-properties)
>   (defalias 'buffer-substring-no-properties 'buffer-substring))
>
>or if the semantics of buffer-substring in those versions cause
>problems to software using buffer-substring-no-properties (I don't
>think so)
>
>(unless (fboundp 'buffer-substring-no-properties)
>   (defun buffer-substring-no-properties (start end)
>     use-whatever-those-old-versions-support-then))
>
>...in the compatibility code.
This sounds like a good fix to me. (FWIW the xemacs definition of 
buffer-substring-no-properities is:

(defun buffer-substring-no-properties (beg end)
  "Return the text from BEG to END, without text properties, as a string."
  (let ((string (buffer-substring beg end)))
    (set-text-properties 0 (length string) nil string)
    string))
)
>However, I would be interested to know which versions you found not
>to support buffer-substring-no-properties.  Concerning Emacs, 19.34
>supports it so the only problem could be XEmacs and I don't have
>access to old versions of XEmacs, so I can't check.
..and I also don't have access to a version of sufficient vintage. (Looking 
at the xemacs source, buffer-substring-no-properties was introduced early in 
1997.)

:)w

_________________________________________________________________
Broadband? Dial-up? Get reliable MSN Internet Access. 
http://resourcecenter.msn.com/access/plans/default.asp



-------------------------------------------------------
This sf.net email is sponsored by: Influence the future 
of Java(TM) technology. Join the Java Community 
Process(SM) (JCP(SM)) program now. 
http://ads.sourceforge.net/cgi-bin/redirect.pl?sunm0004en
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.