Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #764 from tchaikov/patch-1

fix "--colors=<color>" option in ipython.el

There's plenty more work to do getting ipython.el up to date, but at least this gets it running.

closes #757 (duplicate)
  • Loading branch information...
commit db29245f2a9b9265ebae93c1f4018c79a6b3122e 2 parents c1d5988 + 4d5cb6d
@minrk minrk authored
Showing with 13 additions and 12 deletions.
  1. +13 −12 docs/emacs/ipython.el
View
25 docs/emacs/ipython.el
@@ -36,7 +36,7 @@
;; always in ``pylab`` mode with hardcoded light-background colors, you can
;; use::
;;
-;; (setq py-python-command-args '("-pylab" "--colors" "LightBG"))
+;; (setq py-python-command-args '("--pylab" "--colors=LightBG"))
;;
;;
;; NOTE: This mode is currently somewhat alpha and although I hope that it
@@ -217,17 +217,18 @@ the second for a 'normal' command, and the third for a multiline command.")
(setq py-shell-input-prompt-1-regexp "^In \\[[0-9]+\\]: *"
py-shell-input-prompt-2-regexp "^ [.][.][.]+: *" )
;; select a suitable color-scheme
- (unless (member "--colors" py-python-command-args)
- (setq py-python-command-args
- (nconc py-python-command-args
- (list "--colors"
- (cond
- ((eq frame-background-mode 'dark)
- "Linux")
- ((eq frame-background-mode 'light)
- "LightBG")
- (t ; default (backg-mode isn't always set by XEmacs)
- "LightBG"))))))
+ (unless (delq nil
+ (mapcar (lambda (x) (eq (string-match "^--colors=*" x) 0))
+ py-python-command-args))
+ (push (format "--colors=%s"
+ (cond
+ ((eq frame-background-mode 'dark)
+ "Linux")
+ ((eq frame-background-mode 'light)
+ "LightBG")
+ (t ; default (backg-mode isn't always set by XEmacs)
+ "LightBG")))
+ py-python-command-args))
(unless (equal ipython-backup-of-py-python-command py-python-command)
(setq ipython-backup-of-py-python-command py-python-command))
(setq py-python-command ipython-command))
Please sign in to comment.
Something went wrong with that request. Please try again.