Loaded autopair.el causes errors in pre-command-hook
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-mode.el |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Reproduction:
Use the following emacs initialization file (e.g. ~/.emacs.
---
(delete-
(setq py-install-
(add-to-list 'load-path py-install-
(autoload 'python-mode "python-
---
Start Emacs, open a text file and a Python file, switch between the two files using the "Buffers" menu.
Errors occur, as can be seen in the "*Messages*" buffer:
Error in pre-command-hook: (wrong-
Error in pre-command-hook: (wrong-
Reason for errors:
autopair.el as delivered with wraps an advice around delete-
Fix:
Replaces autopair-
---
=== modified file 'autopair/
--- autopair/
+++ autopair/
@@ -1171,11 +1171,11 @@
(put 'autopair-newline 'delete-selection t)
(defun autopair-
- (let ((name (symbol-name this-command)))
- (and autopair-mode
- (not (eq this-command 'autopair-
- (string-match "^autopair" (symbol-name this-command))
- (autopair-
+ (and autopair-mode
+ (not (eq this-command 'autopair-
+ (symbolp this-command)
+ (string-match "^autopair" (symbol-name this-command))
+ (autopair-
(defadvice cua--pre-
"Don't actually do anything if autopair is about to autowrap. "
---
This patch can also be found in my branch lp:~ufleisch/python-mode/improve-completion.
Related branches
- Andreas Roehler: Approve
-
Diff: 74 lines (+24/-9)2 files modifiedcompletion/pycomplete.py (+16/-4)
completion/test_pycomplete.py (+8/-5)
Changed in python-mode: | |
milestone: | none → 6.0.11 |
Changed in python-mode: | |
status: | New → Fix Committed |
Changed in python-mode: | |
status: | Fix Committed → Fix Released |