Python mode - `C-c |' feature suggestion

François Pinard pinard at
Tue Feb 22 16:55:34 EST 2000

Alex <alex at> writes:

> Must-be-an-anti-XEmacs-conspiracy'ly

I sometimes wonder, yes.  (Even if I don't use XEmacs much myself :-).

> > The `-no-properties' functions are less portable.

> It just popped up when I hit complete.

Just to be complete, it does happen that properties get in the way.
In some portable code, I use this:

;; Protect string comparisons from text properties if possible.
  (fset 'po-buffer-substring
	(symbol-function (if (fboundp 'buffer-substring-no-properties)
  (if (fboundp 'match-string-no-properties)
      (fset 'po-match-string (symbol-function 'match-string-no-properties))

    (defun po-match-string (number)
      "Return string of text matched by last search."
      (po-buffer-substring (match-beginning number) (match-end number)))))

François Pinard

More information about the Python-list mailing list