aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes
diff options
context:
space:
mode:
authorJoakim Verona2012-02-15 15:12:49 +0100
committerJoakim Verona2012-02-15 15:12:49 +0100
commit02db17e53bf46c91b2cb8ee33b43d8ae252a1681 (patch)
treefcafa961e884648e15524130f1dbca55dc7093d0 /lisp/progmodes
parent736ab04e2752e7c3c5b5070a0d62279dcfb12b27 (diff)
parent1deeb569b1247db4c0b2eea4906a9e53e5ee7e99 (diff)
downloademacs-02db17e53bf46c91b2cb8ee33b43d8ae252a1681.tar.gz
emacs-02db17e53bf46c91b2cb8ee33b43d8ae252a1681.zip
upstream
Diffstat (limited to 'lisp/progmodes')
-rw-r--r--lisp/progmodes/cc-engine.el41
-rw-r--r--lisp/progmodes/cc-mode.el13
-rw-r--r--lisp/progmodes/cc-vars.el1
-rw-r--r--lisp/progmodes/prolog.el135
-rw-r--r--lisp/progmodes/python.el7
-rw-r--r--lisp/progmodes/sql.el15
-rw-r--r--lisp/progmodes/verilog-mode.el6
7 files changed, 140 insertions, 78 deletions
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el
index be0f86ddd7e..95b43e763d5 100644
--- a/lisp/progmodes/cc-engine.el
+++ b/lisp/progmodes/cc-engine.el
@@ -2129,7 +2129,7 @@ comment at the start of cc-engine.el for more info."
2129 (widen) 2129 (widen)
2130 (save-excursion 2130 (save-excursion
2131 (let ((c c-state-nonlit-pos-cache) 2131 (let ((c c-state-nonlit-pos-cache)
2132 pos npos lit macro-beg) 2132 pos npos lit macro-beg macro-end)
2133 ;; Trim the cache to take account of buffer changes. 2133 ;; Trim the cache to take account of buffer changes.
2134 (while (and c (> (car c) c-state-nonlit-pos-cache-limit)) 2134 (while (and c (> (car c) c-state-nonlit-pos-cache-limit))
2135 (setq c (cdr c))) 2135 (setq c (cdr c)))
@@ -2143,28 +2143,29 @@ comment at the start of cc-engine.el for more info."
2143 ;; Add an element to `c-state-nonlit-pos-cache' each iteration. 2143 ;; Add an element to `c-state-nonlit-pos-cache' each iteration.
2144 (and 2144 (and
2145 (<= (setq npos (+ pos c-state-nonlit-pos-interval)) here) 2145 (<= (setq npos (+ pos c-state-nonlit-pos-interval)) here)
2146
2147 ;; Test for being in a literal.
2146 (progn 2148 (progn
2147 (setq lit (car (cddr (c-state-pp-to-literal pos npos)))) 2149 (setq lit (car (cddr (c-state-pp-to-literal pos npos))))
2148 (cond 2150 (or (null lit)
2149 ((null lit) 2151 (prog1 (<= (cdr lit) here)
2150 (setq pos npos) 2152 (setq npos (cdr lit)))))
2151 t)
2152 ((<= (cdr lit) here)
2153 (setq pos (cdr lit))
2154 t)
2155 (t
2156 (setq pos (car lit))
2157 nil))))
2158 2153
2159 (goto-char pos) 2154 ;; Test for being in a macro.
2160 (when (and (c-beginning-of-macro) (/= (point) pos)) 2155 (progn
2161 (setq macro-beg (point)) 2156 (goto-char npos)
2162 (c-syntactic-end-of-macro) 2157 (setq macro-beg
2163 (or (eobp) (forward-char)) 2158 (and (c-beginning-of-macro) (/= (point) npos) (point)))
2164 (setq pos (if (<= (point) here) 2159 (when macro-beg
2165 (point) 2160 (c-syntactic-end-of-macro)
2166 macro-beg))) 2161 (or (eobp) (forward-char))
2167 (setq c-state-nonlit-pos-cache (cons pos c-state-nonlit-pos-cache))) 2162 (setq macro-end (point)))
2163 (or (null macro-beg)
2164 (prog1 (<= macro-end here)
2165 (setq npos macro-end)))))
2166
2167 (setq pos npos)
2168 (setq c-state-nonlit-pos-cache (cons pos c-state-nonlit-pos-cache)))
2168 2169
2169 (if (> pos c-state-nonlit-pos-cache-limit) 2170 (if (> pos c-state-nonlit-pos-cache-limit)
2170 (setq c-state-nonlit-pos-cache-limit pos)) 2171 (setq c-state-nonlit-pos-cache-limit pos))
diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el
index 374c9b434d1..2eb00e72a76 100644
--- a/lisp/progmodes/cc-mode.el
+++ b/lisp/progmodes/cc-mode.el
@@ -1114,7 +1114,7 @@ Note that the style variables are always made local to the buffer."
1114 (goto-char (c-point 'bol new-pos)) 1114 (goto-char (c-point 'bol new-pos))
1115 (when lit-limits ; Comment or string. 1115 (when lit-limits ; Comment or string.
1116 (goto-char (car lit-limits))) 1116 (goto-char (car lit-limits)))
1117 (setq bod-lim (max (- (point) 500) (point-min))) 1117 (setq bod-lim (c-determine-limit 500))
1118 1118
1119 (while 1119 (while
1120 ;; Go to a less nested declaration each time round this loop. 1120 ;; Go to a less nested declaration each time round this loop.
@@ -1132,11 +1132,12 @@ Note that the style variables are always made local to the buffer."
1132 ;; Try and go out a level to search again. 1132 ;; Try and go out a level to search again.
1133 (progn 1133 (progn
1134 (c-backward-syntactic-ws bod-lim) 1134 (c-backward-syntactic-ws bod-lim)
1135 (or (memq (char-before) '(?\( ?\[)) 1135 (and (> (point) bod-lim)
1136 (and (eq (char-before) ?\<) 1136 (or (memq (char-before) '(?\( ?\[))
1137 (eq (c-get-char-property 1137 (and (eq (char-before) ?\<)
1138 (1- (point)) 'syntax-table) 1138 (eq (c-get-char-property
1139 c-<-as-paren-syntax)))) 1139 (1- (point)) 'syntax-table)
1140 c-<-as-paren-syntax)))))
1140 (not (bobp))) 1141 (not (bobp)))
1141 (backward-char)) 1142 (backward-char))
1142 new-pos)) ; back over (, [, <. 1143 new-pos)) ; back over (, [, <.
diff --git a/lisp/progmodes/cc-vars.el b/lisp/progmodes/cc-vars.el
index 8efe3f27002..5201e4a26ed 100644
--- a/lisp/progmodes/cc-vars.el
+++ b/lisp/progmodes/cc-vars.el
@@ -349,6 +349,7 @@ Its value is one of:
349 go-outward -- Nested functions are also recognized. Should a function 349 go-outward -- Nested functions are also recognized. Should a function
350 command hit the beginning/end of a nested scope, it will 350 command hit the beginning/end of a nested scope, it will
351 carry on at the less nested level." 351 carry on at the less nested level."
352 :version "24.1"
352 :type '(radio 353 :type '(radio
353 (const :tag "Functions are at the top-level" t) 354 (const :tag "Functions are at the top-level" t)
354 (const :tag "Functions are also recognized inside declaration scopes" go-outward)) 355 (const :tag "Functions are also recognized inside declaration scopes" go-outward))
diff --git a/lisp/progmodes/prolog.el b/lisp/progmodes/prolog.el
index b531fc0dc9c..bb72984a00b 100644
--- a/lisp/progmodes/prolog.el
+++ b/lisp/progmodes/prolog.el
@@ -329,7 +329,7 @@
329;; General configuration 329;; General configuration
330 330
331(defcustom prolog-system nil 331(defcustom prolog-system nil
332 "*Prolog interpreter/compiler used. 332 "Prolog interpreter/compiler used.
333The value of this variable is nil or a symbol. 333The value of this variable is nil or a symbol.
334If it is a symbol, it determines default values of other configuration 334If it is a symbol, it determines default values of other configuration
335variables with respect to properties of the specified Prolog 335variables with respect to properties of the specified Prolog
@@ -341,6 +341,7 @@ mercury - Mercury
341sicstus - SICStus Prolog 341sicstus - SICStus Prolog
342swi - SWI Prolog 342swi - SWI Prolog
343gnu - GNU Prolog" 343gnu - GNU Prolog"
344 :version "24.1"
344 :group 'prolog 345 :group 'prolog
345 :type '(choice (const :tag "SICStus" :value sicstus) 346 :type '(choice (const :tag "SICStus" :value sicstus)
346 (const :tag "SWI Prolog" :value swi) 347 (const :tag "SWI Prolog" :value swi)
@@ -361,63 +362,74 @@ gnu - GNU Prolog"
361 (eclipse (3 . 7)) 362 (eclipse (3 . 7))
362 (gnu (0 . 0))) 363 (gnu (0 . 0)))
363 ;; FIXME: This should be auto-detected instead of user-provided. 364 ;; FIXME: This should be auto-detected instead of user-provided.
364 "*Alist of Prolog system versions. 365 "Alist of Prolog system versions.
365The version numbers are of the format (Major . Minor)." 366The version numbers are of the format (Major . Minor)."
367 :version "24.1"
368 :type '(repeat (list (symbol :tag "System")
369 (cons :tag "Version numbers" (integer :tag "Major")
370 (integer :tag "Minor"))))
366 :group 'prolog) 371 :group 'prolog)
367 372
368;; Indentation 373;; Indentation
369 374
370(defcustom prolog-indent-width 4 375(defcustom prolog-indent-width 4
371 "*The indentation width used by the editing buffer." 376 "The indentation width used by the editing buffer."
372 :group 'prolog-indentation 377 :group 'prolog-indentation
373 :type 'integer) 378 :type 'integer)
374 379
375(defcustom prolog-align-comments-flag t 380(defcustom prolog-align-comments-flag t
376 "*Non-nil means automatically align comments when indenting." 381 "Non-nil means automatically align comments when indenting."
382 :version "24.1"
377 :group 'prolog-indentation 383 :group 'prolog-indentation
378 :type 'boolean) 384 :type 'boolean)
379 385
380(defcustom prolog-indent-mline-comments-flag t 386(defcustom prolog-indent-mline-comments-flag t
381 "*Non-nil means indent contents of /* */ comments. 387 "Non-nil means indent contents of /* */ comments.
382Otherwise leave such lines as they are." 388Otherwise leave such lines as they are."
389 :version "24.1"
383 :group 'prolog-indentation 390 :group 'prolog-indentation
384 :type 'boolean) 391 :type 'boolean)
385 392
386(defcustom prolog-object-end-to-0-flag t 393(defcustom prolog-object-end-to-0-flag t
387 "*Non-nil means indent closing '}' in SICStus object definitions to level 0. 394 "Non-nil means indent closing '}' in SICStus object definitions to level 0.
388Otherwise indent to `prolog-indent-width'." 395Otherwise indent to `prolog-indent-width'."
396 :version "24.1"
389 :group 'prolog-indentation 397 :group 'prolog-indentation
390 :type 'boolean) 398 :type 'boolean)
391 399
392(defcustom prolog-left-indent-regexp "\\(;\\|\\*?->\\)" 400(defcustom prolog-left-indent-regexp "\\(;\\|\\*?->\\)"
393 "*Regexp for character sequences after which next line is indented. 401 "Regexp for character sequences after which next line is indented.
394Next line after such a regexp is indented to the opening parenthesis level." 402Next line after such a regexp is indented to the opening parenthesis level."
403 :version "24.1"
395 :group 'prolog-indentation 404 :group 'prolog-indentation
396 :type 'regexp) 405 :type 'regexp)
397 406
398(defcustom prolog-paren-indent-p nil 407(defcustom prolog-paren-indent-p nil
399 "*If non-nil, increase indentation for parenthesis expressions. 408 "If non-nil, increase indentation for parenthesis expressions.
400The second and subsequent line in a parenthesis expression other than 409The second and subsequent line in a parenthesis expression other than
401a compound term can either be indented `prolog-paren-indent' to the 410a compound term can either be indented `prolog-paren-indent' to the
402right (if this variable is non-nil) or in the same way as for compound 411right (if this variable is non-nil) or in the same way as for compound
403terms (if this variable is nil, default)." 412terms (if this variable is nil, default)."
413 :version "24.1"
404 :group 'prolog-indentation 414 :group 'prolog-indentation
405 :type 'boolean) 415 :type 'boolean)
406 416
407(defcustom prolog-paren-indent 4 417(defcustom prolog-paren-indent 4
408 "*The indentation increase for parenthesis expressions. 418 "The indentation increase for parenthesis expressions.
409Only used in ( If -> Then ; Else) and ( Disj1 ; Disj2 ) style expressions." 419Only used in ( If -> Then ; Else) and ( Disj1 ; Disj2 ) style expressions."
420 :version "24.1"
410 :group 'prolog-indentation 421 :group 'prolog-indentation
411 :type 'integer) 422 :type 'integer)
412 423
413(defcustom prolog-parse-mode 'beg-of-clause 424(defcustom prolog-parse-mode 'beg-of-clause
414 "*The parse mode used (decides from which point parsing is done). 425 "The parse mode used (decides from which point parsing is done).
415Legal values: 426Legal values:
416'beg-of-line - starts parsing at the beginning of a line, unless the 427'beg-of-line - starts parsing at the beginning of a line, unless the
417 previous line ends with a backslash. Fast, but has 428 previous line ends with a backslash. Fast, but has
418 problems detecting multiline /* */ comments. 429 problems detecting multiline /* */ comments.
419'beg-of-clause - starts parsing at the beginning of the current clause. 430'beg-of-clause - starts parsing at the beginning of the current clause.
420 Slow, but copes better with /* */ comments." 431 Slow, but copes better with /* */ comments."
432 :version "24.1"
421 :group 'prolog-indentation 433 :group 'prolog-indentation
422 :type '(choice (const :value beg-of-line) 434 :type '(choice (const :value beg-of-line)
423 (const :value beg-of-clause))) 435 (const :value beg-of-clause)))
@@ -447,7 +459,8 @@ Legal values:
447 (t 459 (t
448 ;; FIXME: Shouldn't we just use the union of all the above here? 460 ;; FIXME: Shouldn't we just use the union of all the above here?
449 ("dynamic" "module"))) 461 ("dynamic" "module")))
450 "*Alist of Prolog keywords which is used for font locking of directives." 462 "Alist of Prolog keywords which is used for font locking of directives."
463 :version "24.1"
451 :group 'prolog-font-lock 464 :group 'prolog-font-lock
452 :type 'sexp) 465 :type 'sexp)
453 466
@@ -455,7 +468,8 @@ Legal values:
455 '((mercury 468 '((mercury
456 ("char" "float" "int" "io__state" "string" "univ")) 469 ("char" "float" "int" "io__state" "string" "univ"))
457 (t nil)) 470 (t nil))
458 "*Alist of Prolog types used by font locking." 471 "Alist of Prolog types used by font locking."
472 :version "24.1"
459 :group 'prolog-font-lock 473 :group 'prolog-font-lock
460 :type 'sexp) 474 :type 'sexp)
461 475
@@ -463,7 +477,8 @@ Legal values:
463 '((mercury 477 '((mercury
464 ("bound" "di" "free" "ground" "in" "mdi" "mui" "muo" "out" "ui" "uo")) 478 ("bound" "di" "free" "ground" "in" "mdi" "mui" "muo" "out" "ui" "uo"))
465 (t nil)) 479 (t nil))
466 "*Alist of Prolog mode specificators used by font locking." 480 "Alist of Prolog mode specificators used by font locking."
481 :version "24.1"
467 :group 'prolog-font-lock 482 :group 'prolog-font-lock
468 :type 'sexp) 483 :type 'sexp)
469 484
@@ -472,7 +487,8 @@ Legal values:
472 ("cc_multi" "cc_nondet" "det" "erroneous" "failure" "multi" "nondet" 487 ("cc_multi" "cc_nondet" "det" "erroneous" "failure" "multi" "nondet"
473 "semidet")) 488 "semidet"))
474 (t nil)) 489 (t nil))
475 "*Alist of Prolog determinism specificators used by font locking." 490 "Alist of Prolog determinism specificators used by font locking."
491 :version "24.1"
476 :group 'prolog-font-lock 492 :group 'prolog-font-lock
477 :type 'sexp) 493 :type 'sexp)
478 494
@@ -480,7 +496,8 @@ Legal values:
480 '((mercury 496 '((mercury
481 ("^#[0-9]+")) 497 ("^#[0-9]+"))
482 (t nil)) 498 (t nil))
483 "*Alist of Prolog source code directives used by font locking." 499 "Alist of Prolog source code directives used by font locking."
500 :version "24.1"
484 :group 'prolog-font-lock 501 :group 'prolog-font-lock
485 :type 'sexp) 502 :type 'sexp)
486 503
@@ -488,17 +505,19 @@ Legal values:
488;; Keyboard 505;; Keyboard
489 506
490(defcustom prolog-electric-newline-flag (not (fboundp 'electric-indent-mode)) 507(defcustom prolog-electric-newline-flag (not (fboundp 'electric-indent-mode))
491 "*Non-nil means automatically indent the next line when the user types RET." 508 "Non-nil means automatically indent the next line when the user types RET."
509 :version "24.1"
492 :group 'prolog-keyboard 510 :group 'prolog-keyboard
493 :type 'boolean) 511 :type 'boolean)
494 512
495(defcustom prolog-hungry-delete-key-flag nil 513(defcustom prolog-hungry-delete-key-flag nil
496 "*Non-nil means delete key consumes all preceding spaces." 514 "Non-nil means delete key consumes all preceding spaces."
515 :version "24.1"
497 :group 'prolog-keyboard 516 :group 'prolog-keyboard
498 :type 'boolean) 517 :type 'boolean)
499 518
500(defcustom prolog-electric-dot-flag nil 519(defcustom prolog-electric-dot-flag nil
501 "*Non-nil means make dot key electric. 520 "Non-nil means make dot key electric.
502Electric dot appends newline or inserts head of a new clause. 521Electric dot appends newline or inserts head of a new clause.
503If dot is pressed at the end of a line where at least one white space 522If dot is pressed at the end of a line where at least one white space
504precedes the point, it inserts a recursive call to the current predicate. 523precedes the point, it inserts a recursive call to the current predicate.
@@ -506,53 +525,61 @@ If dot is pressed at the beginning of an empty line, it inserts the head
506of a new clause for the current predicate. It does not apply in strings 525of a new clause for the current predicate. It does not apply in strings
507and comments. 526and comments.
508It does not apply in strings and comments." 527It does not apply in strings and comments."
528 :version "24.1"
509 :group 'prolog-keyboard 529 :group 'prolog-keyboard
510 :type 'boolean) 530 :type 'boolean)
511 531
512(defcustom prolog-electric-dot-full-predicate-template nil 532(defcustom prolog-electric-dot-full-predicate-template nil
513 "*If nil, electric dot inserts only the current predicate's name and `(' 533 "If nil, electric dot inserts only the current predicate's name and `('
514for recursive calls or new clause heads. Non-nil means to also 534for recursive calls or new clause heads. Non-nil means to also
515insert enough commas to cover the predicate's arity and `)', 535insert enough commas to cover the predicate's arity and `)',
516and dot and newline for recursive calls." 536and dot and newline for recursive calls."
537 :version "24.1"
517 :group 'prolog-keyboard 538 :group 'prolog-keyboard
518 :type 'boolean) 539 :type 'boolean)
519 540
520(defcustom prolog-electric-underscore-flag nil 541(defcustom prolog-electric-underscore-flag nil
521 "*Non-nil means make underscore key electric. 542 "Non-nil means make underscore key electric.
522Electric underscore replaces the current variable with underscore. 543Electric underscore replaces the current variable with underscore.
523If underscore is pressed not on a variable then it behaves as usual." 544If underscore is pressed not on a variable then it behaves as usual."
545 :version "24.1"
524 :group 'prolog-keyboard 546 :group 'prolog-keyboard
525 :type 'boolean) 547 :type 'boolean)
526 548
527(defcustom prolog-electric-tab-flag nil 549(defcustom prolog-electric-tab-flag nil
528 "*Non-nil means make TAB key electric. 550 "Non-nil means make TAB key electric.
529Electric TAB inserts spaces after parentheses, ->, and ; 551Electric TAB inserts spaces after parentheses, ->, and ;
530in ( If -> Then ; Else) and ( Disj1 ; Disj2 ) style expressions." 552in ( If -> Then ; Else) and ( Disj1 ; Disj2 ) style expressions."
553 :version "24.1"
531 :group 'prolog-keyboard 554 :group 'prolog-keyboard
532 :type 'boolean) 555 :type 'boolean)
533 556
534(defcustom prolog-electric-if-then-else-flag nil 557(defcustom prolog-electric-if-then-else-flag nil
535 "*Non-nil makes `(', `>' and `;' electric 558 "Non-nil makes `(', `>' and `;' electric
536to automatically indent if-then-else constructs." 559to automatically indent if-then-else constructs."
560 :version "24.1"
537 :group 'prolog-keyboard 561 :group 'prolog-keyboard
538 :type 'boolean) 562 :type 'boolean)
539 563
540(defcustom prolog-electric-colon-flag nil 564(defcustom prolog-electric-colon-flag nil
541 "*Makes `:' electric (inserts `:-' on a new line). 565 "Makes `:' electric (inserts `:-' on a new line).
542If non-nil, pressing `:' at the end of a line that starts in 566If non-nil, pressing `:' at the end of a line that starts in
543the first column (i.e., clause heads) inserts ` :-' and newline." 567the first column (i.e., clause heads) inserts ` :-' and newline."
568 :version "24.1"
544 :group 'prolog-keyboard 569 :group 'prolog-keyboard
545 :type 'boolean) 570 :type 'boolean)
546 571
547(defcustom prolog-electric-dash-flag nil 572(defcustom prolog-electric-dash-flag nil
548 "*Makes `-' electric (inserts a `-->' on a new line). 573 "Makes `-' electric (inserts a `-->' on a new line).
549If non-nil, pressing `-' at the end of a line that starts in 574If non-nil, pressing `-' at the end of a line that starts in
550the first column (i.e., DCG heads) inserts ` -->' and newline." 575the first column (i.e., DCG heads) inserts ` -->' and newline."
576 :version "24.1"
551 :group 'prolog-keyboard 577 :group 'prolog-keyboard
552 :type 'boolean) 578 :type 'boolean)
553 579
554(defcustom prolog-old-sicstus-keys-flag nil 580(defcustom prolog-old-sicstus-keys-flag nil
555 "*Non-nil means old SICStus Prolog mode keybindings are used." 581 "Non-nil means old SICStus Prolog mode keybindings are used."
582 :version "24.1"
556 :group 'prolog-keyboard 583 :group 'prolog-keyboard
557 :type 'boolean) 584 :type 'boolean)
558 585
@@ -570,7 +597,7 @@ the first column (i.e., DCG heads) inserts ` -->' and newline."
570 (not (executable-find (car names)))) 597 (not (executable-find (car names))))
571 (setq names (cdr names))) 598 (setq names (cdr names)))
572 (or (car names) "prolog")))) 599 (or (car names) "prolog"))))
573 "*Alist of program names for invoking an inferior Prolog with `run-prolog'." 600 "Alist of program names for invoking an inferior Prolog with `run-prolog'."
574 :group 'prolog-inferior 601 :group 'prolog-inferior
575 :type 'sexp) 602 :type 'sexp)
576(defun prolog-program-name () 603(defun prolog-program-name ()
@@ -579,7 +606,8 @@ the first column (i.e., DCG heads) inserts ` -->' and newline."
579(defcustom prolog-program-switches 606(defcustom prolog-program-switches
580 '((sicstus ("-i")) 607 '((sicstus ("-i"))
581 (t nil)) 608 (t nil))
582 "*Alist of switches given to inferior Prolog run with `run-prolog'." 609 "Alist of switches given to inferior Prolog run with `run-prolog'."
610 :version "24.1"
583 :group 'prolog-inferior 611 :group 'prolog-inferior
584 :type 'sexp) 612 :type 'sexp)
585(defun prolog-program-switches () 613(defun prolog-program-switches ()
@@ -594,7 +622,7 @@ the first column (i.e., DCG heads) inserts ` -->' and newline."
594 (swi "[%f].") 622 (swi "[%f].")
595 (gnu "[%f].") 623 (gnu "[%f].")
596 (t "reconsult(%f).")) 624 (t "reconsult(%f)."))
597 "*Alist of strings defining predicate for reconsulting. 625 "Alist of strings defining predicate for reconsulting.
598 626
599Some parts of the string are replaced: 627Some parts of the string are replaced:
600`%f' by the name of the consulted file (can be a temporary file) 628`%f' by the name of the consulted file (can be a temporary file)
@@ -616,7 +644,7 @@ Some parts of the string are replaced:
616 "prolog:zap_file(%m,%b,compile)."))) 644 "prolog:zap_file(%m,%b,compile).")))
617 (swi "[%f].") 645 (swi "[%f].")
618 (t "compile(%f).")) 646 (t "compile(%f)."))
619 "*Alist of strings and lists defining predicate for recompilation. 647 "Alist of strings and lists defining predicate for recompilation.
620 648
621Some parts of the string are replaced: 649Some parts of the string are replaced:
622`%f' by the name of the compiled file (can be a temporary file) 650`%f' by the name of the compiled file (can be a temporary file)
@@ -634,7 +662,7 @@ If `prolog-program-name' is nil, it is an argument to the `compile' function."
634 (prolog-find-value-by-system prolog-compile-string)) 662 (prolog-find-value-by-system prolog-compile-string))
635 663
636(defcustom prolog-eof-string "end_of_file.\n" 664(defcustom prolog-eof-string "end_of_file.\n"
637 "*Alist of strings that represent end of file for prolog. 665 "Alist of strings that represent end of file for prolog.
638nil means send actual operating system end of file." 666nil means send actual operating system end of file."
639 :group 'prolog-inferior 667 :group 'prolog-inferior
640 :type 'sexp) 668 :type 'sexp)
@@ -645,7 +673,8 @@ nil means send actual operating system end of file."
645 (swi "^\\(\\[[a-zA-Z]*\\] \\)?[1-9]?[0-9]*[ ]?\\?- \\|^| +") 673 (swi "^\\(\\[[a-zA-Z]*\\] \\)?[1-9]?[0-9]*[ ]?\\?- \\|^| +")
646 (gnu "^| \\?-") 674 (gnu "^| \\?-")
647 (t "^|? *\\?-")) 675 (t "^|? *\\?-"))
648 "*Alist of prompts of the prolog system command line." 676 "Alist of prompts of the prolog system command line."
677 :version "24.1"
649 :group 'prolog-inferior 678 :group 'prolog-inferior
650 :type 'sexp) 679 :type 'sexp)
651(defun prolog-prompt-regexp () 680(defun prolog-prompt-regexp ()
@@ -654,42 +683,48 @@ nil means send actual operating system end of file."
654;; (defcustom prolog-continued-prompt-regexp 683;; (defcustom prolog-continued-prompt-regexp
655;; '((sicstus "^\\(| +\\| +\\)") 684;; '((sicstus "^\\(| +\\| +\\)")
656;; (t "^|: +")) 685;; (t "^|: +"))
657;; "*Alist of regexps matching the prompt when consulting `user'." 686;; "Alist of regexps matching the prompt when consulting `user'."
658;; :group 'prolog-inferior 687;; :group 'prolog-inferior
659;; :type 'sexp) 688;; :type 'sexp)
660 689
661(defcustom prolog-debug-on-string "debug.\n" 690(defcustom prolog-debug-on-string "debug.\n"
662 "*Predicate for enabling debug mode." 691 "Predicate for enabling debug mode."
692 :version "24.1"
663 :group 'prolog-inferior 693 :group 'prolog-inferior
664 :type 'string) 694 :type 'string)
665 695
666(defcustom prolog-debug-off-string "nodebug.\n" 696(defcustom prolog-debug-off-string "nodebug.\n"
667 "*Predicate for disabling debug mode." 697 "Predicate for disabling debug mode."
698 :version "24.1"
668 :group 'prolog-inferior 699 :group 'prolog-inferior
669 :type 'string) 700 :type 'string)
670 701
671(defcustom prolog-trace-on-string "trace.\n" 702(defcustom prolog-trace-on-string "trace.\n"
672 "*Predicate for enabling tracing." 703 "Predicate for enabling tracing."
704 :version "24.1"
673 :group 'prolog-inferior 705 :group 'prolog-inferior
674 :type 'string) 706 :type 'string)
675 707
676(defcustom prolog-trace-off-string "notrace.\n" 708(defcustom prolog-trace-off-string "notrace.\n"
677 "*Predicate for disabling tracing." 709 "Predicate for disabling tracing."
710 :version "24.1"
678 :group 'prolog-inferior 711 :group 'prolog-inferior
679 :type 'string) 712 :type 'string)
680 713
681(defcustom prolog-zip-on-string "zip.\n" 714(defcustom prolog-zip-on-string "zip.\n"
682 "*Predicate for enabling zip mode for SICStus." 715 "Predicate for enabling zip mode for SICStus."
716 :version "24.1"
683 :group 'prolog-inferior 717 :group 'prolog-inferior
684 :type 'string) 718 :type 'string)
685 719
686(defcustom prolog-zip-off-string "nozip.\n" 720(defcustom prolog-zip-off-string "nozip.\n"
687 "*Predicate for disabling zip mode for SICStus." 721 "Predicate for disabling zip mode for SICStus."
722 :version "24.1"
688 :group 'prolog-inferior 723 :group 'prolog-inferior
689 :type 'string) 724 :type 'string)
690 725
691(defcustom prolog-use-standard-consult-compile-method-flag t 726(defcustom prolog-use-standard-consult-compile-method-flag t
692 "*Non-nil means use the standard compilation method. 727 "Non-nil means use the standard compilation method.
693Otherwise the new compilation method will be used. This 728Otherwise the new compilation method will be used. This
694utilizes a special compilation buffer with the associated 729utilizes a special compilation buffer with the associated
695features such as parsing of error messages and automatically 730features such as parsing of error messages and automatically
@@ -698,6 +733,7 @@ jumping to the source code responsible for the error.
698Warning: the new method is so far only experimental and 733Warning: the new method is so far only experimental and
699does contain bugs. The recommended setting for the novice user 734does contain bugs. The recommended setting for the novice user
700is non-nil for this variable." 735is non-nil for this variable."
736 :version "24.1"
701 :group 'prolog-inferior 737 :group 'prolog-inferior
702 :type 'boolean) 738 :type 'boolean)
703 739
@@ -706,41 +742,48 @@ is non-nil for this variable."
706 742
707(defcustom prolog-use-prolog-tokenizer-flag 743(defcustom prolog-use-prolog-tokenizer-flag
708 (not (fboundp 'syntax-propertize-rules)) 744 (not (fboundp 'syntax-propertize-rules))
709 "*Non-nil means use the internal prolog tokenizer for indentation etc. 745 "Non-nil means use the internal prolog tokenizer for indentation etc.
710Otherwise use `parse-partial-sexp' which is faster but sometimes incorrect." 746Otherwise use `parse-partial-sexp' which is faster but sometimes incorrect."
747 :version "24.1"
711 :group 'prolog-other 748 :group 'prolog-other
712 :type 'boolean) 749 :type 'boolean)
713 750
714(defcustom prolog-imenu-flag t 751(defcustom prolog-imenu-flag t
715 "*Non-nil means add a clause index menu for all prolog files." 752 "Non-nil means add a clause index menu for all prolog files."
753 :version "24.1"
716 :group 'prolog-other 754 :group 'prolog-other
717 :type 'boolean) 755 :type 'boolean)
718 756
719(defcustom prolog-imenu-max-lines 3000 757(defcustom prolog-imenu-max-lines 3000
720 "*The maximum number of lines of the file for imenu to be enabled. 758 "The maximum number of lines of the file for imenu to be enabled.
721Relevant only when `prolog-imenu-flag' is non-nil." 759Relevant only when `prolog-imenu-flag' is non-nil."
760 :version "24.1"
722 :group 'prolog-other 761 :group 'prolog-other
723 :type 'integer) 762 :type 'integer)
724 763
725(defcustom prolog-info-predicate-index 764(defcustom prolog-info-predicate-index
726 "(sicstus)Predicate Index" 765 "(sicstus)Predicate Index"
727 "*The info node for the SICStus predicate index." 766 "The info node for the SICStus predicate index."
767 :version "24.1"
728 :group 'prolog-other 768 :group 'prolog-other
729 :type 'string) 769 :type 'string)
730 770
731(defcustom prolog-underscore-wordchar-flag nil 771(defcustom prolog-underscore-wordchar-flag nil
732 "*Non-nil means underscore (_) is a word-constituent character." 772 "Non-nil means underscore (_) is a word-constituent character."
773 :version "24.1"
733 :group 'prolog-other 774 :group 'prolog-other
734 :type 'boolean) 775 :type 'boolean)
735 776
736(defcustom prolog-use-sicstus-sd nil 777(defcustom prolog-use-sicstus-sd nil
737 "*If non-nil, use the source level debugger of SICStus 3#7 and later." 778 "If non-nil, use the source level debugger of SICStus 3#7 and later."
779 :version "24.1"
738 :group 'prolog-other 780 :group 'prolog-other
739 :type 'boolean) 781 :type 'boolean)
740 782
741(defcustom prolog-char-quote-workaround nil 783(defcustom prolog-char-quote-workaround nil
742 "*If non-nil, declare 0 as a quote character to handle 0'<char>. 784 "If non-nil, declare 0 as a quote character to handle 0'<char>.
743This is really kludgy, and unneeded (i.e. obsolete) in Emacs>=24." 785This is really kludgy, and unneeded (i.e. obsolete) in Emacs>=24."
786 :version "24.1"
744 :group 'prolog-other 787 :group 'prolog-other
745 :type 'boolean) 788 :type 'boolean)
746 789
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index 15d98ce48af..3ef872d26eb 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -1004,9 +1004,10 @@ On a comment line, go to end of line."
1004 (error (goto-char pos) (end-of-line))))) 1004 (error (goto-char pos) (end-of-line)))))
1005 ((python-skip-out t s)))) 1005 ((python-skip-out t s))))
1006 (end-of-line)) 1006 (end-of-line))
1007 (unless comment 1007 (and (not comment)
1008 (eq ?\\ (char-before)))) ; Line continued? 1008 (not (eobp))
1009 (end-of-line 2)) ; Try next line. 1009 (eq ?\\ (char-before)))) ; Line continued?
1010 (end-of-line 2)) ; Try next line.
1010 (point)) 1011 (point))
1011 1012
1012(defun python-previous-statement (&optional count) 1013(defun python-previous-statement (&optional count)
diff --git a/lisp/progmodes/sql.el b/lisp/progmodes/sql.el
index f8f62d113e6..f5bfe526aae 100644
--- a/lisp/progmodes/sql.el
+++ b/lisp/progmodes/sql.el
@@ -810,6 +810,7 @@ is changed."
810 810
811This hook is invoked in a buffer once it is ready to accept input 811This hook is invoked in a buffer once it is ready to accept input
812for the first time." 812for the first time."
813 :version "24.1"
813 :type 'hook 814 :type 'hook
814 :group 'SQL) 815 :group 'SQL)
815 816
@@ -824,7 +825,10 @@ for the first time."
824 825
825All products share this list; products should define a regexp to 826All products share this list; products should define a regexp to
826identify additional keywords in a variable defined by 827identify additional keywords in a variable defined by
827the :statement feature.") 828the :statement feature."
829 :version "24.1"
830 :type 'string
831 :group 'SQL)
828 832
829;; Customization for Oracle 833;; Customization for Oracle
830 834
@@ -851,8 +855,12 @@ You will find the file in your Orant\\bin directory."
851 :version "24.1" 855 :version "24.1"
852 :group 'SQL) 856 :group 'SQL)
853 857
854(defcustom sql-oracle-statement-starters (regexp-opt '("declare" "begin" "with")) 858(defcustom sql-oracle-statement-starters
855 "Additional statement starting keywords in Oracle.") 859 (regexp-opt '("declare" "begin" "with"))
860 "Additional statement starting keywords in Oracle."
861 :version "24.1"
862 :type 'string
863 :group 'SQL)
856 864
857(defcustom sql-oracle-scan-on t 865(defcustom sql-oracle-scan-on t
858 "Non-nil if placeholders should be replaced in Oracle SQLi. 866 "Non-nil if placeholders should be replaced in Oracle SQLi.
@@ -867,6 +875,7 @@ You need to issue the following command in SQL*Plus to be safe:
867 SET DEFINE OFF 875 SET DEFINE OFF
868 876
869In older versions of SQL*Plus, this was the SET SCAN OFF command." 877In older versions of SQL*Plus, this was the SET SCAN OFF command."
878 :version "24.1"
870 :type 'boolean 879 :type 'boolean
871 :group 'SQL) 880 :group 'SQL)
872 881
diff --git a/lisp/progmodes/verilog-mode.el b/lisp/progmodes/verilog-mode.el
index f3bac41fb32..73e3cd9980f 100644
--- a/lisp/progmodes/verilog-mode.el
+++ b/lisp/progmodes/verilog-mode.el
@@ -689,6 +689,7 @@ file referenced. If false, this is not supported."
689Set this to \"wire\" if the Verilog code uses \"`default_nettype 689Set this to \"wire\" if the Verilog code uses \"`default_nettype
690none\". Note using `default_nettype none isn't recommended practice; this 690none\". Note using `default_nettype none isn't recommended practice; this
691mode is experimental." 691mode is experimental."
692 :version "24.1"
692 :group 'verilog-mode-actions 693 :group 'verilog-mode-actions
693 :type 'boolean) 694 :type 'boolean)
694(put 'verilog-auto-declare-nettype 'safe-local-variable `stringp) 695(put 'verilog-auto-declare-nettype 'safe-local-variable `stringp)
@@ -696,6 +697,7 @@ mode is experimental."
696(defcustom verilog-auto-wire-type nil 697(defcustom verilog-auto-wire-type nil
697 "*Non-nil specifies the data type to use with `verilog-auto-wire' etc. 698 "*Non-nil specifies the data type to use with `verilog-auto-wire' etc.
698Set this to \"logic\" for SystemVerilog code, or use `verilog-auto-logic'." 699Set this to \"logic\" for SystemVerilog code, or use `verilog-auto-logic'."
700 :version "24.1"
699 :group 'verilog-mode-actions 701 :group 'verilog-mode-actions
700 :type 'boolean) 702 :type 'boolean)
701(put 'verilog-auto-wire-type 'safe-local-variable `stringp) 703(put 'verilog-auto-wire-type 'safe-local-variable `stringp)
@@ -709,6 +711,7 @@ The name of the function or case will be set between the braces."
709 711
710(defcustom verilog-auto-delete-trailing-whitespace nil 712(defcustom verilog-auto-delete-trailing-whitespace nil
711 "*True means to `delete-trailing-whitespace' in `verilog-auto'." 713 "*True means to `delete-trailing-whitespace' in `verilog-auto'."
714 :version "24.1"
712 :group 'verilog-mode-actions 715 :group 'verilog-mode-actions
713 :type 'boolean) 716 :type 'boolean)
714(put 'verilog-auto-delete-trailing-whitespace 'safe-local-variable 'verilog-booleanp) 717(put 'verilog-auto-delete-trailing-whitespace 'safe-local-variable 'verilog-booleanp)
@@ -986,6 +989,7 @@ If nil, all blocking assigned signals are ignored when any
986non-blocking assignment is in the AUTORESET block. This allows 989non-blocking assignment is in the AUTORESET block. This allows
987blocking assignments to be used for temporary values and not have 990blocking assignments to be used for temporary values and not have
988those temporaries reset. See example in `verilog-auto-reset'." 991those temporaries reset. See example in `verilog-auto-reset'."
992 :version "24.1"
989 :type 'boolean 993 :type 'boolean
990 :group 'verilog-mode-auto) 994 :group 'verilog-mode-auto)
991(put 'verilog-auto-reset-blocking-in-non 'safe-local-variable 'verilog-booleanp) 995(put 'verilog-auto-reset-blocking-in-non 'safe-local-variable 'verilog-booleanp)
@@ -1073,6 +1077,7 @@ declared together to remain together. Sorted order reduces
1073changes when declarations are moved around in a file. 1077changes when declarations are moved around in a file.
1074 1078
1075See also `verilog-auto-arg-sort'." 1079See also `verilog-auto-arg-sort'."
1080 :version "24.1"
1076 :group 'verilog-mode-auto 1081 :group 'verilog-mode-auto
1077 :type 'boolean) 1082 :type 'boolean)
1078(put 'verilog-auto-inst-sort 'safe-local-variable 'verilog-booleanp) 1083(put 'verilog-auto-inst-sort 'safe-local-variable 'verilog-booleanp)
@@ -1135,6 +1140,7 @@ See the \\[verilog-faq] for examples on using this."
1135 "*Data type used for the declaration for AUTOTIEOFF. If \"wire\" then 1140 "*Data type used for the declaration for AUTOTIEOFF. If \"wire\" then
1136create a wire, if \"assign\" create an assignment, else the data type for 1141create a wire, if \"assign\" create an assignment, else the data type for
1137variable creation." 1142variable creation."
1143 :version "24.1"
1138 :group 'verilog-mode-auto 1144 :group 'verilog-mode-auto
1139 :type 'string) 1145 :type 'string)
1140(put 'verilog-auto-tieoff-declaration 'safe-local-variable 'stringp) 1146(put 'verilog-auto-tieoff-declaration 'safe-local-variable 'stringp)