aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes
diff options
context:
space:
mode:
authorMiles Bader2007-03-18 14:11:08 +0000
committerMiles Bader2007-03-18 14:11:08 +0000
commita72ea5f5b087a4cb68bac19ca5945e636a0b171f (patch)
treeccb5b746322b106948bb887966905ae87114f66b /lisp/progmodes
parent5f0813fa6d43b780adae1cb47835ae70adcb3b12 (diff)
parent7ab2e82f0e19aead5fafaf7f959e4db29f3926b5 (diff)
downloademacs-a72ea5f5b087a4cb68bac19ca5945e636a0b171f.tar.gz
emacs-a72ea5f5b087a4cb68bac19ca5945e636a0b171f.zip
Merge from emacs--devo--0
Patches applied: * emacs--devo--0 (patch 662-669) - Update from CVS - Fix read-only prompt problem in isearch - Merge from gnus--rel--5.10 * gnus--rel--5.10 (patch 207-208) - Merge from emacs--devo--0 - Update from CVS Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-184
Diffstat (limited to 'lisp/progmodes')
-rw-r--r--lisp/progmodes/cc-engine.el100
-rw-r--r--lisp/progmodes/cc-mode.el142
-rw-r--r--lisp/progmodes/cperl-mode.el4
-rw-r--r--lisp/progmodes/grep.el3
-rw-r--r--lisp/progmodes/gud.el5
-rw-r--r--lisp/progmodes/hideshow.el14
-rw-r--r--lisp/progmodes/idlw-help.el8
-rw-r--r--lisp/progmodes/python.el12
8 files changed, 253 insertions, 35 deletions
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el
index f69382c9d70..a901ee07454 100644
--- a/lisp/progmodes/cc-engine.el
+++ b/lisp/progmodes/cc-engine.el
@@ -1912,6 +1912,26 @@ comment at the start of cc-engine.el for more info."
1912 ))) 1912 )))
1913 1913
1914 1914
1915;; Other whitespace tools
1916(defun c-partial-ws-p (beg end)
1917 ;; Is the region (beg end) WS, and is there WS (or BOB/EOB) next to the
1918 ;; region? This is a "heuristic" function. .....
1919 ;;
1920 ;; The motivation for the second bit is to check whether the removal of this
1921 ;; space is to check whether removing this region would coalesce two
1922 ;; symbols.
1923 ;;
1924 ;; FIXME!!! This function doesn't check virtual semicolons in any way. Be
1925 ;; careful about using this function for, e.g. AWK. (2007/3/7)
1926 (save-excursion
1927 (let ((end+1 (min (1+ end) (point-max))))
1928 (or (progn (goto-char (max (point-min) (1- beg)))
1929 (c-skip-ws-forward end)
1930 (eq (point) end))
1931 (progn (goto-char beg)
1932 (c-skip-ws-forward end+1)
1933 (eq (point) end+1))))))
1934
1915;; A system for finding noteworthy parens before the point. 1935;; A system for finding noteworthy parens before the point.
1916 1936
1917(defvar c-state-cache nil) 1937(defvar c-state-cache nil)
@@ -2491,24 +2511,25 @@ comment at the start of cc-engine.el for more info."
2491 ;; Move to the beginning of the current token. Do not move if not 2511 ;; Move to the beginning of the current token. Do not move if not
2492 ;; in the middle of one. BACK-LIMIT may be used to bound the 2512 ;; in the middle of one. BACK-LIMIT may be used to bound the
2493 ;; backward search; if given it's assumed to be at the boundary 2513 ;; backward search; if given it's assumed to be at the boundary
2494 ;; between two tokens. 2514 ;; between two tokens. Return non-nil if the point is move, nil
2515 ;; otherwise.
2495 ;; 2516 ;;
2496 ;; This function might do hidden buffer changes. 2517 ;; This function might do hidden buffer changes.
2497 (if (looking-at "\\w\\|\\s_")
2498 (skip-syntax-backward "w_" back-limit)
2499 (let ((start (point))) 2518 (let ((start (point)))
2500 (when (< (skip-syntax-backward ".()" back-limit) 0) 2519 (if (looking-at "\\w\\|\\s_")
2501 (while (let ((pos (or (and (looking-at c-nonsymbol-token-regexp) 2520 (skip-syntax-backward "w_" back-limit)
2502 (match-end 0)) 2521 (when (< (skip-syntax-backward ".()" back-limit) 0)
2503 ;; `c-nonsymbol-token-regexp' should always match 2522 (while (let ((pos (or (and (looking-at c-nonsymbol-token-regexp)
2504 ;; since we've skipped backward over punctuator 2523 (match-end 0))
2505 ;; or paren syntax, but consume one char in case 2524 ;; `c-nonsymbol-token-regexp' should always match
2506 ;; it doesn't so that we don't leave point before 2525 ;; since we've skipped backward over punctuator
2507 ;; some earlier incorrect token. 2526 ;; or paren syntax, but consume one char in case
2508 (1+ (point))))) 2527 ;; it doesn't so that we don't leave point before
2509 (if (<= pos start) 2528 ;; some earlier incorrect token.
2510 (goto-char pos)) 2529 (1+ (point)))))
2511 (< pos start))))))) 2530 (if (<= pos start)
2531 (goto-char pos))))))
2532 (< (point) start)))
2512 2533
2513(defun c-end-of-current-token (&optional back-limit) 2534(defun c-end-of-current-token (&optional back-limit)
2514 ;; Move to the end of the current token. Do not move if not in the 2535 ;; Move to the end of the current token. Do not move if not in the
@@ -3957,6 +3978,9 @@ comment at the start of cc-engine.el for more info."
3957;; file, and we only use this as a last resort in ambiguous cases (see 3978;; file, and we only use this as a last resort in ambiguous cases (see
3958;; `c-forward-decl-or-cast-1'). 3979;; `c-forward-decl-or-cast-1').
3959;; 3980;;
3981;; Not every type need be in this cache. However, things which have
3982;; ceased to be types must be removed from it.
3983;;
3960;; Template types in C++ are added here too but with the template 3984;; Template types in C++ are added here too but with the template
3961;; arglist replaced with "<>" in references or "<" for the one in the 3985;; arglist replaced with "<>" in references or "<" for the one in the
3962;; primary type. E.g. the type "Foo<A,B>::Bar<C>" is stored as 3986;; primary type. E.g. the type "Foo<A,B>::Bar<C>" is stored as
@@ -3990,6 +4014,10 @@ comment at the start of cc-engine.el for more info."
3990 (unintern (substring type 0 -1) c-found-types) 4014 (unintern (substring type 0 -1) c-found-types)
3991 (intern type c-found-types)))) 4015 (intern type c-found-types))))
3992 4016
4017(defun c-unfind-type (name)
4018 ;; Remove the "NAME" from c-found-types, if present.
4019 (unintern name c-found-types))
4020
3993(defsubst c-check-type (from to) 4021(defsubst c-check-type (from to)
3994 ;; Return non-nil if the given region contains a type in 4022 ;; Return non-nil if the given region contains a type in
3995 ;; `c-found-types'. 4023 ;; `c-found-types'.
@@ -4008,6 +4036,48 @@ comment at the start of cc-engine.el for more info."
4008 c-found-types) 4036 c-found-types)
4009 (sort type-list 'string-lessp))) 4037 (sort type-list 'string-lessp)))
4010 4038
4039(defun c-trim-found-types (beg end old-len)
4040 ;; An after change function which, in conjunction with the info in
4041 ;; c-maybe-stale-found-type (set in c-before-change), removes a type
4042 ;; from `c-found-types', should this type have become stale. For
4043 ;; example, this happens to "foo" when "foo \n bar();" becomes
4044 ;; "foo(); \n bar();". Such stale types, if not removed, foul up
4045 ;; the fontification.
4046 ;;
4047 ;; Have we, perhaps, added non-ws characters to the front/back of a found
4048 ;; type?
4049 (when (> end beg)
4050 (save-excursion
4051 (when (< end (point-max))
4052 (goto-char end)
4053 (if (and (c-beginning-of-current-token) ; only moves when we started in the middle
4054 (progn (goto-char end)
4055 (c-end-of-current-token)))
4056 (c-unfind-type (buffer-substring-no-properties
4057 end (point)))))
4058 (when (> beg (point-min))
4059 (goto-char beg)
4060 (if (and (c-end-of-current-token) ; only moves when we started in the middle
4061 (progn (goto-char beg)
4062 (c-beginning-of-current-token)))
4063 (c-unfind-type (buffer-substring-no-properties
4064 (point) beg))))))
4065
4066 (if c-maybe-stale-found-type ; e.g. (c-decl-id-start "foo" 97 107 " (* ooka) " "o")
4067 (cond
4068 ;; Changing the amount of (already existing) whitespace - don't do anything.
4069 ((and (c-partial-ws-p beg end)
4070 (or (= beg end) ; removal of WS
4071 ; (string-match "\\s *\\'" (nth 5 c-maybe-stale-found-type))
4072 (string-match "^[ \t\n\r\f\v]*$" (nth 5 c-maybe-stale-found-type)))))
4073
4074 ;; The syntactic relationship which defined a "found type" has been
4075 ;; destroyed.
4076 ((eq (car c-maybe-stale-found-type) 'c-decl-id-start)
4077 (c-unfind-type (cadr c-maybe-stale-found-type)))
4078;; ((eq (car c-maybe-stale-found-type) 'c-decl-type-start) FIXME!!!
4079 )))
4080
4011 4081
4012;; Handling of small scale constructs like types and names. 4082;; Handling of small scale constructs like types and names.
4013 4083
diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el
index e2891bde98d..1407b497305 100644
--- a/lisp/progmodes/cc-mode.el
+++ b/lisp/progmodes/cc-mode.el
@@ -412,8 +412,143 @@ preferably use the `c-mode-menu' language constant directly."
412;; temporary changes in some font lock support modes, causing extra 412;; temporary changes in some font lock support modes, causing extra
413;; unnecessary work and font lock glitches due to interactions between 413;; unnecessary work and font lock glitches due to interactions between
414;; various text properties. 414;; various text properties.
415 415;;
416(defun c-after-change (beg end len) 416;; (2007-02-12): The macro `combine-after-change-calls' ISN'T used any
417;; more.
418
419(defun c-unfind-enclosing-token (pos)
420 ;; If POS is wholly inside a token, remove that id from
421 ;; `c-found-types', should it be present. Return t if we were in an
422 ;; id, else nil.
423 (save-excursion
424 (let ((tok-beg (progn (goto-char pos)
425 (and (c-beginning-of-current-token) (point))))
426 (tok-end (progn (goto-char pos)
427 (and (c-end-of-current-token) (point)))))
428 (when (and tok-beg tok-end)
429 (c-unfind-type (buffer-substring-no-properties tok-beg tok-end))
430 t))))
431
432(defun c-unfind-coalesced-tokens (beg end)
433 ;; unless the non-empty region (beg end) is entirely WS and there's at
434 ;; least one character of WS just before or after this region, remove
435 ;; the tokens which touch the region from `c-found-types' should they
436 ;; be present.
437 (or (c-partial-ws-p beg end)
438 (save-excursion
439 (progn
440 (goto-char beg)
441 (or (eq beg (point-min))
442 (c-skip-ws-backward (1- beg))
443 (/= (point) beg)
444 (= (c-backward-token-2) 1)
445 (c-unfind-type (buffer-substring-no-properties
446 (point) beg)))
447 (goto-char end)
448 (or (eq end (point-max))
449 (c-skip-ws-forward (1+ end))
450 (/= (point) end)
451 (progn (forward-char) (c-end-of-current-token) nil)
452 (c-unfind-type (buffer-substring-no-properties
453 end (point))))))))
454
455;; c-maybe-stale-found-type records a place near the region being
456;; changed where an element of `found-types' might become stale. It
457;; is set in c-before-change and is either nil, or has the form:
458;;
459;; (c-decl-id-start "foo" 97 107 " (* ooka) " "o"), where
460;;
461;; o - `c-decl-id-start' is the c-type text property value at buffer
462;; pos 96.
463;;
464;; o - 97 107 is the region potentially containing the stale type -
465;; this is delimited by a non-nil c-type text property at 96 and
466;; either another one or a ";", "{", or "}" at 107.
467;;
468;; o - " (* ooka) " is the (before change) buffer portion containing
469;; the suspect type (here "ooka").
470;;
471;; o - "o" is the buffer contents which is about to be deleted. This
472;; would be the empty string for an insertion.
473(defvar c-maybe-stale-found-type nil)
474(make-variable-buffer-local 'c-maybe-stale-found-type)
475
476(defun c-before-change (beg end)
477 ;; Function to be put on `before-change-function'. Currently
478 ;; (2007-02) it is used only to remove stale entries from the
479 ;; `c-found-types' cache, and to record entries which a
480 ;; `c-after-change' function might confirm as stale.
481 ;;
482 ;; Note that this function must be FAST rather than accurate. Note
483 ;; also that it only has any effect when font locking is enabled.
484 ;; We exploit this by checking for font-lock-*-face instead of doing
485 ;; rigourous syntactic analysis.
486
487 ;; If either change boundary is wholly inside an identifier, delete
488 ;; it/them from the cache. Don't worry about being inside a string
489 ;; or a comment - "wrongly" removing a symbol from `c-found-types'
490 ;; isn't critical.
491 (setq c-maybe-stale-found-type nil)
492 (save-restriction
493 (save-match-data
494 (widen)
495 (save-excursion
496 ;; Are we inserting/deleting stuff in the middle of an identifier?
497 (c-unfind-enclosing-token beg)
498 (c-unfind-enclosing-token end)
499 ;; Are we coalescing two tokens together, e.g. "fo o" -> "foo"?
500 (when (< beg end)
501 (c-unfind-coalesced-tokens beg end))
502 ;; Are we (potentially) disrupting the syntactic context which
503 ;; makes a type a type? E.g. by inserting stuff after "foo" in
504 ;; "foo bar;", or before "foo" in "typedef foo *bar;"?
505 ;;
506 ;; We search for appropriate c-type properties "near" the change.
507 ;; First, find an appropriate boundary for this property search.
508 (let (lim
509 type type-pos
510 marked-id term-pos
511 (end1
512 (if (eq (get-text-property end 'face) 'font-lock-comment-face)
513 (previous-single-property-change end 'face)
514 end)))
515 (when (>= end1 beg) ; Don't hassle about changes entirely in comments.
516 ;; Find a limit for the search for a `c-type' property
517 (while
518 (and (/= (skip-chars-backward "^;{}") 0)
519 (> (point) (point-min))
520 (memq (c-get-char-property (1- (point)) 'face)
521 '(font-lock-comment-face font-lock-string-face))))
522 (setq lim (max (point-min) (1- (point))))
523
524 ;; Look for the latest `c-type' property before end1
525 (when (and (> end1 1)
526 (setq type-pos
527 (if (get-text-property (1- end1) 'c-type)
528 end1
529 (previous-single-property-change end1 'c-type nil lim))))
530 (setq type (get-text-property (max (1- type-pos) lim) 'c-type))
531
532 (when (memq type '(c-decl-id-start c-decl-type-start))
533 ;; Get the identifier, if any, that the property is on.
534 (goto-char (1- type-pos))
535 (setq marked-id
536 (when (looking-at "\\(\\sw\\|\\s_\\)")
537 (c-beginning-of-current-token)
538 (buffer-substring-no-properties (point) type-pos)))
539
540 (goto-char end1)
541 (skip-chars-forward "^;{}") ; FIXME!!! loop for comment, maybe
542 (setq lim (point))
543 (setq term-pos
544 (or (next-single-property-change end 'c-type nil lim) lim))
545 (setq c-maybe-stale-found-type
546 (list type marked-id
547 type-pos term-pos
548 (buffer-substring-no-properties type-pos term-pos)
549 (buffer-substring-no-properties beg end)))))))))))
550
551(defun c-after-change (beg end old-len)
417 ;; Function put on `after-change-functions' to adjust various caches 552 ;; Function put on `after-change-functions' to adjust various caches
418 ;; etc. Prefer speed to finesse here, since there will be an order 553 ;; etc. Prefer speed to finesse here, since there will be an order
419 ;; of magnitude more calls to this function than any of the 554 ;; of magnitude more calls to this function than any of the
@@ -441,6 +576,7 @@ preferably use the `c-mode-menu' language constant directly."
441 (when (> beg end) 576 (when (> beg end)
442 (setq beg end))) 577 (setq beg end)))
443 578
579 (c-trim-found-types beg end old-len) ; maybe we don't need all of these.
444 (c-invalidate-sws-region-after beg end) 580 (c-invalidate-sws-region-after beg end)
445 (c-invalidate-state-cache beg) 581 (c-invalidate-state-cache beg)
446 (c-invalidate-find-decl-cache beg) 582 (c-invalidate-find-decl-cache beg)
@@ -577,6 +713,8 @@ that requires a literal mode spec at compile time."
577 713
578 ;; Install the functions that ensure that various internal caches 714 ;; Install the functions that ensure that various internal caches
579 ;; don't become invalid due to buffer changes. 715 ;; don't become invalid due to buffer changes.
716 (make-local-hook 'before-change-functions)
717 (add-hook 'before-change-functions 'c-before-change nil t)
580 (make-local-hook 'after-change-functions) 718 (make-local-hook 'after-change-functions)
581 (add-hook 'after-change-functions 'c-after-change nil t)) 719 (add-hook 'after-change-functions 'c-after-change nil t))
582 720
diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el
index 29f4cc372d3..0b8287503f8 100644
--- a/lisp/progmodes/cperl-mode.el
+++ b/lisp/progmodes/cperl-mode.el
@@ -1795,8 +1795,8 @@ or as help on variables `cperl-tips', `cperl-problems',
1795 ((boundp 'compilation-error-regexp-alist);; xmeacs 19.x 1795 ((boundp 'compilation-error-regexp-alist);; xmeacs 19.x
1796 (make-local-variable 'compilation-error-regexp-alist) 1796 (make-local-variable 'compilation-error-regexp-alist)
1797 (set 'compilation-error-regexp-alist 1797 (set 'compilation-error-regexp-alist
1798 (cons cperl-compilation-error-regexp-alist 1798 (append cperl-compilation-error-regexp-alist
1799 (symbol-value 'compilation-error-regexp-alist))))) 1799 (symbol-value 'compilation-error-regexp-alist)))))
1800 (make-local-variable 'font-lock-defaults) 1800 (make-local-variable 'font-lock-defaults)
1801 (setq font-lock-defaults 1801 (setq font-lock-defaults
1802 (cond 1802 (cond
diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el
index a0dd83fb974..fe2bbdec14e 100644
--- a/lisp/progmodes/grep.el
+++ b/lisp/progmodes/grep.el
@@ -157,7 +157,8 @@ The following place holders should be present in the string:
157 :type 'alist 157 :type 'alist
158 :group 'grep) 158 :group 'grep)
159 159
160(defcustom grep-find-ignored-directories '("CVS" ".svn" "{arch}" ".hg" "_darcs") 160(defcustom grep-find-ignored-directories '("CVS" ".svn" "{arch}" ".hg" "_darcs"
161 ".git" ".bzr")
161 "*List of names of sub-directories which `rgrep' shall not recurse into." 162 "*List of names of sub-directories which `rgrep' shall not recurse into."
162 :type '(repeat string) 163 :type '(repeat string)
163 :group 'grep) 164 :group 'grep)
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el
index 1662af1c924..8db7c28219e 100644
--- a/lisp/progmodes/gud.el
+++ b/lisp/progmodes/gud.el
@@ -690,7 +690,10 @@ session."
690 (buffer-name gud-comint-buffer) 690 (buffer-name gud-comint-buffer)
691 (get-buffer-process gud-comint-buffer) 691 (get-buffer-process gud-comint-buffer)
692 (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba))) 692 (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba)))
693 (error "Multiple debugging requires restarting in text command mode")) 693 (let ((same-window-regexps))
694 (display-buffer gud-comint-buffer)
695 (error
696 "Multiple debugging requires restarting in text command mode")))
694 697
695 (gud-common-init command-line nil 'gud-gdb-marker-filter) 698 (gud-common-init command-line nil 'gud-gdb-marker-filter)
696 (set (make-local-variable 'gud-minor-mode) 'gdb) 699 (set (make-local-variable 'gud-minor-mode) 'gdb)
diff --git a/lisp/progmodes/hideshow.el b/lisp/progmodes/hideshow.el
index 35ab0362613..3bc1c55cc7d 100644
--- a/lisp/progmodes/hideshow.el
+++ b/lisp/progmodes/hideshow.el
@@ -906,11 +906,18 @@ Key bindings:
906 (if hs-minor-mode 906 (if hs-minor-mode
907 (progn 907 (progn
908 (hs-grok-mode-type) 908 (hs-grok-mode-type)
909 ;; Turn off this mode if we change major modes.
910 (add-hook 'change-major-mode-hook
911 (lambda () (hs-minor-mode -1))
912 nil t)
909 (easy-menu-add hs-minor-mode-menu) 913 (easy-menu-add hs-minor-mode-menu)
910 (set (make-local-variable 'line-move-ignore-invisible) t) 914 (set (make-local-variable 'line-move-ignore-invisible) t)
911 (add-to-invisibility-spec '(hs . t))) 915 (add-to-invisibility-spec '(hs . t)))
912 (easy-menu-remove hs-minor-mode-menu) 916 (easy-menu-remove hs-minor-mode-menu)
913 (remove-from-invisibility-spec '(hs . t))) 917 (remove-from-invisibility-spec '(hs . t))
918 ;; hs-show-all does nothing unless h-m-m is non-nil.
919 (let ((hs-minor-mode t))
920 (hs-show-all)))
914 (run-hooks 'hs-minor-mode-hook)) 921 (run-hooks 'hs-minor-mode-hook))
915 922
916;;--------------------------------------------------------------------------- 923;;---------------------------------------------------------------------------
@@ -945,7 +952,7 @@ Key bindings:
945(add-to-list 'minor-mode-map-alist (cons 'hs-minor-mode hs-minor-mode-map)) 952(add-to-list 'minor-mode-map-alist (cons 'hs-minor-mode hs-minor-mode-map))
946(add-to-list 'minor-mode-alist '(hs-minor-mode " hs") t) 953(add-to-list 'minor-mode-alist '(hs-minor-mode " hs") t)
947 954
948;; make some variables permanently buffer-local 955;; make some variables buffer-local
949(dolist (var '(hs-minor-mode 956(dolist (var '(hs-minor-mode
950 hs-c-start-regexp 957 hs-c-start-regexp
951 hs-block-start-regexp 958 hs-block-start-regexp
@@ -953,8 +960,7 @@ Key bindings:
953 hs-block-end-regexp 960 hs-block-end-regexp
954 hs-forward-sexp-func 961 hs-forward-sexp-func
955 hs-adjust-block-beginning)) 962 hs-adjust-block-beginning))
956 (make-variable-buffer-local var) 963 (make-variable-buffer-local var))
957 (put var 'permanent-local t))
958 964
959;;--------------------------------------------------------------------------- 965;;---------------------------------------------------------------------------
960;; that's it 966;; that's it
diff --git a/lisp/progmodes/idlw-help.el b/lisp/progmodes/idlw-help.el
index a9ceccac6a0..030b785acdf 100644
--- a/lisp/progmodes/idlw-help.el
+++ b/lisp/progmodes/idlw-help.el
@@ -386,8 +386,7 @@ It collects and prints the diagnostics messages."
386 (< beg (- end 4)))) 386 (< beg (- end 4))))
387 module keyword cw mod1 mod2 mod3) 387 module keyword cw mod1 mod2 mod3)
388 (if (or arg 388 (if (or arg
389 (and (not st-ass) 389 (and (not classtag)
390 (not classtag)
391 (not structtag) 390 (not structtag)
392 (not (member (string-to-char this-word) '(?! ?.))))) 391 (not (member (string-to-char this-word) '(?! ?.)))))
393 ;; Need the module information 392 ;; Need the module information
@@ -408,7 +407,8 @@ It collects and prints the diagnostics messages."
408 (arg (setq mod1 module)) 407 (arg (setq mod1 module))
409 408
410 ;; A special topic -- only system help 409 ;; A special topic -- only system help
411 (st-ass (setq mod1 (list (cdr st-ass)))) 410 ((and st-ass (not (memq cw '(function-keyword procedure-keyword))))
411 (setq mod1 (list (cdr st-ass))))
412 412
413 ;; A system variable -- only system help 413 ;; A system variable -- only system help
414 ((string-match 414 ((string-match
@@ -1226,7 +1226,7 @@ Useful when source code is displayed as help. See the option
1226;; we must pass the -profile argument as well. 1226;; we must pass the -profile argument as well.
1227(defvar idlwave-help-assistant-command 1227(defvar idlwave-help-assistant-command
1228 (if (memq system-type '(ms-dos windows-nt)) 1228 (if (memq system-type '(ms-dos windows-nt))
1229 "bin/bin.x86/idl_assistant" 1229 "bin/bin.x86/idl_assistant.exe"
1230 "bin/idl_assistant") 1230 "bin/idl_assistant")
1231 "The command, rooted at idlwave-system-directory, which invokes the 1231 "The command, rooted at idlwave-system-directory, which invokes the
1232IDL assistant.") 1232IDL assistant.")
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index 38e846aa2cc..6c37fb859e1 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -1383,11 +1383,11 @@ buffer for a list of commands.)"
1383COMMAND should be a single statement." 1383COMMAND should be a single statement."
1384 ;; (assert (not (string-match "\n" command))) 1384 ;; (assert (not (string-match "\n" command)))
1385 ;; (let ((end (marker-position (process-mark (python-proc))))) 1385 ;; (let ((end (marker-position (process-mark (python-proc)))))
1386 (with-current-buffer python-buffer (goto-char (point-max))) 1386 (with-current-buffer (process-buffer (python-proc))
1387 (goto-char (point-max))
1387 (compilation-forget-errors) 1388 (compilation-forget-errors)
1388 (python-send-string command) 1389 (python-send-string command)
1389 (with-current-buffer python-buffer 1390 (setq compilation-last-buffer (current-buffer)))
1390 (setq compilation-last-buffer (current-buffer)))
1391 ;; No idea what this is for but it breaks the call to 1391 ;; No idea what this is for but it breaks the call to
1392 ;; compilation-fake-loc in python-send-region. -- Stef 1392 ;; compilation-fake-loc in python-send-region. -- Stef
1393 ;; Must wait until this has completed before re-setting variables below. 1393 ;; Must wait until this has completed before re-setting variables below.
@@ -1517,9 +1517,9 @@ See variable `python-buffer'. Starts a new process if necessary."
1517 ;; isn't one for `python-buffer'. 1517 ;; isn't one for `python-buffer'.
1518 (unless (comint-check-proc python-buffer) 1518 (unless (comint-check-proc python-buffer)
1519 (run-python nil t)) 1519 (run-python nil t))
1520 (get-buffer-process (or (if (derived-mode-p 'inferior-python-mode) 1520 (get-buffer-process (if (derived-mode-p 'inferior-python-mode)
1521 (current-buffer) 1521 (current-buffer)
1522 python-buffer)))) 1522 python-buffer)))
1523 1523
1524(defun python-set-proc () 1524(defun python-set-proc ()
1525 "Set the default value of `python-buffer' to correspond to this buffer. 1525 "Set the default value of `python-buffer' to correspond to this buffer.