aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes
diff options
context:
space:
mode:
authorJoakim Verona2011-11-22 15:39:42 +0100
committerJoakim Verona2011-11-22 15:39:42 +0100
commit40bb789236e486a3f36eefb2840c293369ce2af3 (patch)
tree8e81d3aa5f232ec7f2c5187c683cb0998d2dc4e2 /lisp/progmodes
parent62318aed495a48e24ff73fe79e420dd801df3189 (diff)
parenta8e1496d750ab0f571b3412ff61aaa4da640a036 (diff)
downloademacs-40bb789236e486a3f36eefb2840c293369ce2af3.tar.gz
emacs-40bb789236e486a3f36eefb2840c293369ce2af3.zip
upstream
Diffstat (limited to 'lisp/progmodes')
-rw-r--r--lisp/progmodes/ada-mode.el4
-rw-r--r--lisp/progmodes/ada-xref.el5
-rw-r--r--lisp/progmodes/autoconf.el3
-rw-r--r--lisp/progmodes/cc-awk.el32
-rw-r--r--lisp/progmodes/cc-cmds.el6
-rw-r--r--lisp/progmodes/cc-defs.el6
-rw-r--r--lisp/progmodes/cc-engine.el30
-rw-r--r--lisp/progmodes/cc-fonts.el4
-rw-r--r--lisp/progmodes/cc-mode.el8
-rw-r--r--lisp/progmodes/cc-vars.el8
-rw-r--r--lisp/progmodes/compile.el76
-rw-r--r--lisp/progmodes/cperl-mode.el10
-rw-r--r--lisp/progmodes/dcl-mode.el2
-rw-r--r--lisp/progmodes/ebnf2ps.el6
-rw-r--r--lisp/progmodes/etags.el2
-rw-r--r--lisp/progmodes/executable.el16
-rw-r--r--lisp/progmodes/f90.el2
-rw-r--r--lisp/progmodes/fortran.el8
-rw-r--r--lisp/progmodes/gdb-mi.el8
-rw-r--r--lisp/progmodes/grep.el2
-rw-r--r--lisp/progmodes/gud.el8
-rw-r--r--lisp/progmodes/idlw-help.el5
-rw-r--r--lisp/progmodes/idlw-shell.el8
-rw-r--r--lisp/progmodes/idlwave.el6
-rw-r--r--lisp/progmodes/js.el4
-rw-r--r--lisp/progmodes/make-mode.el2
-rw-r--r--lisp/progmodes/meta-mode.el54
-rw-r--r--lisp/progmodes/mixal-mode.el2
-rw-r--r--lisp/progmodes/modula2.el2
-rw-r--r--lisp/progmodes/pascal.el2
-rw-r--r--lisp/progmodes/prolog.el8
-rw-r--r--lisp/progmodes/ps-mode.el2
-rw-r--r--lisp/progmodes/python.el28
-rw-r--r--lisp/progmodes/sh-script.el4
-rw-r--r--lisp/progmodes/sql.el20
-rw-r--r--lisp/progmodes/tcl.el2
-rw-r--r--lisp/progmodes/verilog-mode.el18
-rw-r--r--lisp/progmodes/vhdl-mode.el20
38 files changed, 200 insertions, 233 deletions
diff --git a/lisp/progmodes/ada-mode.el b/lisp/progmodes/ada-mode.el
index 89a37307506..9d2aad7741b 100644
--- a/lisp/progmodes/ada-mode.el
+++ b/lisp/progmodes/ada-mode.el
@@ -105,8 +105,8 @@
105;; should be loaded before the ada-mode, which will then setup some variables 105;; should be loaded before the ada-mode, which will then setup some variables
106;; to improve the support for Ada code. 106;; to improve the support for Ada code.
107;; Here is the list of these modes: 107;; Here is the list of these modes:
108;; `which-function-mode': Display the name of the subprogram the cursor is 108;; `which-function-mode': Display in the modeline the name of the subprogram
109;; in in the mode line. 109;; the cursor is in.
110;; `outline-mode': Provides the capability to collapse or expand the code 110;; `outline-mode': Provides the capability to collapse or expand the code
111;; for specific language constructs, for instance if you want to hide the 111;; for specific language constructs, for instance if you want to hide the
112;; code corresponding to a subprogram 112;; code corresponding to a subprogram
diff --git a/lisp/progmodes/ada-xref.el b/lisp/progmodes/ada-xref.el
index 4a57a1eef67..0cfdab23702 100644
--- a/lisp/progmodes/ada-xref.el
+++ b/lisp/progmodes/ada-xref.el
@@ -1163,7 +1163,8 @@ If OTHER-FRAME is non-nil, display the cross-reference in another frame."
1163 1163
1164(defun ada-goto-declaration-other-frame (pos) 1164(defun ada-goto-declaration-other-frame (pos)
1165 "Display the declaration of the identifier around POS. 1165 "Display the declaration of the identifier around POS.
1166The declation is shown in another frame if `ada-xref-other-buffer' is non-nil." 1166The declaration is shown in another frame if `ada-xref-other-buffer' is
1167non-nil."
1167 (interactive "d") 1168 (interactive "d")
1168 (ada-goto-declaration pos t)) 1169 (ada-goto-declaration pos t))
1169 1170
@@ -1747,7 +1748,7 @@ Information is extracted from the ali file."
1747 1748
1748 (unless declaration-found 1749 (unless declaration-found
1749 1750
1750 ;; Since we alread know the number of the file, search for a direct 1751 ;; Since we already know the number of the file, search for a direct
1751 ;; reference to it 1752 ;; reference to it
1752 (goto-char (point-min)) 1753 (goto-char (point-min))
1753 (set 'declaration-found t) 1754 (set 'declaration-found t)
diff --git a/lisp/progmodes/autoconf.el b/lisp/progmodes/autoconf.el
index 3aa9a6cfb87..fce725c3b3c 100644
--- a/lisp/progmodes/autoconf.el
+++ b/lisp/progmodes/autoconf.el
@@ -83,7 +83,8 @@ searching backwards at another AC_... command."
83 (set (make-local-variable 'defun-prompt-regexp) 83 (set (make-local-variable 'defun-prompt-regexp)
84 "^[ \t]*A[CM]_\\(\\sw\\|\\s_\\)+") 84 "^[ \t]*A[CM]_\\(\\sw\\|\\s_\\)+")
85 (set (make-local-variable 'comment-start) "dnl ") 85 (set (make-local-variable 'comment-start) "dnl ")
86 (set (make-local-variable 'comment-start-skip) "\\(?:\\<dnl\\|#\\) +") 86 (set (make-local-variable 'comment-start-skip)
87 "\\(?:\\(\\W\\|\\`\\)dnl\\|#\\) +")
87 (set (make-local-variable 'syntax-propertize-function) 88 (set (make-local-variable 'syntax-propertize-function)
88 (syntax-propertize-rules ("\\<dnl\\>" (0 "<")))) 89 (syntax-propertize-rules ("\\<dnl\\>" (0 "<"))))
89 (set (make-local-variable 'font-lock-defaults) 90 (set (make-local-variable 'font-lock-defaults)
diff --git a/lisp/progmodes/cc-awk.el b/lisp/progmodes/cc-awk.el
index d19ba47aa3f..aa1289cd632 100644
--- a/lisp/progmodes/cc-awk.el
+++ b/lisp/progmodes/cc-awk.el
@@ -71,7 +71,7 @@
71 ;; / can delimit regexes or be a division operator. By default we assume 71 ;; / can delimit regexes or be a division operator. By default we assume
72 ;; that it is a division sign, and fix the regexp operator cases with 72 ;; that it is a division sign, and fix the regexp operator cases with
73 ;; `font-lock-syntactic-keywords'. 73 ;; `font-lock-syntactic-keywords'.
74 (modify-syntax-entry ?/ "." st) ; ACM 2002/4/27. 74 (modify-syntax-entry ?/ "." st) ; ACM 2002/4/27.
75 (modify-syntax-entry ?* "." st) 75 (modify-syntax-entry ?* "." st)
76 (modify-syntax-entry ?+ "." st) 76 (modify-syntax-entry ?+ "." st)
77 (modify-syntax-entry ?- "." st) 77 (modify-syntax-entry ?- "." st)
@@ -195,7 +195,7 @@
195;; Matches the inside of an AWK regexp (i.e. without the enclosing /s) 195;; Matches the inside of an AWK regexp (i.e. without the enclosing /s)
196(defconst c-awk-regexp-without-end-re 196(defconst c-awk-regexp-without-end-re
197 (concat "/" c-awk-regexp-innards-re)) 197 (concat "/" c-awk-regexp-innards-re))
198;; Matches an AWK regexp up to, but not including, any terminating /. 198;; Matches an AWK regexp up to, but not including, any terminating /.
199(defconst c-awk-one-line-possibly-open-regexp-re 199(defconst c-awk-one-line-possibly-open-regexp-re
200 (concat "/\\(" c-awk-non-eol-esc-pair-re 200 (concat "/\\(" c-awk-non-eol-esc-pair-re
201 "\\|" c-awk-regexp-one-line-possibly-open-char-list-re 201 "\\|" c-awk-regexp-one-line-possibly-open-char-list-re
@@ -256,7 +256,7 @@
256 256
257 257
258;; ACM, 2002/5/29: 258;; ACM, 2002/5/29:
259;; 259;;
260;; The next section of code is about determining whether or not an AWK 260;; The next section of code is about determining whether or not an AWK
261;; statement is complete or not. We use this to indent the following line. 261;; statement is complete or not. We use this to indent the following line.
262;; The determination is pretty straightforward in C, where a statement ends 262;; The determination is pretty straightforward in C, where a statement ends
@@ -382,7 +382,7 @@
382 ;; Kludge: If c-backward-syntactic-ws gets stuck at a BOL, it is likely 382 ;; Kludge: If c-backward-syntactic-ws gets stuck at a BOL, it is likely
383 ;; that the previous line contains an unterminated string (without \). In 383 ;; that the previous line contains an unterminated string (without \). In
384 ;; this case, assume that the previous line's c-awk-NL-prop is a $. 384 ;; this case, assume that the previous line's c-awk-NL-prop is a $.
385 ;; 385 ;;
386 ;; POINT MUST BE AT THE START OF A LINE when calling this function. This 386 ;; POINT MUST BE AT THE START OF A LINE when calling this function. This
387 ;; is to ensure that the various backward-comment functions will work 387 ;; is to ensure that the various backward-comment functions will work
388 ;; properly. 388 ;; properly.
@@ -425,13 +425,13 @@
425 ;; Calculate and set the value of the c-awk-NL-prop on the immediately 425 ;; Calculate and set the value of the c-awk-NL-prop on the immediately
426 ;; preceding EOL. This may also involve doing the same for several 426 ;; preceding EOL. This may also involve doing the same for several
427 ;; preceding EOLs. 427 ;; preceding EOLs.
428 ;; 428 ;;
429 ;; NOTE that if the property was already set, we return it without 429 ;; NOTE that if the property was already set, we return it without
430 ;; recalculation. (This is by accident rather than design.) 430 ;; recalculation. (This is by accident rather than design.)
431 ;; 431 ;;
432 ;; Return the property which got set (or was already set) on the previous 432 ;; Return the property which got set (or was already set) on the previous
433 ;; line. Return nil if we hit BOB. 433 ;; line. Return nil if we hit BOB.
434 ;; 434 ;;
435 ;; See c-awk-after-if-for-while-condition-p for a description of DO-LIM. 435 ;; See c-awk-after-if-for-while-condition-p for a description of DO-LIM.
436 ;; 436 ;;
437 ;; This function might do hidden buffer changes. 437 ;; This function might do hidden buffer changes.
@@ -492,7 +492,7 @@
492 ;; if necessary. (As a special case, the property doesn't get set on an 492 ;; if necessary. (As a special case, the property doesn't get set on an
493 ;; empty line at EOB (there's no position to set the property on), but the 493 ;; empty line at EOB (there's no position to set the property on), but the
494 ;; function returns the property value an EOL would have got.) 494 ;; function returns the property value an EOL would have got.)
495 ;; 495 ;;
496 ;; See c-awk-after-if-for-while-condition-p for a description of DO-LIM. 496 ;; See c-awk-after-if-for-while-condition-p for a description of DO-LIM.
497 ;; 497 ;;
498 ;; This function might do hidden buffer changes. 498 ;; This function might do hidden buffer changes.
@@ -566,7 +566,7 @@
566 ;; this, a new newline inserted after an old newline (e.g. by C-j) would 566 ;; this, a new newline inserted after an old newline (e.g. by C-j) would
567 ;; inherit any c-awk-NL-prop from the old newline. This would be a Bad 567 ;; inherit any c-awk-NL-prop from the old newline. This would be a Bad
568 ;; Thing. This function's action is required by c-put-char-property. 568 ;; Thing. This function's action is required by c-put-char-property.
569 (if (and (boundp 'text-property-default-nonsticky) ; doesn't exist in Xemacs 569 (if (and (boundp 'text-property-default-nonsticky) ; doesn't exist in XEmacs
570 (not (assoc 'c-awk-NL-prop text-property-default-nonsticky))) 570 (not (assoc 'c-awk-NL-prop text-property-default-nonsticky)))
571 (setq text-property-default-nonsticky 571 (setq text-property-default-nonsticky
572 (cons '(c-awk-NL-prop . t) text-property-default-nonsticky)))) 572 (cons '(c-awk-NL-prop . t) text-property-default-nonsticky))))
@@ -611,7 +611,7 @@
611;; Go back to the start of the (apparent) current line (or the start of the 611;; Go back to the start of the (apparent) current line (or the start of the
612;; line containing POS), returning the buffer position of that point. I.e., 612;; line containing POS), returning the buffer position of that point. I.e.,
613;; go back to the last line which doesn't have an escaped EOL before it. 613;; go back to the last line which doesn't have an escaped EOL before it.
614;; 614;;
615;; This is guaranteed to be "safe" for syntactic analysis, i.e. outwith any 615;; This is guaranteed to be "safe" for syntactic analysis, i.e. outwith any
616;; comment, string or regexp. IT MAY WELL BE that this function should not be 616;; comment, string or regexp. IT MAY WELL BE that this function should not be
617;; executed on a narrowed buffer. 617;; executed on a narrowed buffer.
@@ -718,7 +718,7 @@
718 ;; This function does hidden buffer changes. 718 ;; This function does hidden buffer changes.
719 (let ((/point (point))) 719 (let ((/point (point)))
720 (goto-char anchor) 720 (goto-char anchor)
721 ;; Analyse the line to find out what the / is. 721 ;; Analyze the line to find out what the / is.
722 (if (if anchor-state-/div 722 (if (if anchor-state-/div
723 (not (search-forward-regexp c-awk-regexp-sign-re (1+ /point) t)) 723 (not (search-forward-regexp c-awk-regexp-sign-re (1+ /point) t))
724 (search-forward-regexp c-awk-div-sign-re (1+ /point) t)) 724 (search-forward-regexp c-awk-div-sign-re (1+ /point) t))
@@ -776,7 +776,7 @@
776 (setq anchor (point)) 776 (setq anchor (point))
777 (search-forward-regexp c-awk-harmless-string*-here-re nil t) 777 (search-forward-regexp c-awk-harmless-string*-here-re nil t)
778 ;; We are now looking at either a " or a /. 778 ;; We are now looking at either a " or a /.
779 ;; Do our thing on the string, regexp or divsion sign. 779 ;; Do our thing on the string, regexp or division sign.
780 (setq anchor-state-/div 780 (setq anchor-state-/div
781 (if (looking-at "_?\"") 781 (if (looking-at "_?\"")
782 (c-awk-syntax-tablify-string) 782 (c-awk-syntax-tablify-string)
@@ -823,14 +823,14 @@
823;; Don't overlook the possibility of the buffer change being the "recapturing" 823;; Don't overlook the possibility of the buffer change being the "recapturing"
824;; of a previously escaped newline. 824;; of a previously escaped newline.
825 825
826;; ACM 2008-02-05: 826;; ACM 2008-02-05:
827(defun c-awk-extend-and-syntax-tablify-region (beg end old-len) 827(defun c-awk-extend-and-syntax-tablify-region (beg end old-len)
828 ;; Expand the region (BEG END) as needed to (c-new-BEG c-new-END) then put 828 ;; Expand the region (BEG END) as needed to (c-new-BEG c-new-END) then put
829 ;; `syntax-table' properties on this region. 829 ;; `syntax-table' properties on this region.
830 ;; 830 ;;
831 ;; This function is called from an after-change function, BEG END and 831 ;; This function is called from an after-change function, BEG END and
832 ;; OLD-LEN being the standard parameters. 832 ;; OLD-LEN being the standard parameters.
833 ;; 833 ;;
834 ;; Point is undefined both before and after this function call, the buffer 834 ;; Point is undefined both before and after this function call, the buffer
835 ;; has been widened, and match-data saved. The return value is ignored. 835 ;; has been widened, and match-data saved. The return value is ignored.
836 ;; 836 ;;
@@ -847,8 +847,8 @@
847 847
848;; Awk regexps written with help from Peter Galbraith 848;; Awk regexps written with help from Peter Galbraith
849;; <galbraith@mixing.qc.dfo.ca>. 849;; <galbraith@mixing.qc.dfo.ca>.
850;; Take GNU Emacs's 'words out of the following regexp-opts. They dont work 850;; Take GNU Emacs's 'words out of the following regexp-opts. They don't work
851;; in Xemacs 21.4.4. acm 2002/9/19. 851;; in XEmacs 21.4.4. acm 2002/9/19.
852(defconst awk-font-lock-keywords 852(defconst awk-font-lock-keywords
853 (eval-when-compile 853 (eval-when-compile
854 (list 854 (list
diff --git a/lisp/progmodes/cc-cmds.el b/lisp/progmodes/cc-cmds.el
index e59fdc16af7..68f31c55e71 100644
--- a/lisp/progmodes/cc-cmds.el
+++ b/lisp/progmodes/cc-cmds.el
@@ -1042,7 +1042,7 @@ reindented unless `c-syntactic-indentation' is nil.
1042 (setcar (car elem) 'label)) 1042 (setcar (car elem) 'label))
1043 (setq elem (cdr elem))) 1043 (setq elem (cdr elem)))
1044 ;; some language elements can only be determined by checking 1044 ;; some language elements can only be determined by checking
1045 ;; the following line. Lets first look for ones that can be 1045 ;; the following line. Let's first look for ones that can be
1046 ;; found when looking on the line with the colon 1046 ;; found when looking on the line with the colon
1047 (setq newlines 1047 (setq newlines
1048 (and c-auto-newline 1048 (and c-auto-newline
@@ -2969,7 +2969,7 @@ A prefix argument acts as a repeat count. With a negative argument,
2969move backward across a preprocessor conditional. 2969move backward across a preprocessor conditional.
2970 2970
2971If there aren't enough conditionals after \(or before) point, an 2971If there aren't enough conditionals after \(or before) point, an
2972error is signalled. 2972error is signaled.
2973 2973
2974\"#elif\" is treated like \"#else\" followed by \"#if\", except that 2974\"#elif\" is treated like \"#else\" followed by \"#if\", except that
2975the nesting level isn't changed when tracking subconditionals. 2975the nesting level isn't changed when tracking subconditionals.
@@ -4094,7 +4094,7 @@ command to conveniently insert and align the necessary backslashes."
4094; (or (<= (- (cdr c-lit-limits) 2) (point)) 4094; (or (<= (- (cdr c-lit-limits) 2) (point))
4095; 2010-10-17 Construct removed. 4095; 2010-10-17 Construct removed.
4096; (or (< (- (cdr c-lit-limits) 2) (point)) 4096; (or (< (- (cdr c-lit-limits) 2) (point))
4097 (and 4097 (and
4098 (search-forward-regexp 4098 (search-forward-regexp
4099 (concat "\\=[ \t]*\\(" c-current-comment-prefix "\\)") 4099 (concat "\\=[ \t]*\\(" c-current-comment-prefix "\\)")
4100 (- (cdr c-lit-limits) 2) t) 4100 (- (cdr c-lit-limits) 2) t)
diff --git a/lisp/progmodes/cc-defs.el b/lisp/progmodes/cc-defs.el
index 8632807f2b8..fb9fd406ef8 100644
--- a/lisp/progmodes/cc-defs.el
+++ b/lisp/progmodes/cc-defs.el
@@ -555,7 +555,7 @@ certain situations."
555 `(c-forward-sexp ,(if (numberp count) (- count) `(- ,count)))) 555 `(c-forward-sexp ,(if (numberp count) (- count) `(- ,count))))
556 556
557(defmacro c-safe-scan-lists (from count depth &optional limit) 557(defmacro c-safe-scan-lists (from count depth &optional limit)
558 "Like `scan-lists' but returns nil instead of signalling errors 558 "Like `scan-lists' but returns nil instead of signaling errors
559for unbalanced parens. 559for unbalanced parens.
560 560
561A limit for the search may be given. FROM is assumed to be on the 561A limit for the search may be given. FROM is assumed to be on the
@@ -760,7 +760,7 @@ be after it."
760;; non-nil if point (or the optional parameter POS) is at a VS, nil otherwise. 760;; non-nil if point (or the optional parameter POS) is at a VS, nil otherwise.
761;; 761;;
762;; The language specific function might well do extensive analysis of the 762;; The language specific function might well do extensive analysis of the
763;; source text, and may use a cacheing scheme to speed up repeated calls. 763;; source text, and may use a caching scheme to speed up repeated calls.
764;; 764;;
765;; The "virtual semicolon" lies just after the last non-ws token on the line. 765;; The "virtual semicolon" lies just after the last non-ws token on the line.
766;; Like POINT, it is considered to lie between two characters. For example, 766;; Like POINT, it is considered to lie between two characters. For example,
@@ -784,7 +784,7 @@ be after it."
784;; `c-beginning-of-statement-1'. `c-vsemi-status-unknown-p' may not itself 784;; `c-beginning-of-statement-1'. `c-vsemi-status-unknown-p' may not itself
785;; call `c-beginning-of-statement-1'. 785;; call `c-beginning-of-statement-1'.
786;; 786;;
787;; The macro `c-vsemi-status-unknown-p' will typically check the cacheing 787;; The macro `c-vsemi-status-unknown-p' will typically check the caching
788;; scheme used by the `c-at-vsemi-p-fn', hence the name - the status is 788;; scheme used by the `c-at-vsemi-p-fn', hence the name - the status is
789;; "unknown" if there is no cache entry current for the line. 789;; "unknown" if there is no cache entry current for the line.
790;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 790;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el
index ea0a8f2d3b3..31a58e48f50 100644
--- a/lisp/progmodes/cc-engine.el
+++ b/lisp/progmodes/cc-engine.el
@@ -988,7 +988,7 @@ comment at the start of cc-engine.el for more info."
988 ;; Just gone back over an ordinary symbol of some sort? 988 ;; Just gone back over an ordinary symbol of some sort?
989 (t (c-crosses-statement-barrier-p 989 (t (c-crosses-statement-barrier-p
990 (point) maybe-after-boundary-pos)))) 990 (point) maybe-after-boundary-pos))))
991 991
992 (when boundary-pos 992 (when boundary-pos
993 (setq pptok ptok 993 (setq pptok ptok
994 ptok tok 994 ptok tok
@@ -1065,7 +1065,7 @@ comment at the start of cc-engine.el for more info."
1065 pos tok) ; always non-nil 1065 pos tok) ; always non-nil
1066 ) ; end of (catch loop ....) 1066 ) ; end of (catch loop ....)
1067 ) ; end of sexp-at-a-time (while ....) 1067 ) ; end of sexp-at-a-time (while ....)
1068 1068
1069 ;; If the stack isn't empty there might be errors to report. 1069 ;; If the stack isn't empty there might be errors to report.
1070 (while stack 1070 (while stack
1071 (if (and (vectorp saved-pos) (eq (length saved-pos) 3)) 1071 (if (and (vectorp saved-pos) (eq (length saved-pos) 3))
@@ -1795,7 +1795,7 @@ comment at the start of cc-engine.el for more info."
1795 rung-is-marked simple-ws-beg cmt-skip-pos) 1795 rung-is-marked simple-ws-beg cmt-skip-pos)
1796 1796
1797 ;; Skip simple horizontal ws and do a quick check on the preceding 1797 ;; Skip simple horizontal ws and do a quick check on the preceding
1798 ;; character to see if it's anying that can't end syntactic ws, so we can 1798 ;; character to see if it's anything that can't end syntactic ws, so we can
1799 ;; bail out early in the majority of cases when there just are a few ws 1799 ;; bail out early in the majority of cases when there just are a few ws
1800 ;; chars. Newlines are complicated in the backward direction, so we can't 1800 ;; chars. Newlines are complicated in the backward direction, so we can't
1801 ;; skip over them. 1801 ;; skip over them.
@@ -2032,7 +2032,7 @@ comment at the start of cc-engine.el for more info."
2032(defconst c-state-cache-too-far 5000) 2032(defconst c-state-cache-too-far 5000)
2033;; A maximum comfortable scanning distance, e.g. between 2033;; A maximum comfortable scanning distance, e.g. between
2034;; `c-state-cache-good-pos' and "HERE" (where we call c-parse-state). When 2034;; `c-state-cache-good-pos' and "HERE" (where we call c-parse-state). When
2035;; this distance is exceeded, we take "emergency meausures", e.g. by clearing 2035;; this distance is exceeded, we take "emergency measures", e.g. by clearing
2036;; the cache and starting again from point-min or a beginning of defun. This 2036;; the cache and starting again from point-min or a beginning of defun. This
2037;; value can be tuned for efficiency or set to a lower value for testing. 2037;; value can be tuned for efficiency or set to a lower value for testing.
2038 2038
@@ -2302,7 +2302,7 @@ comment at the start of cc-engine.el for more info."
2302;; `c-parse-state', or nil. 2302;; `c-parse-state', or nil.
2303 2303
2304;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 2304;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2305;; Defuns which analyse the buffer, yet don't change `c-state-cache'. 2305;; Defuns which analyze the buffer, yet don't change `c-state-cache'.
2306(defun c-get-fallback-scan-pos (here) 2306(defun c-get-fallback-scan-pos (here)
2307 ;; Return a start position for building `c-state-cache' from 2307 ;; Return a start position for building `c-state-cache' from
2308 ;; scratch. This will be at the top level, 2 defuns back. 2308 ;; scratch. This will be at the top level, 2 defuns back.
@@ -2331,7 +2331,7 @@ comment at the start of cc-engine.el for more info."
2331 ;; 2331 ;;
2332 ;; If there aren't enough opening paren/brace/brackets, return the position 2332 ;; If there aren't enough opening paren/brace/brackets, return the position
2333 ;; of the outermost one found, or HERE- if there are none. If there are no 2333 ;; of the outermost one found, or HERE- if there are none. If there are no
2334 ;; closeing p/b/bs between HERE+ and TOP, return HERE-. HERE-/+ and TOP 2334 ;; closing p/b/bs between HERE+ and TOP, return HERE-. HERE-/+ and TOP
2335 ;; must not be inside literals. Only the accessible portion of the buffer 2335 ;; must not be inside literals. Only the accessible portion of the buffer
2336 ;; will be scanned. 2336 ;; will be scanned.
2337 2337
@@ -4051,7 +4051,7 @@ comment at the start of cc-engine.el for more info."
4051 ;; a relevant match. 4051 ;; a relevant match.
4052 (goto-char pos) 4052 (goto-char pos)
4053 nil)))))) 4053 nil))))))
4054 4054
4055 (> (point) 4055 (> (point)
4056 (progn 4056 (progn
4057 ;; Skip syntactic ws afterwards so that we don't stop at the 4057 ;; Skip syntactic ws afterwards so that we don't stop at the
@@ -4219,9 +4219,9 @@ comment at the start of cc-engine.el for more info."
4219;; complicated anyway. In this case, lim is only used to detect 4219;; complicated anyway. In this case, lim is only used to detect
4220;; cpp directives. 4220;; cpp directives.
4221;; 4221;;
4222;; Note that there is a bug in Xemacs's buffer-syntactic-context when used in 4222;; Note that there is a bug in XEmacs's buffer-syntactic-context when used in
4223;; conjunction with syntax-table-properties. The bug is present in, e.g., 4223;; conjunction with syntax-table-properties. The bug is present in, e.g.,
4224;; Xemacs 21.4.4. It manifested itself thus: 4224;; XEmacs 21.4.4. It manifested itself thus:
4225;; 4225;;
4226;; Starting with an empty AWK Mode buffer, type 4226;; Starting with an empty AWK Mode buffer, type
4227;; /regexp/ {<C-j> 4227;; /regexp/ {<C-j>
@@ -4235,7 +4235,7 @@ comment at the start of cc-engine.el for more info."
4235;; 4235;;
4236;; The workaround for this is for the AWK Mode initialisation to switch the 4236;; The workaround for this is for the AWK Mode initialisation to switch the
4237;; defalias for c-in-literal to c-slow-in-literal. This will slow down other 4237;; defalias for c-in-literal to c-slow-in-literal. This will slow down other
4238;; cc-modes in Xemacs whenever an awk-buffer has been initialised. 4238;; cc-modes in XEmacs whenever an awk-buffer has been initialised.
4239;; 4239;;
4240;; (Alan Mackenzie, 2003/4/30). 4240;; (Alan Mackenzie, 2003/4/30).
4241 4241
@@ -6277,7 +6277,7 @@ comment at the start of cc-engine.el for more info."
6277 ;; car ^ ^ point 6277 ;; car ^ ^ point
6278 ;; Foo::Foo (int b) : Base (b) {} 6278 ;; Foo::Foo (int b) : Base (b) {}
6279 ;; car ^ ^ point 6279 ;; car ^ ^ point
6280 ;; 6280 ;;
6281 ;; The cdr of the return value is non-nil when a 6281 ;; The cdr of the return value is non-nil when a
6282 ;; `c-typedef-decl-kwds' specifier is found in the declaration. 6282 ;; `c-typedef-decl-kwds' specifier is found in the declaration.
6283 ;; Specifically it is a dotted pair (A . B) where B is t when a 6283 ;; Specifically it is a dotted pair (A . B) where B is t when a
@@ -6285,7 +6285,7 @@ comment at the start of cc-engine.el for more info."
6285 ;; other `c-typedef-decl-kwds' (e.g. class, struct, enum) 6285 ;; other `c-typedef-decl-kwds' (e.g. class, struct, enum)
6286 ;; specifier is present. I.e., (some of) the declared 6286 ;; specifier is present. I.e., (some of) the declared
6287 ;; identifier(s) are types. 6287 ;; identifier(s) are types.
6288 ;; 6288 ;;
6289 ;; If a cast is parsed: 6289 ;; If a cast is parsed:
6290 ;; 6290 ;;
6291 ;; The point is left at the first token after the closing paren of 6291 ;; The point is left at the first token after the closing paren of
@@ -8461,7 +8461,7 @@ comment at the start of cc-engine.el for more info."
8461 nil) 8461 nil)
8462 (t nil)))) 8462 (t nil))))
8463 (eolp)) 8463 (eolp))
8464 8464
8465 (goto-char pos) 8465 (goto-char pos)
8466 (progn (c-backward-syntactic-ws) 8466 (progn (c-backward-syntactic-ws)
8467 (eq (point) pos)) 8467 (eq (point) pos))
@@ -8832,7 +8832,7 @@ comment at the start of cc-engine.el for more info."
8832 ;; CASE B.4: Continued statement with block open. The most 8832 ;; CASE B.4: Continued statement with block open. The most
8833 ;; accurate analysis is perhaps `statement-cont' together with 8833 ;; accurate analysis is perhaps `statement-cont' together with
8834 ;; `block-open' but we play DWIM and use `substatement-open' 8834 ;; `block-open' but we play DWIM and use `substatement-open'
8835 ;; instead. The rationaly is that this typically is a macro 8835 ;; instead. The rationale is that this typically is a macro
8836 ;; followed by a block which makes it very similar to a 8836 ;; followed by a block which makes it very similar to a
8837 ;; statement with a substatement block. 8837 ;; statement with a substatement block.
8838 (t 8838 (t
@@ -8922,7 +8922,7 @@ comment at the start of cc-engine.el for more info."
8922 ;; FIXME: Should use c-add-stmt-syntax, but it's not yet 8922 ;; FIXME: Should use c-add-stmt-syntax, but it's not yet
8923 ;; template aware. 8923 ;; template aware.
8924 (c-add-syntax 'template-args-cont (point) placeholder)) 8924 (c-add-syntax 'template-args-cont (point) placeholder))
8925 8925
8926 ;; CASE D: continued statement. 8926 ;; CASE D: continued statement.
8927 (t 8927 (t
8928 (c-beginning-of-statement-1 containing-sexp) 8928 (c-beginning-of-statement-1 containing-sexp)
diff --git a/lisp/progmodes/cc-fonts.el b/lisp/progmodes/cc-fonts.el
index 9a83d5196db..a5a9582315b 100644
--- a/lisp/progmodes/cc-fonts.el
+++ b/lisp/progmodes/cc-fonts.el
@@ -317,7 +317,7 @@
317 (match-beginning ,(car highlight)) 317 (match-beginning ,(car highlight))
318 (match-end ,(car highlight)) 318 (match-end ,(car highlight))
319 ,(elt highlight 1)))) 319 ,(elt highlight 1))))
320 ;; highlight is an "ANCHORED HIGHLIGHER" of the form 320 ;; highlight is an "ANCHORED HIGHLIGHTER" of the form
321 ;; (ANCHORED-MATCHER PRE-FORM POST-FORM SUBEXP-HIGHLIGHTERS...) 321 ;; (ANCHORED-MATCHER PRE-FORM POST-FORM SUBEXP-HIGHLIGHTERS...)
322 (when (nth 3 highlight) 322 (when (nth 3 highlight)
323 (error "Match highlights currently not supported in %s" 323 (error "Match highlights currently not supported in %s"
@@ -1103,7 +1103,7 @@ casts and declarations are fontified. Used on level 2 and higher."
1103 (<= (point) limit)) 1103 (<= (point) limit))
1104 1104
1105 ;; Search syntactically to the end of the declarator (";", 1105 ;; Search syntactically to the end of the declarator (";",
1106 ;; ",", a closen paren, eob etc) or to the beginning of an 1106 ;; ",", a closing paren, eob etc) or to the beginning of an
1107 ;; initializer or function prototype ("=" or "\\s\("). 1107 ;; initializer or function prototype ("=" or "\\s\(").
1108 ;; Note that the open paren will match array specs in 1108 ;; Note that the open paren will match array specs in
1109 ;; square brackets, and we treat them as initializers too. 1109 ;; square brackets, and we treat them as initializers too.
diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el
index a6bf241f0db..d93d174047b 100644
--- a/lisp/progmodes/cc-mode.el
+++ b/lisp/progmodes/cc-mode.el
@@ -484,7 +484,7 @@ that requires a literal mode spec at compile time."
484 (make-local-variable 'comment-start) 484 (make-local-variable 'comment-start)
485 (make-local-variable 'comment-end) 485 (make-local-variable 'comment-end)
486 (make-local-variable 'comment-start-skip) 486 (make-local-variable 'comment-start-skip)
487 487
488 (make-local-variable 'paragraph-start) 488 (make-local-variable 'paragraph-start)
489 (make-local-variable 'paragraph-separate) 489 (make-local-variable 'paragraph-separate)
490 (make-local-variable 'paragraph-ignore-fill-prefix) 490 (make-local-variable 'paragraph-ignore-fill-prefix)
@@ -660,7 +660,7 @@ compatible with old code; callers should always specify it."
660 (when (eq (car elt) 'c-file-style) 660 (when (eq (car elt) 'c-file-style)
661 (setq cownt (1+ cownt)))) 661 (setq cownt (1+ cownt))))
662 cownt)) 662 cownt))
663 663
664(defun c-before-hack-hook () 664(defun c-before-hack-hook ()
665 "Set the CC Mode style and \"offsets\" when in the buffer's local variables. 665 "Set the CC Mode style and \"offsets\" when in the buffer's local variables.
666They are set only when, respectively, the pseudo variables 666They are set only when, respectively, the pseudo variables
@@ -860,7 +860,7 @@ Note that the style variables are always made local to the buffer."
860 ;; (i) Extend the font lock region to cover all changed preprocessor 860 ;; (i) Extend the font lock region to cover all changed preprocessor
861 ;; regions; it does this by setting the variables `c-new-BEG' and 861 ;; regions; it does this by setting the variables `c-new-BEG' and
862 ;; `c-new-END' to the new boundaries. 862 ;; `c-new-END' to the new boundaries.
863 ;; 863 ;;
864 ;; (ii) "Neutralize" every preprocessor line wholly or partially in the 864 ;; (ii) "Neutralize" every preprocessor line wholly or partially in the
865 ;; extended changed region. "Restore" lines which were CPP lines before the 865 ;; extended changed region. "Restore" lines which were CPP lines before the
866 ;; change and are no longer so; these can be located from the Buffer local 866 ;; change and are no longer so; these can be located from the Buffer local
@@ -1562,7 +1562,7 @@ Key bindings:
1562 (c-common-init 'awk-mode) 1562 (c-common-init 'awk-mode)
1563 (c-awk-unstick-NL-prop) 1563 (c-awk-unstick-NL-prop)
1564 1564
1565 ;; Prevent Xemacs's buffer-syntactic-context being used. See the comment 1565 ;; Prevent XEmacs's buffer-syntactic-context being used. See the comment
1566 ;; in cc-engine.el, just before (defun c-fast-in-literal ... 1566 ;; in cc-engine.el, just before (defun c-fast-in-literal ...
1567 (defalias 'c-in-literal 'c-slow-in-literal) 1567 (defalias 'c-in-literal 'c-slow-in-literal)
1568 1568
diff --git a/lisp/progmodes/cc-vars.el b/lisp/progmodes/cc-vars.el
index 24361e3667a..02256ead392 100644
--- a/lisp/progmodes/cc-vars.el
+++ b/lisp/progmodes/cc-vars.el
@@ -963,7 +963,7 @@ this is `c-lineup-ObjC-method-call', which would align it like:
963 [foo blahBlahBlah: fred 963 [foo blahBlahBlah: fred
964 thisIsTooDamnLong: barney 964 thisIsTooDamnLong: barney
965 965
966This behaviour can be overridden by customizing the indentation of 966This behavior can be overridden by customizing the indentation of
967`objc-method-call-cont' in the \"objc\" style." 967`objc-method-call-cont' in the \"objc\" style."
968 :type 'integer 968 :type 'integer
969 :group 'c) 969 :group 'c)
@@ -1327,7 +1327,7 @@ Here is the current list of valid syntactic element symbols:
1327 statement-case-open -- The first line in a case block starting with brace. 1327 statement-case-open -- The first line in a case block starting with brace.
1328 substatement -- The first line after an if/while/for/do/else. 1328 substatement -- The first line after an if/while/for/do/else.
1329 substatement-open -- The brace that opens a substatement block. 1329 substatement-open -- The brace that opens a substatement block.
1330 substatement-label -- Labelled line after an if/while/for/do/else. 1330 substatement-label -- Labeled line after an if/while/for/do/else.
1331 case-label -- A \"case\" or \"default\" label. 1331 case-label -- A \"case\" or \"default\" label.
1332 access-label -- C++ private/protected/public access label. 1332 access-label -- C++ private/protected/public access label.
1333 label -- Any ordinary label. 1333 label -- Any ordinary label.
@@ -1625,7 +1625,7 @@ names)."))
1625(defvar c-macro-with-semi-re nil 1625(defvar c-macro-with-semi-re nil
1626 ;; Regular expression which matches a (#define'd) symbol whose expansion 1626 ;; Regular expression which matches a (#define'd) symbol whose expansion
1627 ;; ends with a semicolon. 1627 ;; ends with a semicolon.
1628 ;; 1628 ;;
1629 ;; This variable should be set by `c-make-macros-with-semi-re' rather than 1629 ;; This variable should be set by `c-make-macros-with-semi-re' rather than
1630 ;; directly. 1630 ;; directly.
1631) 1631)
@@ -1651,7 +1651,7 @@ names)."))
1651 (t (error "c-make-macro-with-semi-re: invalid \ 1651 (t (error "c-make-macro-with-semi-re: invalid \
1652c-macro-names-with-semicolon: %s" 1652c-macro-names-with-semicolon: %s"
1653 c-macro-names-with-semicolon)))))) 1653 c-macro-names-with-semicolon))))))
1654 1654
1655(defvar c-macro-names-with-semicolon 1655(defvar c-macro-names-with-semicolon
1656 '("Q_OBJECT" "Q_PROPERTY" "Q_DECLARE" "Q_ENUMS") 1656 '("Q_OBJECT" "Q_PROPERTY" "Q_DECLARE" "Q_ENUMS")
1657 "List of #defined symbols whose expansion ends with a semicolon. 1657 "List of #defined symbols whose expansion ends with a semicolon.
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index 156c90159cd..3dba1af515a 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -157,7 +157,7 @@ of[ \t]+\"?\\([a-zA-Z]?:?[^\":\n]+\\)\"?:" 3 2 nil (1))
157 157
158 (python-tracebacks-and-caml 158 (python-tracebacks-and-caml
159 "^[ \t]*File \\(\"?\\)\\([^,\" \n\t<>]+\\)\\1, lines? \\([0-9]+\\)-?\\([0-9]+\\)?\\(?:$\\|,\ 159 "^[ \t]*File \\(\"?\\)\\([^,\" \n\t<>]+\\)\\1, lines? \\([0-9]+\\)-?\\([0-9]+\\)?\\(?:$\\|,\
160\\(?: characters? \\([0-9]+\\)-?\\([0-9]+\\)?:\\)?\\([ \n]Warning:\\)?\\)" 160\\(?: characters? \\([0-9]+\\)-?\\([0-9]+\\)?:\\)?\\([ \n]Warning\\(?: [0-9]+\\)?:\\)?\\)"
161 2 (3 . 4) (5 . 6) (7)) 161 2 (3 . 4) (5 . 6) (7))
162 162
163 (comma 163 (comma
@@ -1056,7 +1056,7 @@ FMTS is a list of format specs for transforming the file name.
1056 (cadr (compilation--file-struct->loc-tree file-struct))) 1056 (cadr (compilation--file-struct->loc-tree file-struct)))
1057 (marker 1057 (marker
1058 (if marker-line (compilation--loc->marker (cadr marker-line)))) 1058 (if marker-line (compilation--loc->marker (cadr marker-line))))
1059 (compilation-error-screen-columns compilation-error-screen-columns) 1059 (screen-columns compilation-error-screen-columns)
1060 end-marker loc end-loc) 1060 end-marker loc end-loc)
1061 (if (not (and marker (marker-buffer marker))) 1061 (if (not (and marker (marker-buffer marker)))
1062 (setq marker nil) ; no valid marker for this file 1062 (setq marker nil) ; no valid marker for this file
@@ -1064,16 +1064,21 @@ FMTS is a list of format specs for transforming the file name.
1064 (catch 'marker ; find nearest loc, at least one exists 1064 (catch 'marker ; find nearest loc, at least one exists
1065 (dolist (x (cddr (compilation--file-struct->loc-tree 1065 (dolist (x (cddr (compilation--file-struct->loc-tree
1066 file-struct))) ; Loop over remaining lines. 1066 file-struct))) ; Loop over remaining lines.
1067 (if (> (car x) loc) ; still bigger 1067 (if (> (car x) loc) ; Still bigger.
1068 (setq marker-line x) 1068 (setq marker-line x)
1069 (if (> (- (or (car marker-line) 1) loc) 1069 (if (> (- (or (car marker-line) 1) loc)
1070 (- loc (car x))) ; current line is nearer 1070 (- loc (car x))) ; Current line is nearer.
1071 (setq marker-line x)) 1071 (setq marker-line x))
1072 (throw 'marker t)))) 1072 (throw 'marker t))))
1073 (setq marker (compilation--loc->marker (cadr marker-line)) 1073 (setq marker (compilation--loc->marker (cadr marker-line))
1074 marker-line (or (car marker-line) 1)) 1074 marker-line (or (car marker-line) 1))
1075 (with-current-buffer (marker-buffer marker) 1075 (with-current-buffer (marker-buffer marker)
1076 (save-excursion 1076 (let ((screen-columns
1077 ;; Obey the compilation-error-screen-columns of the target
1078 ;; buffer if its major mode set it buffer-locally.
1079 (if (local-variable-p 'compilation-error-screen-columns)
1080 compilation-error-screen-columns screen-columns)))
1081 (save-excursion
1077 (save-restriction 1082 (save-restriction
1078 (widen) 1083 (widen)
1079 (goto-char (marker-position marker)) 1084 (goto-char (marker-position marker))
@@ -1081,17 +1086,15 @@ FMTS is a list of format specs for transforming the file name.
1081 (beginning-of-line (- (or end-line line) marker-line -1)) 1086 (beginning-of-line (- (or end-line line) marker-line -1))
1082 (if (or (null end-col) (< end-col 0)) 1087 (if (or (null end-col) (< end-col 0))
1083 (end-of-line) 1088 (end-of-line)
1084 (compilation-move-to-column 1089 (compilation-move-to-column end-col screen-columns))
1085 end-col compilation-error-screen-columns))
1086 (setq end-marker (point-marker))) 1090 (setq end-marker (point-marker)))
1087 (beginning-of-line (if end-line 1091 (beginning-of-line (if end-line
1088 (- line end-line -1) 1092 (- line end-line -1)
1089 (- loc marker-line -1))) 1093 (- loc marker-line -1)))
1090 (if col 1094 (if col
1091 (compilation-move-to-column 1095 (compilation-move-to-column col screen-columns)
1092 col compilation-error-screen-columns)
1093 (forward-to-indentation 0)) 1096 (forward-to-indentation 0))
1094 (setq marker (point-marker)))))) 1097 (setq marker (point-marker)))))))
1095 1098
1096 (setq loc (compilation-assq line (compilation--file-struct->loc-tree 1099 (setq loc (compilation-assq line (compilation--file-struct->loc-tree
1097 file-struct))) 1100 file-struct)))
@@ -2266,7 +2269,7 @@ This is the value of `next-error-function' in Compilation buffers."
2266 (interactive "p") 2269 (interactive "p")
2267 (when reset 2270 (when reset
2268 (setq compilation-current-error nil)) 2271 (setq compilation-current-error nil))
2269 (let* ((columns compilation-error-screen-columns) ; buffer's local value 2272 (let* ((screen-columns compilation-error-screen-columns)
2270 (last 1) 2273 (last 1)
2271 (msg (compilation-next-error (or n 1) nil 2274 (msg (compilation-next-error (or n 1) nil
2272 (or compilation-current-error 2275 (or compilation-current-error
@@ -2301,29 +2304,34 @@ This is the value of `next-error-function' in Compilation buffers."
2301 marker 2304 marker
2302 (caar (compilation--loc->file-struct loc)) 2305 (caar (compilation--loc->file-struct loc))
2303 (cadr (car (compilation--loc->file-struct loc)))) 2306 (cadr (car (compilation--loc->file-struct loc))))
2304 (save-restriction 2307 (let ((screen-columns
2305 (widen) 2308 ;; Obey the compilation-error-screen-columns of the target
2306 (goto-char (point-min)) 2309 ;; buffer if its major mode set it buffer-locally.
2307 ;; Treat file's found lines in forward order, 1 by 1. 2310 (if (local-variable-p 'compilation-error-screen-columns)
2308 (dolist (line (reverse (cddr (compilation--loc->file-struct loc)))) 2311 compilation-error-screen-columns screen-columns)))
2309 (when (car line) ; else this is a filename w/o a line# 2312 (save-restriction
2310 (beginning-of-line (- (car line) last -1)) 2313 (widen)
2311 (setq last (car line))) 2314 (goto-char (point-min))
2312 ;; Treat line's found columns and store/update a marker for each. 2315 ;; Treat file's found lines in forward order, 1 by 1.
2313 (dolist (col (cdr line)) 2316 (dolist (line (reverse (cddr (compilation--loc->file-struct loc))))
2314 (if (compilation--loc->col col) 2317 (when (car line) ; else this is a filename w/o a line#
2315 (if (eq (compilation--loc->col col) -1) 2318 (beginning-of-line (- (car line) last -1))
2316 ;; Special case for range end. 2319 (setq last (car line)))
2317 (end-of-line) 2320 ;; Treat line's found columns and store/update a marker for each.
2318 (compilation-move-to-column (compilation--loc->col col) 2321 (dolist (col (cdr line))
2319 columns)) 2322 (if (compilation--loc->col col)
2320 (beginning-of-line) 2323 (if (eq (compilation--loc->col col) -1)
2321 (skip-chars-forward " \t")) 2324 ;; Special case for range end.
2322 (if (compilation--loc->marker col) 2325 (end-of-line)
2323 (set-marker (compilation--loc->marker col) (point)) 2326 (compilation-move-to-column (compilation--loc->col col)
2324 (setf (compilation--loc->marker col) (point-marker))) 2327 screen-columns))
2325 ;; (setf (compilation--loc->timestamp col) timestamp) 2328 (beginning-of-line)
2326 ))))) 2329 (skip-chars-forward " \t"))
2330 (if (compilation--loc->marker col)
2331 (set-marker (compilation--loc->marker col) (point))
2332 (setf (compilation--loc->marker col) (point-marker)))
2333 ;; (setf (compilation--loc->timestamp col) timestamp)
2334 ))))))
2327 (compilation-goto-locus marker (compilation--loc->marker loc) 2335 (compilation-goto-locus marker (compilation--loc->marker loc)
2328 (compilation--loc->marker end-loc)) 2336 (compilation--loc->marker end-loc))
2329 (setf (compilation--loc->visited loc) t))) 2337 (setf (compilation--loc->visited loc) t)))
diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el
index a79d1a2c064..1925d16ba58 100644
--- a/lisp/progmodes/cperl-mode.el
+++ b/lisp/progmodes/cperl-mode.el
@@ -902,7 +902,7 @@ the settings present before the switch.
9029) When doing indentation of control constructs, may correct 9029) When doing indentation of control constructs, may correct
903line-breaks/spacing between elements of the construct. 903line-breaks/spacing between elements of the construct.
904 904
90510) Uses a linear-time algorith for indentation of regions (on Emaxen with 90510) Uses a linear-time algorithm for indentation of regions (on Emaxen with
906capable syntax engines). 906capable syntax engines).
907 907
90811) Syntax-highlight, indentation, sexp-recognition inside regular expressions. 90811) Syntax-highlight, indentation, sexp-recognition inside regular expressions.
@@ -1304,7 +1304,7 @@ versions of Emacs."
1304 (get-text-property (point) 'syntax-type)) 1304 (get-text-property (point) 'syntax-type))
1305 '(here-doc pod))] 1305 '(here-doc pod))]
1306 "----" 1306 "----"
1307 ["CPerl pretty print (exprmntl)" cperl-ps-print 1307 ["CPerl pretty print (experimental)" cperl-ps-print
1308 (fboundp 'ps-extend-face-list)] 1308 (fboundp 'ps-extend-face-list)]
1309 "----" 1309 "----"
1310 ["Syntaxify region" cperl-find-pods-heres-region 1310 ["Syntaxify region" cperl-find-pods-heres-region
@@ -1512,7 +1512,7 @@ the last)."
1512(defvar cperl-font-locking nil) 1512(defvar cperl-font-locking nil)
1513 1513
1514;; NB as it stands the code in cperl-mode assumes this only has one 1514;; NB as it stands the code in cperl-mode assumes this only has one
1515;; element. If Xemacs 19 support were dropped, this could all be simplified. 1515;; element. If XEmacs 19 support were dropped, this could all be simplified.
1516(defvar cperl-compilation-error-regexp-alist 1516(defvar cperl-compilation-error-regexp-alist
1517 ;; This look like a paranoiac regexp: could anybody find a better one? (which WORKS). 1517 ;; This look like a paranoiac regexp: could anybody find a better one? (which WORKS).
1518 '(("^[^\n]* \\(file\\|at\\) \\([^ \t\n]+\\) [^\n]*line \\([0-9]+\\)[\\., \n]" 1518 '(("^[^\n]* \\(file\\|at\\) \\([^ \t\n]+\\) [^\n]*line \\([0-9]+\\)[\\., \n]"
@@ -5793,7 +5793,7 @@ indentation and initial hashes. Behaves usually outside of comment."
5793 ;; "\\|") 5793 ;; "\\|")
5794 '("-[rwxoRWXOezsfdlpSbctugkTBMAC]\\>\\([ \t]+_\\>\\)?" 0 5794 '("-[rwxoRWXOezsfdlpSbctugkTBMAC]\\>\\([ \t]+_\\>\\)?" 0
5795 font-lock-function-name-face keep) ; Not very good, triggers at "[a-z]" 5795 font-lock-function-name-face keep) ; Not very good, triggers at "[a-z]"
5796 ;; This highlights declarations and definitions differenty. 5796 ;; This highlights declarations and definitions differently.
5797 ;; We do not try to highlight in the case of attributes: 5797 ;; We do not try to highlight in the case of attributes:
5798 ;; it is already done by `cperl-find-pods-heres' 5798 ;; it is already done by `cperl-find-pods-heres'
5799 (list (concat "\\<sub" 5799 (list (concat "\\<sub"
@@ -8946,7 +8946,7 @@ do extra unwind via `cperl-unwind-to-safe'."
8946;; Called when any modification is made to buffer text. 8946;; Called when any modification is made to buffer text.
8947(defun cperl-after-change-function (beg end old-len) 8947(defun cperl-after-change-function (beg end old-len)
8948 ;; We should have been informed about changes by `font-lock'. Since it 8948 ;; We should have been informed about changes by `font-lock'. Since it
8949 ;; does not inform as which calls are defered, do it ourselves 8949 ;; does not inform as which calls are deferred, do it ourselves
8950 (if cperl-syntax-done-to 8950 (if cperl-syntax-done-to
8951 (setq cperl-syntax-done-to (min cperl-syntax-done-to beg)))) 8951 (setq cperl-syntax-done-to (min cperl-syntax-done-to beg))))
8952 8952
diff --git a/lisp/progmodes/dcl-mode.el b/lisp/progmodes/dcl-mode.el
index b4094914d61..d855861d552 100644
--- a/lisp/progmodes/dcl-mode.el
+++ b/lisp/progmodes/dcl-mode.el
@@ -512,7 +512,7 @@ Variables controlling indentation style and extra features:
512 dcl-block-begin-regexp 512 dcl-block-begin-regexp
513 dcl-block-end-regexp 513 dcl-block-end-regexp
514 Regexps that match command lines that begin and end, respectively, 514 Regexps that match command lines that begin and end, respectively,
515 a block of commmand lines that will be given extra indentation. 515 a block of command lines that will be given extra indentation.
516 Command lines between THEN-ELSE-ENDIF are always indented; these variables 516 Command lines between THEN-ELSE-ENDIF are always indented; these variables
517 make it possible to define other places to indent. 517 make it possible to define other places to indent.
518 Set to nil to disable this feature. 518 Set to nil to disable this feature.
diff --git a/lisp/progmodes/ebnf2ps.el b/lisp/progmodes/ebnf2ps.el
index f7965d2cd01..f98f3d191d7 100644
--- a/lisp/progmodes/ebnf2ps.el
+++ b/lisp/progmodes/ebnf2ps.el
@@ -2084,7 +2084,7 @@ special."
2084 "*Specify extra width for arrow shape drawing. 2084 "*Specify extra width for arrow shape drawing.
2085 2085
2086The extra width is used to avoid that the arrowhead and the terminal border 2086The extra width is used to avoid that the arrowhead and the terminal border
2087overlap. It depens on `ebnf-arrow-shape' and `ebnf-line-width'." 2087overlap. It depends on `ebnf-arrow-shape' and `ebnf-line-width'."
2088 :type 'number 2088 :type 'number
2089 :version "22" 2089 :version "22"
2090 :group 'ebnf-shape) 2090 :group 'ebnf-shape)
@@ -4007,7 +4007,7 @@ See documentation for `ebnf-terminal-shape', `ebnf-non-terminal-shape' and
4007/#ebnf2ps#dict 230 dict def 4007/#ebnf2ps#dict 230 dict def
4008#ebnf2ps#dict begin 4008#ebnf2ps#dict begin
4009 4009
4010% Initiliaze variables to avoid name-conflicting with document variables. 4010% Initialize variables to avoid name-conflicting with document variables.
4011% This is the case when using `bind' operator. 4011% This is the case when using `bind' operator.
4012/-fillp- 0 def /h 0 def 4012/-fillp- 0 def /h 0 def
4013/-ox- 0 def /half 0 def 4013/-ox- 0 def /half 0 def
@@ -5037,7 +5037,7 @@ killed after process termination."
5037 (when gen-func 5037 (when gen-func
5038 (setq error-msg "EMPTY RULES" 5038 (setq error-msg "EMPTY RULES"
5039 tree (ebnf-eliminate-empty-rules tree)) 5039 tree (ebnf-eliminate-empty-rules tree))
5040 (setq error-msg "OPTMIZE" 5040 (setq error-msg "OPTIMIZE"
5041 tree (ebnf-optimize tree)) 5041 tree (ebnf-optimize tree))
5042 (setq error-msg "DIMENSIONS" 5042 (setq error-msg "DIMENSIONS"
5043 tree (ebnf-dimensions tree)) 5043 tree (ebnf-dimensions tree))
diff --git a/lisp/progmodes/etags.el b/lisp/progmodes/etags.el
index d321e9c1388..13cba0fe701 100644
--- a/lisp/progmodes/etags.el
+++ b/lisp/progmodes/etags.el
@@ -1144,7 +1144,7 @@ error message."
1144 (setq order tag-order)) 1144 (setq order tag-order))
1145 ;; We throw out on match, so only get here if there were no matches. 1145 ;; We throw out on match, so only get here if there were no matches.
1146 ;; Clear out the markers we use to avoid duplicate matches so they 1146 ;; Clear out the markers we use to avoid duplicate matches so they
1147 ;; don't slow down editting and are immediately available for GC. 1147 ;; don't slow down editing and are immediately available for GC.
1148 (while tag-lines-already-matched 1148 (while tag-lines-already-matched
1149 (set-marker (car tag-lines-already-matched) nil nil) 1149 (set-marker (car tag-lines-already-matched) nil nil)
1150 (setq tag-lines-already-matched (cdr tag-lines-already-matched))) 1150 (setq tag-lines-already-matched (cdr tag-lines-already-matched)))
diff --git a/lisp/progmodes/executable.el b/lisp/progmodes/executable.el
index d8133cb6b90..281fa3cef72 100644
--- a/lisp/progmodes/executable.el
+++ b/lisp/progmodes/executable.el
@@ -268,12 +268,16 @@ file modes."
268 (save-restriction 268 (save-restriction
269 (widen) 269 (widen)
270 (string= "#!" (buffer-substring (point-min) (+ 2 (point-min))))) 270 (string= "#!" (buffer-substring (point-min) (+ 2 (point-min)))))
271 (let* ((current-mode (file-modes (buffer-file-name))) 271 (condition-case nil
272 (add-mode (logand ?\111 (default-file-modes)))) 272 (let* ((current-mode (file-modes (buffer-file-name)))
273 (or (/= (logand ?\111 current-mode) 0) 273 (add-mode (logand ?\111 (default-file-modes))))
274 (zerop add-mode) 274 (or (/= (logand ?\111 current-mode) 0)
275 (set-file-modes (buffer-file-name) 275 (zerop add-mode)
276 (logior current-mode add-mode)))))) 276 (set-file-modes (buffer-file-name)
277 (logior current-mode add-mode))))
278 ;; Eg file-modes can return nil (bug#9879). It should not,
279 ;; in this context, but we should handle it all the same.
280 (error (message "Unable to make file executable")))))
277 281
278(provide 'executable) 282(provide 'executable)
279 283
diff --git a/lisp/progmodes/f90.el b/lisp/progmodes/f90.el
index 007203a8b21..ce04d8b390e 100644
--- a/lisp/progmodes/f90.el
+++ b/lisp/progmodes/f90.el
@@ -1837,7 +1837,7 @@ after indenting."
1837 (and (< (point) pos) 1837 (and (< (point) pos)
1838 (goto-char pos)) 1838 (goto-char pos))
1839 (if auto-fill-function 1839 (if auto-fill-function
1840 ;; GM NO-UPDATE not honoured, since this calls f90-update-line. 1840 ;; GM NO-UPDATE not honored, since this calls f90-update-line.
1841 (f90-do-auto-fill) 1841 (f90-do-auto-fill)
1842 (or no-update (f90-update-line))) 1842 (or no-update (f90-update-line)))
1843 (set-marker pos nil))) 1843 (set-marker pos nil)))
diff --git a/lisp/progmodes/fortran.el b/lisp/progmodes/fortran.el
index fd3d42685f0..e98ca58f3e0 100644
--- a/lisp/progmodes/fortran.el
+++ b/lisp/progmodes/fortran.el
@@ -29,7 +29,7 @@
29;; form. For editing Fortran 90 free format source, use `f90-mode' 29;; form. For editing Fortran 90 free format source, use `f90-mode'
30;; (f90.el). It is meant to support the GNU Fortran language 30;; (f90.el). It is meant to support the GNU Fortran language
31;; implemented by g77 (its extensions to Fortran77 and 31;; implemented by g77 (its extensions to Fortran77 and
32;; interpretations, e.g. of blackslash in strings). 32;; interpretations, e.g. of backslash in strings).
33 33
34;;; History: 34;;; History:
35 35
@@ -571,7 +571,7 @@ in the Fortran entry in `hs-special-modes-alist'.")
571 ;; An alternative is to match on THEN at a line end, eg: 571 ;; An alternative is to match on THEN at a line end, eg:
572 ;; ".*)[ \t]*then[ \t]*\\($\\|!\\)" 572 ;; ".*)[ \t]*then[ \t]*\\($\\|!\\)"
573 ;; This would also match ELSE branches, though. This does not seem 573 ;; This would also match ELSE branches, though. This does not seem
574 ;; right to me, because then one has neighbouring blocks that are 574 ;; right to me, because then one has neighboring blocks that are
575 ;; not nested in each other. 575 ;; not nested in each other.
576 "\\(if[ \t]*(\\(.*\\|" 576 "\\(if[ \t]*(\\(.*\\|"
577 ".*\n\\([^if]*\\([^i].\\|.[^f]\\|.\\>\\)\\)\\)\\<then\\|" 577 ".*\n\\([^if]*\\([^i].\\|.[^f]\\|.\\>\\)\\)\\)\\<then\\|"
@@ -1462,7 +1462,7 @@ Return point or nil."
1462 1462
1463(defun fortran-beginning-do () 1463(defun fortran-beginning-do ()
1464 "Search backwards for first unmatched DO [WHILE]. 1464 "Search backwards for first unmatched DO [WHILE].
1465Return point or nil. Ignores labelled DO loops (ie DO 10 ... 10 CONTINUE)." 1465Return point or nil. Ignores labeled DO loops (ie DO 10 ... 10 CONTINUE)."
1466 (let ((case-fold-search t) 1466 (let ((case-fold-search t)
1467 (dostart-re "\\(\\(\\sw\\|\\s_\\)+:[ \t]*\\)?do[ \t]+[^0-9]")) 1467 (dostart-re "\\(\\(\\sw\\|\\s_\\)+:[ \t]*\\)?do[ \t]+[^0-9]"))
1468 (if (save-excursion 1468 (if (save-excursion
@@ -1482,7 +1482,7 @@ Return point or nil. Ignores labelled DO loops (ie DO 10 ... 10 CONTINUE)."
1482 (skip-chars-forward " \t0-9") 1482 (skip-chars-forward " \t0-9")
1483 (cond ((looking-at dostart-re) 1483 (cond ((looking-at dostart-re)
1484 (setq count (1- count))) 1484 (setq count (1- count)))
1485 ;; Note labelled loop ends not considered. 1485 ;; Note labeled loop ends not considered.
1486 ((looking-at "end[ \t]*do\\b") 1486 ((looking-at "end[ \t]*do\\b")
1487 (setq count (1+ count))))) 1487 (setq count (1+ count)))))
1488 (and (zerop count) 1488 (and (zerop count)
diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el
index e47ba3c92f3..7d31fb63e91 100644
--- a/lisp/progmodes/gdb-mi.el
+++ b/lisp/progmodes/gdb-mi.el
@@ -25,7 +25,7 @@
25 25
26;;; Credits: 26;;; Credits:
27 27
28;; This file was written by by Nick Roberts following the general design 28;; This file was written by Nick Roberts following the general design
29;; used in gdb-ui.el for Emacs 22.1 - 23.1. It is currently being developed 29;; used in gdb-ui.el for Emacs 22.1 - 23.1. It is currently being developed
30;; by Dmitry Dzhus <dima@sphinx.net.ru> as part of the Google Summer 30;; by Dmitry Dzhus <dima@sphinx.net.ru> as part of the Google Summer
31;; of Code 2009 Project "Emacs GDB/MI migration". 31;; of Code 2009 Project "Emacs GDB/MI migration".
@@ -350,7 +350,7 @@ automatically.
350 350
351This setting is used in non-stop mode only. In all-stop mode, 351This setting is used in non-stop mode only. In all-stop mode,
352Emacs always switches to the thread which caused the stop." 352Emacs always switches to the thread which caused the stop."
353 ;; exited, exited-normally and exited-signalled are not 353 ;; exited, exited-normally and exited-signaled are not
354 ;; thread-specific stop reasons and therefore are not included in 354 ;; thread-specific stop reasons and therefore are not included in
355 ;; this list 355 ;; this list
356 :type '(choice 356 :type '(choice
@@ -2217,7 +2217,7 @@ Return position where LINE begins."
2217(defun gdb-mapcar* (function &rest seqs) 2217(defun gdb-mapcar* (function &rest seqs)
2218 "Apply FUNCTION to each element of SEQS, and make a list of the results. 2218 "Apply FUNCTION to each element of SEQS, and make a list of the results.
2219If there are several SEQS, FUNCTION is called with that many 2219If there are several SEQS, FUNCTION is called with that many
2220arugments, and mapping stops as sson as the shortest list runs 2220arguments, and mapping stops as soon as the shortest list runs
2221out." 2221out."
2222 (let ((shortest (apply #'min (mapcar #'length seqs)))) 2222 (let ((shortest (apply #'min (mapcar #'length seqs))))
2223 (mapcar (lambda (i) 2223 (mapcar (lambda (i)
@@ -3428,7 +3428,7 @@ breakpoints buffer."
3428 (error "Not recognized as break/watchpoint line"))))) 3428 (error "Not recognized as break/watchpoint line")))))
3429 3429
3430 3430
3431;; Frames buffer. This displays a perpetually correct bactrack trace. 3431;; Frames buffer. This displays a perpetually correct backtrack trace.
3432;; 3432;;
3433(def-gdb-trigger-and-handler 3433(def-gdb-trigger-and-handler
3434 gdb-invalidate-frames (gdb-current-context-command "-stack-list-frames") 3434 gdb-invalidate-frames (gdb-current-context-command "-stack-list-frames")
diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el
index ff192d5678e..dbffbc266e7 100644
--- a/lisp/progmodes/grep.el
+++ b/lisp/progmodes/grep.el
@@ -339,7 +339,7 @@ See `compilation-error-screen-columns'"
339 "The most recent grep buffer. 339 "The most recent grep buffer.
340A grep buffer becomes most recent when you select Grep mode in it. 340A grep buffer becomes most recent when you select Grep mode in it.
341Notice that using \\[next-error] or \\[compile-goto-error] modifies 341Notice that using \\[next-error] or \\[compile-goto-error] modifies
342`complation-last-buffer' rather than `grep-last-buffer'.") 342`compilation-last-buffer' rather than `grep-last-buffer'.")
343 343
344;;;###autoload 344;;;###autoload
345(defconst grep-regexp-alist 345(defconst grep-regexp-alist
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el
index 7b3a2893610..c60e8d72abc 100644
--- a/lisp/progmodes/gud.el
+++ b/lisp/progmodes/gud.el
@@ -2016,7 +2016,7 @@ extension EXTN. Normally EXTN is given as the regular expression
2016 ((looking-at "final") 2016 ((looking-at "final")
2017 (forward-char 5)) 2017 (forward-char 5))
2018 2018
2019 ;; Move point past a ClassDeclaraction, but save the class 2019 ;; Move point past a ClassDeclaration, but save the class
2020 ;; Identifier. 2020 ;; Identifier.
2021 ((looking-at "class") 2021 ((looking-at "class")
2022 (forward-char 5) 2022 (forward-char 5)
@@ -2102,7 +2102,7 @@ extension EXTN. Normally EXTN is given as the regular expression
2102 massaged-args))) 2102 massaged-args)))
2103 2103
2104;; Search for an association with P, a fully qualified class name, in 2104;; Search for an association with P, a fully qualified class name, in
2105;; gud-jdb-class-source-alist. The asssociation gives the fully 2105;; gud-jdb-class-source-alist. The association gives the fully
2106;; qualified file name of the source file which produced the class. 2106;; qualified file name of the source file which produced the class.
2107(defun gud-jdb-find-source-file (p) 2107(defun gud-jdb-find-source-file (p)
2108 (cdr (assoc p gud-jdb-class-source-alist))) 2108 (cdr (assoc p gud-jdb-class-source-alist)))
@@ -2155,7 +2155,7 @@ during jdb initialization depending on the value of
2155 string 2155 string
2156 (concat "[ \t\n\r,\"" path-separator "]+"))))) 2156 (concat "[ \t\n\r,\"" path-separator "]+")))))
2157 2157
2158;; See comentary for other debugger's marker filters - there you will find 2158;; See commentary for other debugger's marker filters - there you will find
2159;; important notes about STRING. 2159;; important notes about STRING.
2160(defun gud-jdb-marker-filter (string) 2160(defun gud-jdb-marker-filter (string)
2161 2161
@@ -3387,7 +3387,7 @@ This event can be examined by forms in `gud-tooltip-display'.")
3387 3387
3388(defun gud-tooltip-dereference (&optional arg) 3388(defun gud-tooltip-dereference (&optional arg)
3389 "Toggle whether tooltips should show `* expr' or `expr'. 3389 "Toggle whether tooltips should show `* expr' or `expr'.
3390With arg, dereference expr if ARG is positive, otherwise do not derereference." 3390With arg, dereference expr if ARG is positive, otherwise do not dereference."
3391 (interactive "P") 3391 (interactive "P")
3392 (setq gud-tooltip-dereference 3392 (setq gud-tooltip-dereference
3393 (if (null arg) 3393 (if (null arg)
diff --git a/lisp/progmodes/idlw-help.el b/lisp/progmodes/idlw-help.el
index 8d8966ee159..2708346f05f 100644
--- a/lisp/progmodes/idlw-help.el
+++ b/lisp/progmodes/idlw-help.el
@@ -705,7 +705,8 @@ Those words in `idlwave-completion-help-links' have links. The
705 ;; we kill the help frame before the return-frame is selected. 705 ;; we kill the help frame before the return-frame is selected.
706 ;; To protect the workings, we wait for up to one second 706 ;; To protect the workings, we wait for up to one second
707 ;; and check if the return-frame *is* now selected. 707 ;; and check if the return-frame *is* now selected.
708 ;; This is marked "eperimental" since we are not sure when its OK. 708 ;; This is marked "experimental" since we are not sure when
709 ;; it's OK.
709 (let ((maxtime 1.0) (time 0.) (step 0.1)) 710 (let ((maxtime 1.0) (time 0.) (step 0.1))
710 (select-frame idlwave-help-return-frame) 711 (select-frame idlwave-help-return-frame)
711 (while (and (sit-for step) 712 (while (and (sit-for step)
@@ -990,7 +991,7 @@ on a line. Then `NAME:' must be followed by the routine name on the
990same or the next line. When KEYWORD is non-nil, looks first for a 991same or the next line. When KEYWORD is non-nil, looks first for a
991`KEYWORDS' section. It is amazing how inconsisten this is through 992`KEYWORDS' section. It is amazing how inconsisten this is through
992some IDL libraries I have seen. We settle for a line containing an 993some IDL libraries I have seen. We settle for a line containing an
993upper case \"KEYWORD\" string. If this line is not fould we search 994upper case \"KEYWORD\" string. If this line is not found we search
994for the keyword anyway to increase the hit-rate 995for the keyword anyway to increase the hit-rate
995 996
996When one of these sections exists we check for a line starting with any of 997When one of these sections exists we check for a line starting with any of
diff --git a/lisp/progmodes/idlw-shell.el b/lisp/progmodes/idlw-shell.el
index 18f47d14a3f..faccbb1f0ca 100644
--- a/lisp/progmodes/idlw-shell.el
+++ b/lisp/progmodes/idlw-shell.el
@@ -925,7 +925,7 @@ IDL has currently stepped.")
925 \\[idlwave-shell-print] or \\[idlwave-shell-mouse-print] with the 925 \\[idlwave-shell-print] or \\[idlwave-shell-mouse-print] with the
926 mouse, help, \\[idlwave-shell-help-expression] or 926 mouse, help, \\[idlwave-shell-help-expression] or
927 \\[idlwave-shell-mouse-help] with the mouse, or with a 927 \\[idlwave-shell-mouse-help] with the mouse, or with a
928 configureable set of custom examine commands using 928 configurable set of custom examine commands using
929 \\[idlwave-shell-examine-select]. The mouse examine commands can 929 \\[idlwave-shell-examine-select]. The mouse examine commands can
930 also work by click and drag, to select an expression for 930 also work by click and drag, to select an expression for
931 examination. 931 examination.
@@ -939,7 +939,7 @@ IDL has currently stepped.")
939 ------------------------------- 939 -------------------------------
940 Info documentation for this package is available. Use \\[idlwave-info] 940 Info documentation for this package is available. Use \\[idlwave-info]
941 to display (complain to your sysadmin if that does not work). 941 to display (complain to your sysadmin if that does not work).
942 For Postscript and HTML versions of the documentation, check IDLWAVE's 942 For PostScript and HTML versions of the documentation, check IDLWAVE's
943 homepage at URL `http://idlwave.org'. 943 homepage at URL `http://idlwave.org'.
944 IDLWAVE has customize support - see the group `idlwave'. 944 IDLWAVE has customize support - see the group `idlwave'.
945 945
@@ -959,7 +959,7 @@ IDL has currently stepped.")
959 ;; Can not use history expansion because "!" is used for system variables. 959 ;; Can not use history expansion because "!" is used for system variables.
960 (setq comint-input-autoexpand nil) 960 (setq comint-input-autoexpand nil)
961 ;; (setq comint-input-ring-size 64) 961 ;; (setq comint-input-ring-size 64)
962 962
963 (set (make-local-variable 'completion-ignore-case) t) 963 (set (make-local-variable 'completion-ignore-case) t)
964 (set (make-local-variable 'comint-completion-addsuffix) '("/" . "")) 964 (set (make-local-variable 'comint-completion-addsuffix) '("/" . ""))
965 (setq comint-input-ignoredups t) 965 (setq comint-input-ignoredups t)
@@ -3707,7 +3707,7 @@ Existing overlays are recycled, in order to minimize consumption."
3707(defun idlwave-shell-make-new-bp-overlay (&optional type disabled) 3707(defun idlwave-shell-make-new-bp-overlay (&optional type disabled)
3708 "Make a new overlay for highlighting breakpoints. 3708 "Make a new overlay for highlighting breakpoints.
3709 3709
3710This stuff is strongly dependant upon the version of Emacs. If TYPE 3710This stuff is strongly dependent upon the version of Emacs. If TYPE
3711is passed, make an overlay of that type ('bp or 'bp-cond, currently 3711is passed, make an overlay of that type ('bp or 'bp-cond, currently
3712only for glyphs)." 3712only for glyphs)."
3713 (let ((ov (make-overlay 1 1)) 3713 (let ((ov (make-overlay 1 1))
diff --git a/lisp/progmodes/idlwave.el b/lisp/progmodes/idlwave.el
index c77ee4b76a9..1233ee19ff6 100644
--- a/lisp/progmodes/idlwave.el
+++ b/lisp/progmodes/idlwave.el
@@ -605,7 +605,7 @@ The value of this variable may be nil to inhibit display, or an integer to
605indicate the maximum number of classes to display. 605indicate the maximum number of classes to display.
606 606
607On XEmacs, a full list of classes will also be placed into a `help-echo' 607On XEmacs, a full list of classes will also be placed into a `help-echo'
608property on the competion items, so that the list of classes for the current 608property on the completion items, so that the list of classes for the current
609item is displayed in the echo area. If the value of this variable is a 609item is displayed in the echo area. If the value of this variable is a
610negative integer, the `help-echo' property will be suppressed." 610negative integer, the `help-echo' property will be suppressed."
611 :group 'idlwave-completion 611 :group 'idlwave-completion
@@ -7206,7 +7206,7 @@ If these don't exist, a letter in the string is automatically selected."
7206;;---------------------------------------------------------------------- 7206;;----------------------------------------------------------------------
7207 7207
7208;;; ------------------------------------------------------------------------ 7208;;; ------------------------------------------------------------------------
7209;;; Stucture parsing code, and code to manage class info 7209;;; Structure parsing code, and code to manage class info
7210 7210
7211;; 7211;;
7212;; - Go again over the documentation how to write a completion 7212;; - Go again over the documentation how to write a completion
@@ -8961,7 +8961,7 @@ This expects NAME TYPE IDLWAVE-TWIN-CLASS to be bound to the right values."
8961 (nth 1 source))) 8961 (nth 1 source)))
8962 8962
8963(defun idlwave-downcase-safe (string) 8963(defun idlwave-downcase-safe (string)
8964 "Donwcase if string, else return unchanged." 8964 "Downcase if string, else return unchanged."
8965 (if (stringp string) 8965 (if (stringp string)
8966 (downcase string) 8966 (downcase string)
8967 string)) 8967 string))
diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el
index 5505e8e94b2..0e3fdc78a39 100644
--- a/lisp/progmodes/js.el
+++ b/lisp/progmodes/js.el
@@ -1295,7 +1295,7 @@ LIMIT defaults to point."
1295;; Like (up-list -1), but only considers lists that end nearby" 1295;; Like (up-list -1), but only considers lists that end nearby"
1296(defun js--up-nearby-list () 1296(defun js--up-nearby-list ()
1297 (save-restriction 1297 (save-restriction
1298 ;; Look at a very small region so our compuation time doesn't 1298 ;; Look at a very small region so our computation time doesn't
1299 ;; explode in pathological cases. 1299 ;; explode in pathological cases.
1300 (narrow-to-region (max (point-min) (- (point) 500)) (point)) 1300 (narrow-to-region (max (point-min) (- (point) 500)) (point))
1301 (up-list -1))) 1301 (up-list -1)))
@@ -3352,7 +3352,7 @@ If one hasn't been set, or if it's stale, prompt for a new one."
3352 ;; etc. and produce maddening "unbalanced parenthesis" errors. 3352 ;; etc. and produce maddening "unbalanced parenthesis" errors.
3353 ;; When we attempt to find the error and scroll to the portion of 3353 ;; When we attempt to find the error and scroll to the portion of
3354 ;; the buffer containing the problem, JIT-lock will apply the 3354 ;; the buffer containing the problem, JIT-lock will apply the
3355 ;; correct syntax to the regular expresion literal and the problem 3355 ;; correct syntax to the regular expression literal and the problem
3356 ;; will mysteriously disappear. 3356 ;; will mysteriously disappear.
3357 ;; FIXME: We should actually do this fontification lazily by adding 3357 ;; FIXME: We should actually do this fontification lazily by adding
3358 ;; calls to syntax-propertize wherever it's really needed. 3358 ;; calls to syntax-propertize wherever it's really needed.
diff --git a/lisp/progmodes/make-mode.el b/lisp/progmodes/make-mode.el
index 293ba49d4ae..c49519ed179 100644
--- a/lisp/progmodes/make-mode.el
+++ b/lisp/progmodes/make-mode.el
@@ -532,7 +532,7 @@ not be enclosed in { } or ( )."
532;; should return an exit status of zero if the target `foo' is 532;; should return an exit status of zero if the target `foo' is
533;; up to date and a nonzero exit status otherwise. 533;; up to date and a nonzero exit status otherwise.
534;; Many makes can do this although the docs/manpages do not mention 534;; Many makes can do this although the docs/manpages do not mention
535;; it. Try it with your favourite one. GNU make, System V make, and 535;; it. Try it with your favorite one. GNU make, System V make, and
536;; Dennis Vadura's DMake have no problems. 536;; Dennis Vadura's DMake have no problems.
537;; Set the variable `makefile-brave-make' to the name of the 537;; Set the variable `makefile-brave-make' to the name of the
538;; make utility that does this on your system. 538;; make utility that does this on your system.
diff --git a/lisp/progmodes/meta-mode.el b/lisp/progmodes/meta-mode.el
index ab640c0e270..d0a34179cc8 100644
--- a/lisp/progmodes/meta-mode.el
+++ b/lisp/progmodes/meta-mode.el
@@ -27,53 +27,17 @@
27;; 27;;
28;; This Emacs Lisp package provides a major mode for editing Metafont 28;; This Emacs Lisp package provides a major mode for editing Metafont
29;; or MetaPost sources. It includes all the necessary code to set up 29;; or MetaPost sources. It includes all the necessary code to set up
30;; a major mode including an approriate syntax table, keymap, and a 30;; a major mode including an appropriate syntax table, keymap, and a
31;; mode-specific pull-down menu. It also provides a sophisticated set 31;; mode-specific pull-down menu. It also provides a sophisticated set
32;; of font-lock patterns, a fancy indentation function adapted from 32;; of font-lock patterns, a fancy indentation function adapted from
33;; AUCTeX's latex.el, and some basic mode-specific editing functions 33;; AUCTeX's latex.el, and some basic mode-specific editing functions
34;; such as functions to move to the beginning or end of the enclosing 34;; such as functions to move to the beginning or end of the enclosing
35;; environment, or to mark, re-indent, or comment-out environments. 35;; environment, or to mark, re-indent, or comment-out environments.
36;; On the other hand, it doesn't yet provide any functionality for 36;; On the other hand, it doesn't yet provide any functionality for
37;; running Metafont or MetaPost in a shell buffer form within Emacs, 37;; running Metafont or MetaPost in a shell buffer from within Emacs,
38;; but such functionality might be added later, either as part of this 38;; but such functionality might be added later, either as part of this
39;; package or as a separate Emacs Lisp package. 39;; package or as a separate Emacs Lisp package.
40 40
41;; Installation:
42;;
43;; An interface to running Metafont or MetaPost as a shell process
44;; from within Emacs is currently under development as a separate
45;; Emacs Lisp package (meta-buf.el). In order to have that package
46;; loaded automatically when first entering Metafont or MetaPost mode,
47;; you might use the load-hook provided in this package by adding
48;; these lines to your startup file:
49;;
50;; (add-hook 'meta-mode-load-hook
51;; (lambda () (require 'meta-buf)))
52;;
53;; The add-on package loaded this way may in turn make use of the
54;; mode-hooks provided in this package to activate additional features
55;; when entering Metafont or MetaPost mode.
56
57;; Font Lock Support:
58;;
59;; If you are using global-font-lock-mode (introduced in Emacs 19.31),
60;; fontification in Metafont and/or MetaPost mode will be activated
61;; automatically. To speed up fontification for the rather complex
62;; patterns used in these modes, it may be a good idea to activate
63;; lazy-lock as a font-lock-support-mode (introduced in Emacs 19.32)
64;; by adding these lines to your startup file:
65;;
66;; (global-font-lock-mode t)
67;; (setq font-lock-support-mode 'lazy-lock-mode)
68;;
69;; If you are using an older version of Emacs, which doesn't provide
70;; global-font-lock-mode or font-lock-support-mode, you can also
71;; activate fontification in Metafont and/or MetaPost mode by adding
72;; the following lines to your startup file:
73;;
74;; (add-hook 'meta-common-mode-hook 'turn-on-font-lock)
75;; (add-hook 'meta-common-mode-hook 'turn-on-lazy-lock)
76
77;; Customization: 41;; Customization:
78;; 42;;
79;; Following the usual Emacs Lisp coding conventions, the major modes 43;; Following the usual Emacs Lisp coding conventions, the major modes
@@ -88,10 +52,6 @@
88 52
89;; Availability: 53;; Availability:
90;; 54;;
91;; This package is currently available via my "TeX Software" WWW page:
92;;
93;; http://www.thphy.uni-duesseldorf.de/~vieth/subjects/tex/software.html
94;;
95;; As of this version 1.0, this package will be uploaded to CTAN 55;; As of this version 1.0, this package will be uploaded to CTAN
96;; archives, where it shall find a permanent home, presumably in 56;; archives, where it shall find a permanent home, presumably in
97;; tex-archive/support/emacs-modes. It will also be submitted for 57;; tex-archive/support/emacs-modes. It will also be submitted for
@@ -104,7 +64,7 @@
104;; v 0.2 -- 1997/02/03 UV Improved and debugged font-lock patterns. 64;; v 0.2 -- 1997/02/03 UV Improved and debugged font-lock patterns.
105;; Added indent-line-function for TAB. 65;; Added indent-line-function for TAB.
106;; v 0.3 -- 1997/02/17 UV Improved font-lock patterns and syntax table. 66;; v 0.3 -- 1997/02/17 UV Improved font-lock patterns and syntax table.
107;; Improved and debbuged indentation function. 67;; Improved and debugged indentation function.
108;; v 0.4 -- 1997/02/18 UV Added functions to indent regions for M-C-q, 68;; v 0.4 -- 1997/02/18 UV Added functions to indent regions for M-C-q,
109;; also added a preliminary mode-specific menu. 69;; also added a preliminary mode-specific menu.
110;; v 0.5 -- 1997/02/19 UV Added functions to skip to next or previous 70;; v 0.5 -- 1997/02/19 UV Added functions to skip to next or previous
@@ -201,7 +161,7 @@
201 "[ \t\f]+\\(\\sw+\\|\\s_+\\|\\s.+\\)") 161 "[ \t\f]+\\(\\sw+\\|\\s_+\\|\\s.+\\)")
202 '((1 font-lock-keyword-face) 162 '((1 font-lock-keyword-face)
203 (2 font-lock-function-name-face))) 163 (2 font-lock-function-name-face)))
204 ;; binary macro defintions: <leveldef> x operator y 164 ;; binary macro definitions: <leveldef> x operator y
205 (cons (concat "\\<" macro-keywords-2 "\\>" 165 (cons (concat "\\<" macro-keywords-2 "\\>"
206 "[ \t\f]+\\(\\sw+\\)" 166 "[ \t\f]+\\(\\sw+\\)"
207 "[ \t\f]*\\(\\sw+\\|\\s.+\\)" 167 "[ \t\f]*\\(\\sw+\\|\\s.+\\)"
@@ -513,13 +473,13 @@ If the list was changed, sort the list and remove duplicates first."
513 :group 'meta-font) 473 :group 'meta-font)
514 474
515(defcustom meta-right-comment-regexp nil 475(defcustom meta-right-comment-regexp nil
516 "Regexp matching comments that should be placed to the right margin." 476 "Regexp matching comments that should be placed on the right margin."
517 :type '(choice regexp 477 :type '(choice regexp
518 (const :tag "None" nil)) 478 (const :tag "None" nil))
519 :group 'meta-font) 479 :group 'meta-font)
520 480
521(defcustom meta-ignore-comment-regexp "%[^%]" 481(defcustom meta-ignore-comment-regexp "%[^%]"
522 "Regexp matching comments that whose indentation should not be touched." 482 "Regexp matching comments whose indentation should not be touched."
523 :type 'regexp 483 :type 'regexp
524 :group 'meta-font) 484 :group 'meta-font)
525 485
@@ -740,7 +700,7 @@ If the list was changed, sort the list and remove duplicates first."
740 700
741 701
742(defun meta-beginning-of-defun (&optional arg) 702(defun meta-beginning-of-defun (&optional arg)
743 "Move backward to beginnning of a defun in Metafont or MetaPost code. 703 "Move backward to beginning of a defun in Metafont or MetaPost code.
744With numeric argument, do it that many times. 704With numeric argument, do it that many times.
745Negative arg -N means move forward to Nth following beginning of defun. 705Negative arg -N means move forward to Nth following beginning of defun.
746Returns t unless search stops due to beginning or end of buffer." 706Returns t unless search stops due to beginning or end of buffer."
diff --git a/lisp/progmodes/mixal-mode.el b/lisp/progmodes/mixal-mode.el
index 103c7be7d3c..7d1f12595ab 100644
--- a/lisp/progmodes/mixal-mode.el
+++ b/lisp/progmodes/mixal-mode.el
@@ -1058,7 +1058,7 @@ EXECUTION-TIME holds info about the time it takes, number or string.")
1058 (list 1058 (list
1059 (let* ((completion-ignore-case t) 1059 (let* ((completion-ignore-case t)
1060 ;; we already have a list, but it is not in the right format 1060 ;; we already have a list, but it is not in the right format
1061 ;; transform it to a valid table so completition can use it 1061 ;; transform it to a valid table so completion can use it
1062 (table (mapcar (lambda (elm) (cons (symbol-name (car elm)) nil)) 1062 (table (mapcar (lambda (elm) (cons (symbol-name (car elm)) nil))
1063 mixal-operation-codes-alist)) 1063 mixal-operation-codes-alist))
1064 ;; prompt is different depending on we are close to a valid op-code 1064 ;; prompt is different depending on we are close to a valid op-code
diff --git a/lisp/progmodes/modula2.el b/lisp/progmodes/modula2.el
index f0b8f7cbca7..0c43a3ed354 100644
--- a/lisp/progmodes/modula2.el
+++ b/lisp/progmodes/modula2.el
@@ -466,7 +466,7 @@ followed by the first character of the construct.
466 '(m2-var) \n _ \n \n 466 '(m2-var) \n _ \n \n
467 '(m2-begin) 467 '(m2-begin)
468 '(m2-begin-comment) 468 '(m2-begin-comment)
469 " Module " str " Initialisation Code " 469 " Module " str " Initialization Code "
470 '(m2-end-comment) 470 '(m2-end-comment)
471 \n \n "END " str "." > \n) 471 \n \n "END " str "." > \n)
472 472
diff --git a/lisp/progmodes/pascal.el b/lisp/progmodes/pascal.el
index 57ed13969b4..67e3c4a18b4 100644
--- a/lisp/progmodes/pascal.el
+++ b/lisp/progmodes/pascal.el
@@ -227,7 +227,7 @@ will do all lineups."
227 :type '(set :extra-offset 8 227 :type '(set :extra-offset 8
228 (const :tag "Everything" all) 228 (const :tag "Everything" all)
229 (const :tag "Parameter lists" paramlist) 229 (const :tag "Parameter lists" paramlist)
230 (const :tag "Decalrations" declaration) 230 (const :tag "Declarations" declaration)
231 (const :tag "Case statements" case)) 231 (const :tag "Case statements" case))
232 :group 'pascal) 232 :group 'pascal)
233 233
diff --git a/lisp/progmodes/prolog.el b/lisp/progmodes/prolog.el
index 283919c131e..ef0905bb2a8 100644
--- a/lisp/progmodes/prolog.el
+++ b/lisp/progmodes/prolog.el
@@ -116,7 +116,7 @@
116;; Version 1.22: 116;; Version 1.22:
117;; o Allowed both 'swipl' and 'pl' as names for the SWI Prolog 117;; o Allowed both 'swipl' and 'pl' as names for the SWI Prolog
118;; interpreter. 118;; interpreter.
119;; o Atoms that start a line are not blindly coloured as 119;; o Atoms that start a line are not blindly colored as
120;; predicates. Instead we check that they are followed by ( or 120;; predicates. Instead we check that they are followed by ( or
121;; :- first. Patch suggested by Guy Wiener. 121;; :- first. Patch suggested by Guy Wiener.
122;; Version 1.21: 122;; Version 1.21:
@@ -151,7 +151,7 @@
151;; (`prolog-electric-dot-full-predicate-template', defaults to t 151;; (`prolog-electric-dot-full-predicate-template', defaults to t
152;; since it seems quicker to me to just type those commata). A 152;; since it seems quicker to me to just type those commata). A
153;; trivial adaptation of a patch by Markus Triska. 153;; trivial adaptation of a patch by Markus Triska.
154;; o Improved the behaviour of electric if-then-else to only skip 154;; o Improved the behavior of electric if-then-else to only skip
155;; forward if the parenthesis/semicolon is preceded by 155;; forward if the parenthesis/semicolon is preceded by
156;; whitespace. Once more a trivial adaptation of a patch by 156;; whitespace. Once more a trivial adaptation of a patch by
157;; Markus Triska. 157;; Markus Triska.
@@ -1023,7 +1023,7 @@ VERSION is of the format (Major . Minor)"
1023 1023
1024 1024
1025(defvar prolog-mode-hook nil 1025(defvar prolog-mode-hook nil
1026 "List of functions to call after the prolog mode has initialised.") 1026 "List of functions to call after the prolog mode has initialized.")
1027 1027
1028(unless (fboundp 'prog-mode) 1028(unless (fboundp 'prog-mode)
1029 (defalias 'prog-mode 'fundamental-mode)) 1029 (defalias 'prog-mode 'fundamental-mode))
@@ -1090,7 +1090,7 @@ Actually this is just customized `prolog-mode'."
1090 map)) 1090 map))
1091 1091
1092(defvar prolog-inferior-mode-hook nil 1092(defvar prolog-inferior-mode-hook nil
1093 "List of functions to call after the inferior prolog mode has initialised.") 1093 "List of functions to call after the inferior prolog mode has initialized.")
1094 1094
1095(defvar prolog-inferior-error-regexp-alist 1095(defvar prolog-inferior-error-regexp-alist
1096 '(;; GNU Prolog used to not follow the GNU standard format. 1096 '(;; GNU Prolog used to not follow the GNU standard format.
diff --git a/lisp/progmodes/ps-mode.el b/lisp/progmodes/ps-mode.el
index d60e7513651..94d55ee3f61 100644
--- a/lisp/progmodes/ps-mode.el
+++ b/lisp/progmodes/ps-mode.el
@@ -624,7 +624,7 @@ Typing \\<ps-run-mode-map>\\[ps-run-goto-error] when the cursor is at the number
624(defun ps-mode-target-column () 624(defun ps-mode-target-column ()
625 "To what column should text on current line be indented? 625 "To what column should text on current line be indented?
626 626
627Identation is increased if the last token on the current line 627Indentation is increased if the last token on the current line
628defines the beginning of a group. These tokens are: { [ <<" 628defines the beginning of a group. These tokens are: { [ <<"
629 (save-excursion 629 (save-excursion
630 (beginning-of-line) 630 (beginning-of-line)
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index 38bf9552b2a..a0a368777e7 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -119,7 +119,7 @@
119 (1 font-lock-type-face)) 119 (1 font-lock-type-face))
120 ;; Built-ins. (The next three blocks are from 120 ;; Built-ins. (The next three blocks are from
121 ;; `__builtin__.__dict__.keys()' in Python 2.7) These patterns 121 ;; `__builtin__.__dict__.keys()' in Python 2.7) These patterns
122 ;; are debateable, but they at least help to spot possible 122 ;; are debatable, but they at least help to spot possible
123 ;; shadowing of builtins. 123 ;; shadowing of builtins.
124 (,(rx symbol-start (or 124 (,(rx symbol-start (or
125 ;; exceptions 125 ;; exceptions
@@ -550,7 +550,7 @@ element matches `python-python-command'."
550 "^> \\(.*\\)(\\([0-9]+\\))\\([?a-zA-Z0-9_<>]+\\)()" 550 "^> \\(.*\\)(\\([0-9]+\\))\\([?a-zA-Z0-9_<>]+\\)()"
551 "Regular expression pdbtrack uses to find a stack trace entry.") 551 "Regular expression pdbtrack uses to find a stack trace entry.")
552 552
553(defconst python-pdbtrack-input-prompt "\n[(<]*[Pp]db[>)]+ " 553(defconst python-pdbtrack-input-prompt "\n[(<]*[Ii]?[Pp]db[>)]+ "
554 "Regular expression pdbtrack uses to recognize a pdb prompt.") 554 "Regular expression pdbtrack uses to recognize a pdb prompt.")
555 555
556(defconst python-pdbtrack-track-range 10000 556(defconst python-pdbtrack-track-range 10000
@@ -948,22 +948,12 @@ Finds end of innermost nested class or method definition."
948 "Go to start of current statement. 948 "Go to start of current statement.
949Accounts for continuation lines, multi-line strings, and 949Accounts for continuation lines, multi-line strings, and
950multi-line bracketed expressions." 950multi-line bracketed expressions."
951 (beginning-of-line) 951 (while
952 (python-beginning-of-string)
953 (let (point)
954 (while (and (python-continuation-line-p)
955 (if point
956 (< (point) point)
957 t))
958 (beginning-of-line)
959 (if (python-backslash-continuation-line-p) 952 (if (python-backslash-continuation-line-p)
960 (progn 953 (progn (forward-line -1) t)
961 (forward-line -1) 954 (beginning-of-line)
962 (while (python-backslash-continuation-line-p) 955 (or (python-beginning-of-string)
963 (forward-line -1))) 956 (python-skip-out))))
964 (python-beginning-of-string)
965 (python-skip-out))
966 (setq point (point))))
967 (back-to-indentation)) 957 (back-to-indentation))
968 958
969(defun python-skip-out (&optional forward syntax) 959(defun python-skip-out (&optional forward syntax)
@@ -971,6 +961,7 @@ multi-line bracketed expressions."
971Skip forward if FORWARD is non-nil, else backward. 961Skip forward if FORWARD is non-nil, else backward.
972If SYNTAX is non-nil it is the state returned by `syntax-ppss' at point. 962If SYNTAX is non-nil it is the state returned by `syntax-ppss' at point.
973Return non-nil if and only if skipping was done." 963Return non-nil if and only if skipping was done."
964 ;; FIXME: Use syntax-ppss-toplevel-pos.
974 (let ((depth (syntax-ppss-depth (or syntax (syntax-ppss)))) 965 (let ((depth (syntax-ppss-depth (or syntax (syntax-ppss))))
975 (forward (if forward -1 1))) 966 (forward (if forward -1 1)))
976 (unless (zerop depth) 967 (unless (zerop depth)
@@ -2562,7 +2553,7 @@ If the traceback target file path is invalid, we look for the
2562most recently visited python-mode buffer which either has the 2553most recently visited python-mode buffer which either has the
2563name of the current function or class, or which defines the 2554name of the current function or class, or which defines the
2564function or class. This is to provide for scripts not in the 2555function or class. This is to provide for scripts not in the
2565local filesytem (e.g., Zope's 'Script \(Python)', but it's not 2556local file system (e.g., Zope's 'Script \(Python)', but it's not
2566Zope specific). If you put a copy of the script in a buffer 2557Zope specific). If you put a copy of the script in a buffer
2567named for the script and activate python-mode, then pdbtrack will 2558named for the script and activate python-mode, then pdbtrack will
2568find it." 2559find it."
@@ -2592,6 +2583,7 @@ find it."
2592 (if (not (string-match (concat python-pdbtrack-input-prompt "$") block)) 2583 (if (not (string-match (concat python-pdbtrack-input-prompt "$") block))
2593 (python-pdbtrack-overlay-arrow nil) 2584 (python-pdbtrack-overlay-arrow nil)
2594 2585
2586 (setq block (ansi-color-filter-apply block))
2595 (setq target (python-pdbtrack-get-source-buffer block)) 2587 (setq target (python-pdbtrack-get-source-buffer block))
2596 2588
2597 (if (stringp target) 2589 (if (stringp target)
diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el
index 7b949134c6c..bca5c93e0a5 100644
--- a/lisp/progmodes/sh-script.el
+++ b/lisp/progmodes/sh-script.el
@@ -889,7 +889,7 @@ See `sh-feature'.")
889 font-lock-variable-name-face)) 889 font-lock-variable-name-face))
890 890
891 (rc sh-append es) 891 (rc sh-append es)
892 (bash sh-append shell ("\\$(\\(\\sw+\\)" (1 'sh-quoted-exec t) )) 892 (bash sh-append sh ("\\$(\\(\\sw+\\)" (1 'sh-quoted-exec t) ))
893 (sh sh-append shell 893 (sh sh-append shell
894 ;; Variable names. 894 ;; Variable names.
895 ("\\$\\({#?\\)?\\([[:alpha:]_][[:alnum:]_]*\\|[-#?@!]\\)" 2 895 ("\\$\\({#?\\)?\\([[:alpha:]_][[:alnum:]_]*\\|[-#?@!]\\)" 2
@@ -985,7 +985,7 @@ Find all the unescaped \" characters within said subshell, remembering that
985subshells can nest." 985subshells can nest."
986 ;; FIXME: This can (and often does) match multiple lines, yet it makes no 986 ;; FIXME: This can (and often does) match multiple lines, yet it makes no
987 ;; effort to handle multiline cases correctly, so it ends up being 987 ;; effort to handle multiline cases correctly, so it ends up being
988 ;; rather flakey. 988 ;; rather flaky.
989 (when (eq ?\" (nth 3 (syntax-ppss))) ; Check we matched an opening quote. 989 (when (eq ?\" (nth 3 (syntax-ppss))) ; Check we matched an opening quote.
990 ;; bingo we have a $( or a ` inside a "" 990 ;; bingo we have a $( or a ` inside a ""
991 (let (;; `state' can be: double-quote, backquote, code. 991 (let (;; `state' can be: double-quote, backquote, code.
diff --git a/lisp/progmodes/sql.el b/lisp/progmodes/sql.el
index 97a1c4605c2..af9ab537893 100644
--- a/lisp/progmodes/sql.el
+++ b/lisp/progmodes/sql.el
@@ -672,7 +672,7 @@ highlighted properly when you open them."
672 :safe 'symbolp) 672 :safe 'symbolp)
673(defvaralias 'sql-dialect 'sql-product) 673(defvaralias 'sql-dialect 'sql-product)
674 674
675;; misc customization of sql.el behaviour 675;; misc customization of sql.el behavior
676 676
677(defcustom sql-electric-stuff nil 677(defcustom sql-electric-stuff nil
678 "Treat some input as electric. 678 "Treat some input as electric.
@@ -1595,7 +1595,7 @@ to add functions and PL/SQL keywords.")
1595"cast" "ceil" "chartorowid" "chr" "cluster_id" "cluster_probability" 1595"cast" "ceil" "chartorowid" "chr" "cluster_id" "cluster_probability"
1596"cluster_set" "coalesce" "collect" "compose" "concat" "convert" "corr" 1596"cluster_set" "coalesce" "collect" "compose" "concat" "convert" "corr"
1597"corr_k" "corr_s" "cos" "cosh" "count" "covar_pop" "covar_samp" 1597"corr_k" "corr_s" "cos" "cosh" "count" "covar_pop" "covar_samp"
1598"cube_table" "cume_dist" "currrent_date" "currrent_timestamp" "cv" 1598"cube_table" "cume_dist" "current_date" "current_timestamp" "cv"
1599"dataobj_to_partition" "dbtimezone" "decode" "decompose" "deletexml" 1599"dataobj_to_partition" "dbtimezone" "decode" "decompose" "deletexml"
1600"dense_rank" "depth" "deref" "dump" "empty_blob" "empty_clob" 1600"dense_rank" "depth" "deref" "dump" "empty_blob" "empty_clob"
1601"existsnode" "exp" "extract" "extractvalue" "feature_id" "feature_set" 1601"existsnode" "exp" "extract" "extractvalue" "feature_id" "feature_set"
@@ -3600,12 +3600,12 @@ The list is maintained in SQL interactive buffers.")
3600 (setq has-schema (and 3600 (setq has-schema (and
3601 (>= (length (car names)) schema-len) 3601 (>= (length (car names)) schema-len)
3602 (string= schema-dot 3602 (string= schema-dot
3603 (downcase (substring (car names) 3603 (downcase (substring (car names)
3604 0 schema-len)))) 3604 0 schema-len))))
3605 names (cdr names))) 3605 names (cdr names)))
3606 (unless has-schema 3606 (unless has-schema
3607 (sql-build-completions schema))))) 3607 (sql-build-completions schema)))))
3608 3608
3609 ;; Try to find the completion 3609 ;; Try to find the completion
3610 (cond 3610 (cond
3611 ((not predicate) 3611 ((not predicate)
@@ -3951,7 +3951,7 @@ is specified in the connection settings."
3951 ;; interactive session 3951 ;; interactive session
3952 (eval `(let ((sql-connection ,connection) 3952 (eval `(let ((sql-connection ,connection)
3953 (,param-var ',rem-params)) 3953 (,param-var ',rem-params))
3954 (sql-product-interactive sql-product 3954 (sql-product-interactive sql-product
3955 new-name))))) 3955 new-name)))))
3956 3956
3957 (message "SQL Connection <%s> does not exist" connection) 3957 (message "SQL Connection <%s> does not exist" connection)
@@ -3981,16 +3981,16 @@ optionally is saved to the user's init file."
3981 3981
3982 (if connection 3982 (if connection
3983 (message "This session was started by a connection; it's already been saved.") 3983 (message "This session was started by a connection; it's already been saved.")
3984 3984
3985 (let ((login (sql-get-product-feature product :sqli-login)) 3985 (let ((login (sql-get-product-feature product :sqli-login))
3986 (alist sql-connection-alist) 3986 (alist sql-connection-alist)
3987 connect) 3987 connect)
3988 3988
3989 ;; Remove the existing connection if the user says so 3989 ;; Remove the existing connection if the user says so
3990 (when (and (assoc name alist) 3990 (when (and (assoc name alist)
3991 (yes-or-no-p (format "Replace connection definition <%s>? " name))) 3991 (yes-or-no-p (format "Replace connection definition <%s>? " name)))
3992 (setq alist (assq-delete-all name alist))) 3992 (setq alist (assq-delete-all name alist)))
3993 3993
3994 ;; Add the new connection if it doesn't exist 3994 ;; Add the new connection if it doesn't exist
3995 (if (assoc name alist) 3995 (if (assoc name alist)
3996 (message "Connection <%s> already exists" name) 3996 (message "Connection <%s> already exists" name)
@@ -4747,8 +4747,8 @@ Try to set `comint-output-filter-functions' like this:
4747 (sql-redirect sqlbuf "\\t off") 4747 (sql-redirect sqlbuf "\\t off")
4748 (when (not (string= a "aligned")) 4748 (when (not (string= a "aligned"))
4749 (sql-redirect sqlbuf "\\a")) 4749 (sql-redirect sqlbuf "\\a"))
4750 4750
4751 ;; Return the list of table names (public schema name can be omitted) 4751 ;; Return the list of table names (public schema name can be omitted)
4752 (mapcar (lambda (tbl) 4752 (mapcar (lambda (tbl)
4753 (if (string= (car tbl) "public") 4753 (if (string= (car tbl) "public")
4754 (cadr tbl) 4754 (cadr tbl)
diff --git a/lisp/progmodes/tcl.el b/lisp/progmodes/tcl.el
index f18ec5abe81..d0e2c5abe7d 100644
--- a/lisp/progmodes/tcl.el
+++ b/lisp/progmodes/tcl.el
@@ -861,7 +861,7 @@ Returns nil if line starts inside a string, t if in a comment."
861 expr-p) 861 expr-p)
862 (progn 862 (progn
863 ;; Line is continuation line, or the sexp opener 863 ;; Line is continuation line, or the sexp opener
864 ;; is not a curly brace, or we are are looking at 864 ;; is not a curly brace, or we are looking at
865 ;; an `expr' expression (which must be split 865 ;; an `expr' expression (which must be split
866 ;; specially). So indentation is column of first 866 ;; specially). So indentation is column of first
867 ;; good spot after sexp opener (with some added 867 ;; good spot after sexp opener (with some added
diff --git a/lisp/progmodes/verilog-mode.el b/lisp/progmodes/verilog-mode.el
index f7cb1318dc0..2d8334bcb7d 100644
--- a/lisp/progmodes/verilog-mode.el
+++ b/lisp/progmodes/verilog-mode.el
@@ -292,7 +292,7 @@ STRING should be given if the last search was by `string-match' on STRING."
292 "Filter `easy-menu-define' MENU to support new features." 292 "Filter `easy-menu-define' MENU to support new features."
293 (cond ((not (featurep 'xemacs)) 293 (cond ((not (featurep 'xemacs))
294 menu) ;; GNU Emacs - passthru 294 menu) ;; GNU Emacs - passthru
295 ;; Xemacs doesn't support :help. Strip it. 295 ;; XEmacs doesn't support :help. Strip it.
296 ;; Recursively filter the a submenu 296 ;; Recursively filter the a submenu
297 ((listp menu) 297 ((listp menu)
298 (mapcar 'verilog-easy-menu-filter menu)) 298 (mapcar 'verilog-easy-menu-filter menu))
@@ -737,7 +737,7 @@ See `compilation-error-regexp-alist' for the formatting. For Emacs 22+.")
737(defvar verilog-error-regexp-xemacs-alist 737(defvar verilog-error-regexp-xemacs-alist
738 ;; Emacs form is '((v-tool "re" 1 2) ...) 738 ;; Emacs form is '((v-tool "re" 1 2) ...)
739 ;; XEmacs form is '(verilog ("re" 1 2) ...) 739 ;; XEmacs form is '(verilog ("re" 1 2) ...)
740 ;; So we can just map from Emacs to Xemacs 740 ;; So we can just map from Emacs to XEmacs
741 (cons 'verilog (mapcar 'cdr verilog-error-regexp-emacs-alist)) 741 (cons 'verilog (mapcar 'cdr verilog-error-regexp-emacs-alist))
742 "List of regexps for Verilog compilers. 742 "List of regexps for Verilog compilers.
743See `compilation-error-regexp-alist-alist' for the formatting. For XEmacs.") 743See `compilation-error-regexp-alist-alist' for the formatting. For XEmacs.")
@@ -913,7 +913,7 @@ the MSB or LSB of a signal inside an AUTORESET."
913(put 'verilog-assignment-delay 'safe-local-variable 'stringp) 913(put 'verilog-assignment-delay 'safe-local-variable 'stringp)
914 914
915(defcustom verilog-auto-arg-sort nil 915(defcustom verilog-auto-arg-sort nil
916 "*If set, AUTOARG signal names will be sorted, not in delaration order. 916 "*If set, AUTOARG signal names will be sorted, not in declaration order.
917Declaration order is advantageous with order based instantiations 917Declaration order is advantageous with order based instantiations
918and is the default for backward compatibility. Sorted order 918and is the default for backward compatibility. Sorted order
919reduces changes when declarations are moved around in a file, and 919reduces changes when declarations are moved around in a file, and
@@ -1847,7 +1847,7 @@ find the errors."
1847 )) 1847 ))
1848 1848
1849(defconst verilog-auto-end-comment-lines-re 1849(defconst verilog-auto-end-comment-lines-re
1850 ;; Matches to names in this list cause auto-end-commentation 1850 ;; Matches to names in this list cause auto-end-commenting
1851 (concat "\\(" 1851 (concat "\\("
1852 verilog-directive-re "\\)\\|\\(" 1852 verilog-directive-re "\\)\\|\\("
1853 (eval-when-compile 1853 (eval-when-compile
@@ -2151,7 +2151,7 @@ find the errors."
2151 "interface" "endinterface" 2151 "interface" "endinterface"
2152 "module" "macromodule" "endmodule" 2152 "module" "macromodule" "endmodule"
2153 "package" "endpackage" 2153 "package" "endpackage"
2154 "primitive" "endprimative" 2154 "primitive" "endprimitive"
2155 "program" "endprogram" 2155 "program" "endprogram"
2156 "property" "endproperty" 2156 "property" "endproperty"
2157 "sequence" "randsequence" "endsequence" 2157 "sequence" "randsequence" "endsequence"
@@ -2709,7 +2709,7 @@ either is ok to parse as a non-comment, or `verilog-insert' was used."
2709 (remove-text-properties (point-min) (point-max) '(v-cmt nil)) 2709 (remove-text-properties (point-min) (point-max) '(v-cmt nil))
2710 (verilog-scan-region (point-min) (point-max)) 2710 (verilog-scan-region (point-min) (point-max))
2711 (setq verilog-scan-cache-tick (buffer-chars-modified-tick)) 2711 (setq verilog-scan-cache-tick (buffer-chars-modified-tick))
2712 (when verilog-debug (message "Scaning... done")))))) 2712 (when verilog-debug (message "Scanning... done"))))))
2713 2713
2714(defun verilog-inside-comment-p () 2714(defun verilog-inside-comment-p ()
2715 "Check if point inside a comment. 2715 "Check if point inside a comment.
@@ -3579,7 +3579,7 @@ With ARG, first kill any existing labels."
3579 "Move backward to beginning of statement." 3579 "Move backward to beginning of statement."
3580 (interactive) 3580 (interactive)
3581 ;; Move back token by token until we see the end 3581 ;; Move back token by token until we see the end
3582 ;; of some ealier line. 3582 ;; of some earlier line.
3583 (let (h) 3583 (let (h)
3584 (while 3584 (while
3585 ;; If the current point does not begin a new 3585 ;; If the current point does not begin a new
@@ -5128,7 +5128,7 @@ Set point to where line starts."
5128 continued)) 5128 continued))
5129 5129
5130(defun verilog-backward-token () 5130(defun verilog-backward-token ()
5131 "Step backward token, returing true if this is a continued line." 5131 "Step backward token, returning true if this is a continued line."
5132 (interactive) 5132 (interactive)
5133 (verilog-backward-syntactic-ws) 5133 (verilog-backward-syntactic-ws)
5134 (cond 5134 (cond
@@ -11958,7 +11958,7 @@ Files are checked based on `verilog-library-flags'."
11958 (mouse-set-point event) 11958 (mouse-set-point event)
11959 (verilog-load-file-at-point t))) 11959 (verilog-load-file-at-point t)))
11960 11960
11961;; ffap isn't useable for Verilog mode. It uses library paths. 11961;; ffap isn't usable for Verilog mode. It uses library paths.
11962;; so define this function to do more or less the same as ffap 11962;; so define this function to do more or less the same as ffap
11963;; but first resolve filename... 11963;; but first resolve filename...
11964(defun verilog-load-file-at-point (&optional warn) 11964(defun verilog-load-file-at-point (&optional warn)
diff --git a/lisp/progmodes/vhdl-mode.el b/lisp/progmodes/vhdl-mode.el
index 2f06afaa5ef..cd2d45b7856 100644
--- a/lisp/progmodes/vhdl-mode.el
+++ b/lisp/progmodes/vhdl-mode.el
@@ -58,7 +58,7 @@
58;; - Word/keyword completion 58;; - Word/keyword completion
59;; - Block commenting 59;; - Block commenting
60;; - Code fixing/alignment/beautification 60;; - Code fixing/alignment/beautification
61;; - Postscript printing 61;; - PostScript printing
62;; - VHDL'87/'93 and VHDL-AMS supported 62;; - VHDL'87/'93 and VHDL-AMS supported
63;; - Comprehensive menu 63;; - Comprehensive menu
64;; - Fully customizable 64;; - Fully customizable
@@ -1752,7 +1752,7 @@ NOTE: Activate the new setting in a VHDL buffer by using the menu entry
1752 1752
1753(defcustom vhdl-print-two-column t 1753(defcustom vhdl-print-two-column t
1754 "*Non-nil means print code in two columns and landscape format. 1754 "*Non-nil means print code in two columns and landscape format.
1755Adjusts settings in a way that postscript printing (\"File\" menu, `ps-print') 1755Adjusts settings in a way that PostScript printing (\"File\" menu, `ps-print')
1756prints VHDL files in a nice two-column landscape style. 1756prints VHDL files in a nice two-column landscape style.
1757 1757
1758NOTE: Activate the new setting by restarting Emacs. 1758NOTE: Activate the new setting by restarting Emacs.
@@ -1761,7 +1761,7 @@ NOTE: Activate the new setting by restarting Emacs.
1761 :group 'vhdl-print) 1761 :group 'vhdl-print)
1762 1762
1763(defcustom vhdl-print-customize-faces t 1763(defcustom vhdl-print-customize-faces t
1764 "*Non-nil means use an optimized set of faces for postscript printing. 1764 "*Non-nil means use an optimized set of faces for PostScript printing.
1765 1765
1766NOTE: Activate the new setting by restarting Emacs. 1766NOTE: Activate the new setting by restarting Emacs.
1767 Overrides `ps-print' settings locally." 1767 Overrides `ps-print' settings locally."
@@ -2131,7 +2131,7 @@ Ignore byte-compiler warnings you might see."
2131 (if (fboundp 'start-itimer) 2131 (if (fboundp 'start-itimer)
2132 (start-itimer "vhdl-mode" function secs repeat t) 2132 (start-itimer "vhdl-mode" function secs repeat t)
2133; (run-with-idle-timer secs repeat function))) 2133; (run-with-idle-timer secs repeat function)))
2134 ;; explicitely activate timer (necessary when Emacs is already idle) 2134 ;; explicitly activate timer (necessary when Emacs is already idle)
2135 (aset (run-with-idle-timer secs repeat function) 0 nil))) 2135 (aset (run-with-idle-timer secs repeat function) 0 nil)))
2136 2136
2137(defun vhdl-warning-when-idle (&rest args) 2137(defun vhdl-warning-when-idle (&rest args)
@@ -3117,7 +3117,7 @@ STRING are replaced by `-' and substrings are converted to lower case."
3117 3117
3118 3118
3119;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 3119;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
3120;;; Menues 3120;;; Menus
3121;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 3121;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
3122 3122
3123;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 3123;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -4567,10 +4567,10 @@ Usage:
4567 4567
4568 4568
4569 PRINTING: 4569 PRINTING:
4570 Postscript printing with different faces (an optimized set of faces is 4570 PostScript printing with different faces (an optimized set of faces is
4571 used if `vhdl-print-customize-faces' is non-nil) or colors \(if 4571 used if `vhdl-print-customize-faces' is non-nil) or colors \(if
4572 `ps-print-color-p' is non-nil) is possible using the standard Emacs 4572 `ps-print-color-p' is non-nil) is possible using the standard Emacs
4573 postscript printing commands. Option `vhdl-print-two-column' defines 4573 PostScript printing commands. Option `vhdl-print-two-column' defines
4574 appropriate default settings for nice landscape two-column printing. 4574 appropriate default settings for nice landscape two-column printing.
4575 The paper format can be set by option `ps-paper-type'. Do not forget to 4575 The paper format can be set by option `ps-paper-type'. Do not forget to
4576 switch `ps-print-color-p' to nil for printing on black-and-white 4576 switch `ps-print-color-p' to nil for printing on black-and-white
@@ -12913,10 +12913,10 @@ This does background highlighting of translate-off regions.")
12913 (font-lock-mode t)) 12913 (font-lock-mode t))
12914 12914
12915;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 12915;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
12916;; Initialization for postscript printing 12916;; Initialization for PostScript printing
12917 12917
12918(defun vhdl-ps-print-settings () 12918(defun vhdl-ps-print-settings ()
12919 "Initialize custom face and page settings for postscript printing." 12919 "Initialize custom face and page settings for PostScript printing."
12920 ;; define custom face settings 12920 ;; define custom face settings
12921 (unless (or (not vhdl-print-customize-faces) 12921 (unless (or (not vhdl-print-customize-faces)
12922 ps-print-color-p) 12922 ps-print-color-p)
@@ -12951,7 +12951,7 @@ This does background highlighting of translate-off regions.")
12951 (set (make-local-variable 'ps-right-margin) 40.0)))) 12951 (set (make-local-variable 'ps-right-margin) 40.0))))
12952 12952
12953(defun vhdl-ps-print-init () 12953(defun vhdl-ps-print-init ()
12954 "Initialize postscript printing." 12954 "Initialize PostScript printing."
12955 (if (featurep 'xemacs) 12955 (if (featurep 'xemacs)
12956 (when (boundp 'ps-print-color-p) 12956 (when (boundp 'ps-print-color-p)
12957 (vhdl-ps-print-settings)) 12957 (vhdl-ps-print-settings))