Re: Any want to test buffer-substring patches?

Bob Rogers <[email protected]>
Newsgroups gmane.lisp.ilisp.devel
Message-ID <[email protected]>
   From: Kevin Rosenberg <[email protected]>
   Date: Fri, 25 Oct 2002 05:59:29 -0600

   Thanks very much for all of your help.

   I've replaced ilisp-buffer-substring with
   buffer-substring-no-properties and added the following form to
   ilcompat.el per recommendations:

   (cond ((fboundp 'buffer-substring-no-properties)
	  ;; nothing to do (emacs 19,20,&21, xemacs 21)
	  )
	  ((fboundp 'set-text-properties)
	   ;; I believe this is xemacs 20 and before
	   (defun buffer-substring-no-properties (start end)
	     (let ((string
		    (buffer-substring start end)))
	       (set-text-properties 0 (length string) nil string)
	       string)))
	  (t
	   ;; hope that buffer-substring works okay on this platform ;-)
	   (defun buffer-substring-no-properties (start end)
	     (buffer-substring start end))))

FWIW,

   1.  buffer-substring-no-properties was introduced in FSF emacs 19.29
(according to ONEWS in 20.7).

   2.  set-text-properties was supported in the earliest releases of FSF
emacs 19 (according to LNEWS in 20.7).  The code in the second clause
looks like it should work in 20.7, and it ought to work in earlier
versions since no changes to the interface have been advertised in the
*NEWS files.

   3.  So the only emacs that should need the third cond clause above is
emacs 18, which should work because that was before text properties were
introduced.  (The consensus of the earlier discussion was that we should
no longer worry about supporting version 18, but as lots of 18-specific
code is still present, there's no need to break it here.)

					-- Bob Rogers
					   (who is relieved that his
					   recent lisp-slashify change
					   is not at fault here.)
					   http://rgrjr.dyndns.org/


-------------------------------------------------------
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.