[Python-mode] xemacs or Python mode

2011-04-16 Thread Eric S. Johansson

(I originally sent this to the xemacs list and forgot to send it here)

Only Your friendly list mates can tell for sure

In some buffers of Python code and not others when I press the backspace key, it 
tells me:


symbols function definition is void: looking-back.

I'm testing out on the latest branches of Python-mode and I'm trying to figure 
out if this is something I'm doing wrong with xemacs or it is a bug.


What do I need to do to debug this?

--- eric
___
Python-mode mailing list
Python-mode@python.org
http://mail.python.org/mailman/listinfo/python-mode


Re: [Python-mode] xemacs or Python mode

2011-04-16 Thread Andreas Röhler

Am 16.04.2011 18:11, schrieb Eric S. Johansson:

(I originally sent this to the xemacs list and forgot to send it here)

Only Your friendly list mates can tell for sure

In some buffers of Python code and not others when I press the backspace
key, it tells me:

symbols function definition is void: looking-back.

I'm testing out on the latest branches of Python-mode and I'm trying to
figure out if this is something I'm doing wrong with xemacs or it is a bug.

What do I need to do to debug this?

--- eric
___
Python-mode mailing list
Python-mode@python.org
http://mail.python.org/mailman/listinfo/python-mode



XEmacs should implement it.

Here it is for the moment:

(when (featurep 'xemacs)
  (unless (functionp 'looking-back)
;; from GNU Emacs subr.el
(defun looking-back (regexp optional limit greedy)
  Return non-nil if text before point matches regular expression 
REGEXP.

Like `looking-at' except matches before point, and is slower.
LIMIT if non-nil speeds up the search by specifying a minimum
starting position, to avoid checking matches that would start
before LIMIT.
If GREEDY is non-nil, extend the match backwards as far as possible,
stopping when a single additional previous character cannot be part
of a match for REGEXP.
  (let ((start (point))
(pos
 (save-excursion
   (and (re-search-backward (concat \\(?: regexp 
\\)\\=) limit t)

(point)
(if (and greedy pos)
(save-restriction
  (narrow-to-region (point-min) start)
  (while (and ( pos (point-min))
  (save-excursion
(goto-char pos)
(backward-char 1)
(looking-at (concat \\(?:  regexp 
\\)\\'

(setq pos (1- pos)))
  (save-excursion
(goto-char pos)
(looking-at (concat \\(?:  regexp \\)\\')
(not (null pos))
___
Python-mode mailing list
Python-mode@python.org
http://mail.python.org/mailman/listinfo/python-mode


Re: [Python-mode] xemacs or Python mode

2011-04-16 Thread Andreas Röhler

Am 16.04.2011 21:44, schrieb Eric S. Johansson:

On 4/16/2011 1:31 PM, Andreas Röhler wrote:

Am 16.04.2011 18:11, schrieb Eric S. Johansson:




XEmacs should implement it.

it should but I'm getting the exception.



Here it is for the moment:


hmm could not find this code in the myrkid branch.



Do another `bzr pull' to get it.
Just pushed it up.
___
Python-mode mailing list
Python-mode@python.org
http://mail.python.org/mailman/listinfo/python-mode