aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes
diff options
context:
space:
mode:
authorJoakim Verona2011-09-05 10:37:16 +0200
committerJoakim Verona2011-09-05 10:37:16 +0200
commit687faaf59cdf4029b5e8da16965b257592059e37 (patch)
treec19fc758dc421ec1e6619de88d7cd70258927b47 /lisp/progmodes
parentd47f8c5baeaa804548a73675077c8e37cdfe5142 (diff)
parentf62bd846552a090f3ba5e136d6d9cdb4c07ed7be (diff)
downloademacs-687faaf59cdf4029b5e8da16965b257592059e37.tar.gz
emacs-687faaf59cdf4029b5e8da16965b257592059e37.zip
upstream
Diffstat (limited to 'lisp/progmodes')
-rw-r--r--lisp/progmodes/compile.el2
-rw-r--r--lisp/progmodes/grep.el9
-rw-r--r--lisp/progmodes/python.el12
3 files changed, 8 insertions, 15 deletions
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index 79fec080d57..5f99cfe0028 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -2413,7 +2413,7 @@ and overlay is highlighted between MK and END-MK."
2413 ;; display the source in another window. 2413 ;; display the source in another window.
2414 (let ((pop-up-windows t)) 2414 (let ((pop-up-windows t))
2415 (pop-to-buffer (marker-buffer mk) 'other-window)) 2415 (pop-to-buffer (marker-buffer mk) 'other-window))
2416 (pop-to-buffer-same-window (marker-buffer mk))) 2416 (switch-to-buffer (marker-buffer mk)))
2417 (unless (eq (goto-char mk) (point)) 2417 (unless (eq (goto-char mk) (point))
2418 ;; If narrowing gets in the way of going to the right place, widen. 2418 ;; If narrowing gets in the way of going to the right place, widen.
2419 (widen) 2419 (widen)
diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el
index 709f01444bf..eeebcc6648f 100644
--- a/lisp/progmodes/grep.el
+++ b/lisp/progmodes/grep.el
@@ -459,7 +459,7 @@ Set up `compilation-exit-message-function' and run `grep-setup-hook'."
459 ;; GREP_COLOR is used in GNU grep 2.5.1, but deprecated in later versions 459 ;; GREP_COLOR is used in GNU grep 2.5.1, but deprecated in later versions
460 (setenv "GREP_COLOR" "01;31") 460 (setenv "GREP_COLOR" "01;31")
461 ;; GREP_COLORS is used in GNU grep 2.5.2 and later versions 461 ;; GREP_COLORS is used in GNU grep 2.5.2 and later versions
462 (setenv "GREP_COLORS" "mt=01;31:fn=:ln=:bn=:se=:ml=:cx=:ne")) 462 (setenv "GREP_COLORS" "mt=01;31:fn=:ln=:bn=:se=:sl=:cx=:ne"))
463 (set (make-local-variable 'compilation-exit-message-function) 463 (set (make-local-variable 'compilation-exit-message-function)
464 (lambda (status code msg) 464 (lambda (status code msg)
465 (if (eq status 'exit) 465 (if (eq status 'exit)
@@ -480,20 +480,21 @@ Set up `compilation-exit-message-function' and run `grep-setup-hook'."
480This function is called from `compilation-filter-hook'." 480This function is called from `compilation-filter-hook'."
481 (save-excursion 481 (save-excursion
482 (forward-line 0) 482 (forward-line 0)
483 (let ((end (point))) 483 (let ((end (point)) beg)
484 (goto-char compilation-filter-start) 484 (goto-char compilation-filter-start)
485 (forward-line 0) 485 (forward-line 0)
486 (setq beg (point))
486 ;; Only operate on whole lines so we don't get caught with part of an 487 ;; Only operate on whole lines so we don't get caught with part of an
487 ;; escape sequence in one chunk and the rest in another. 488 ;; escape sequence in one chunk and the rest in another.
488 (when (< (point) end) 489 (when (< (point) end)
489 (setq end (copy-marker end)) 490 (setq end (copy-marker end))
490 ;; Highlight grep matches and delete marking sequences. 491 ;; Highlight grep matches and delete marking sequences.
491 (while (re-search-forward "\033\\[01;31m\\(.*?\\)\033\\[[0-9]*m" end 1) 492 (while (re-search-forward "\033\\[0?1;31m\\(.*?\\)\033\\[[0-9]*m" end 1)
492 (replace-match (propertize (match-string 1) 493 (replace-match (propertize (match-string 1)
493 'face nil 'font-lock-face grep-match-face) 494 'face nil 'font-lock-face grep-match-face)
494 t t)) 495 t t))
495 ;; Delete all remaining escape sequences 496 ;; Delete all remaining escape sequences
496 (goto-char compilation-filter-start) 497 (goto-char beg)
497 (while (re-search-forward "\033\\[[0-9;]*[mK]" end 1) 498 (while (re-search-forward "\033\\[[0-9;]*[mK]" end 1)
498 (replace-match "" t t)))))) 499 (replace-match "" t t))))))
499 500
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index 4d2f15c69d8..3f923f496b9 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -296,7 +296,7 @@ Used for syntactic keywords. N is the match number (1, 2 or 3)."
296 :filter (lambda (&rest junk) 296 :filter (lambda (&rest junk)
297 (abbrev-table-menu python-mode-abbrev-table))) 297 (abbrev-table-menu python-mode-abbrev-table)))
298 "-" 298 "-"
299 ["Start interpreter" python-shell 299 ["Start interpreter" run-python
300 :help "Run `inferior' Python in separate buffer"] 300 :help "Run `inferior' Python in separate buffer"]
301 ["Import/reload file" python-load-file 301 ["Import/reload file" python-load-file
302 :help "Load into inferior Python session"] 302 :help "Load into inferior Python session"]
@@ -328,14 +328,6 @@ Used for syntactic keywords. N is the match number (1, 2 or 3)."
328;; eric has items including: (un)indent, (un)comment, restart script, 328;; eric has items including: (un)indent, (un)comment, restart script,
329;; run script, debug script; also things for profiling, unit testing. 329;; run script, debug script; also things for profiling, unit testing.
330 330
331(defvar python-shell-map
332 (let ((map (copy-keymap comint-mode-map)))
333 (define-key map [tab] 'tab-to-tab-stop)
334 (define-key map "\C-c-" 'py-up-exception)
335 (define-key map "\C-c=" 'py-down-exception)
336 map)
337 "Keymap used in *Python* shell buffers.")
338
339(defvar python-mode-syntax-table 331(defvar python-mode-syntax-table
340 (let ((table (make-syntax-table))) 332 (let ((table (make-syntax-table)))
341 ;; Give punctuation syntax to ASCII that normally has symbol 333 ;; Give punctuation syntax to ASCII that normally has symbol
@@ -1345,7 +1337,7 @@ local value.")
1345 (define-key map "\C-c\C-l" 'python-load-file) 1337 (define-key map "\C-c\C-l" 'python-load-file)
1346 (define-key map "\C-c\C-v" 'python-check) 1338 (define-key map "\C-c\C-v" 'python-check)
1347 ;; Note that we _can_ still use these commands which send to the 1339 ;; Note that we _can_ still use these commands which send to the
1348 ;; Python process even at the prompt iff we have a normal prompt, 1340 ;; Python process even at the prompt if we have a normal prompt,
1349 ;; i.e. '>>> ' and not '... '. See the comment before 1341 ;; i.e. '>>> ' and not '... '. See the comment before
1350 ;; python-send-region. Fixme: uncomment these if we address that. 1342 ;; python-send-region. Fixme: uncomment these if we address that.
1351 1343