[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: python.el update
From: |
Stefan Monnier |
Subject: |
Re: python.el update |
Date: |
06 May 2004 16:24:05 -0400 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 |
> These changes to python.el are relative to a previous revision (before
> one or more rounds of compilation changes) and won't now apply
> cleanly, but I'm not currently in a position to merge and test them.
> They rely on a new file of Python code living in `etc' (also
> attached).
I have updated it to the latest version and installed it.
Hopefully I haven't introduced any new bug.
Please check it out.
Notes about the patch I installed:
-- I see you added a python-comment-indent that aligns the comment to the
one on the previous line. It looks a bit simplistic: it never uses
comment-column and it will align strangely as follows:
foo # some comment
# here is a new strangely aligned comment.
Furthermore, the default code should already DTRT since it delegates the
work to indent-according-to-mode. So could you explain why you need
a specific function? Maybe we can fix the generic code instead.
-- python-comment-line-p seems wrong: it returns nil on a blank line
contrary to what the doc says.
-- I've changed the
(define-key map (car (where-is-internal 'complete-symbol (list global-map)))
'python-complete-symbol)
into
(substitute-key-definition 'complete-symbol 'python-complete-symbol
map global-map)
because complete-symbol might not be bound to any key (as is the case for
me).
-- I've moved the define-keys for inferior-python-mode to a defvar.
-- What's the point of
(define-key inferior-python-mode-map "\C-c\C-z" 'python-switch-to-python)
since inferior-python-mode-map is presumably only active when we're
already in the python process buffer?
-- Any hope to see the emacs.py file included in the python distribution?
-- I've replaced
(with-output-to-temp-buffer "*Help*"
with
(help-setup-xref (list 'python-describe-symbol symbol))
(with-output-to-temp-buffer (help-buffer)
so that a [back] button could work and so that if you add help-style xrefs
you will be able to follow those refs in a *Help*<2> buffer without being
moved to the *Help* buffer.
It'd be great to extend help-mode.el so you can provide your own xrefs
for such non-elisp-help uses.
-- Regarding your comment before python-complete-symbol saying we should
have something like that in the core, I agree and we basically already
have it: minibuffer-complete. It should just use field-string,
field-beginning, ... instead of minibuffer-content,
minibuffer-prompt-end, ... I actually use a reimplementation of the
minibuffer-complete code that has this property and use it for
a homegrown latex-complete command. Works just fine: place an overlay
(with a `field' property on it) around the thing you want to complete
and call minibuffer-complete.
Stefan