+2014-07-27 Fabián Ezequiel Gallina <fgallina@gnu.org>
+
+ Cleanup error signals. (Bug#18067)
+ * progmodes/python.el
+ (python-indent-shift-left): Use user-error instead.
+ (python-shell-prompt-detect): Use lwarn with python group.
+ (python-completion-complete-at-point)
+ (python-eldoc--get-doc-at-point): Don't signal error.
+
2014-07-27 Fabián Ezequiel Gallina <fgallina@gnu.org>
Support for packages in Python shell. (Bug#13570)
(while (< (point) end)
(if (and (< (current-indentation) count)
(not (looking-at "[ \t]*$")))
- (error "Can't shift all lines enough"))
+ (user-error "Can't shift all lines enough"))
(forward-line))
(indent-rigidly start end (- count))))))
-(add-to-list 'debug-ignored-errors "^Can't shift all lines enough")
-
(defun python-indent-shift-right (start end &optional count)
"Shift lines contained in region START END by COUNT columns to the right.
COUNT defaults to `python-indent-offset'. If region isn't
nil)))
(when (and (not prompts)
python-shell-prompt-detect-failure-warning)
- (warn
+ (lwarn
+ '(python python-shell-prompt-regexp)
+ :warning
(concat
"Python shell prompts cannot be detected.\n"
"If your emacs session hangs when starting python shells\n"
`python-shell-send-buffer' from time to time so context in
inferior Python process is updated properly."
(let ((process (python-shell-get-process)))
- (if (not process)
- (error "Completion needs an inferior Python process running")
+ (when process
(python-shell-completion-complete-at-point process))))
-(add-to-list 'debug-ignored-errors
- "^Completion needs an inferior Python process running.")
-
\f
;;; Fill paragraph
returns will be used. If not FORCE-PROCESS is passed what
`python-shell-get-process' returns is used."
(let ((process (or force-process (python-shell-get-process))))
- (if (not process)
- (error "Eldoc needs an inferior Python process running")
+ (when process
(let ((input (or force-input
(python-info-current-symbol t))))
(and input
nil nil symbol))))
(message (python-eldoc--get-doc-at-point symbol)))
-(add-to-list 'debug-ignored-errors
- "^Eldoc needs an inferior Python process running.")
-
\f
;;; Imenu