aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes
diff options
context:
space:
mode:
authorStefan Monnier2010-11-09 15:07:10 -0500
committerStefan Monnier2010-11-09 15:07:10 -0500
commitd607b96bc2824116a8fe0e5840ce49da7ce4514f (patch)
tree229a11bba88b67e8961db4d10aa8b3725f3a4873 /lisp/progmodes
parent27410d0ac3406a341cc90ada064047a7f1ea5209 (diff)
parentc00980655bc15ca019fd6c559c69601be18f2407 (diff)
downloademacs-d607b96bc2824116a8fe0e5840ce49da7ce4514f.tar.gz
emacs-d607b96bc2824116a8fe0e5840ce49da7ce4514f.zip
Merge from emacs-23
Diffstat (limited to 'lisp/progmodes')
-rw-r--r--lisp/progmodes/python.el18
-rw-r--r--lisp/progmodes/tcl.el10
-rw-r--r--lisp/progmodes/verilog-mode.el43
3 files changed, 34 insertions, 37 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index e72b18afd61..d2bb82e0580 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -171,21 +171,9 @@
171 ;; string delimiters. Fixme: Is there a better way? 171 ;; string delimiters. Fixme: Is there a better way?
172 ;; First avoid a sequence preceded by an odd number of backslashes. 172 ;; First avoid a sequence preceded by an odd number of backslashes.
173 (syntax-propertize-rules 173 (syntax-propertize-rules
174 (;; (rx (not (any ?\\)) 174 (;; ĦBackrefs don't work in syntax-propertize-rules!
175 ;; ?\\ (* (and ?\\ ?\\)) 175 (concat "\\(?:\\([RUru]\\)[Rr]?\\|^\\|[^\\]\\(?:\\\\.\\)*\\)" ;Prefix.
176 ;; (group (syntax string-quote)) 176 "\\(?:\\('\\)'\\('\\)\\|\\(?2:\"\\)\"\\(?3:\"\\)\\)")
177 ;; (backref 1)
178 ;; (group (backref 1)))
179 ;; ĦBackrefs don't work in syntax-propertize-rules!
180 "[^\\]\\\\\\(\\\\\\\\\\)*\\(?:''\\('\\)\\|\"\"\\(?2:\"\\)\\)"
181 (2 "\"")) ; dummy
182 (;; (rx (optional (group (any "uUrR"))) ; prefix gets syntax property
183 ;; (optional (any "rR")) ; possible second prefix
184 ;; (group (syntax string-quote)) ; maybe gets property
185 ;; (backref 2) ; per first quote
186 ;; (group (backref 2))) ; maybe gets property
187 ;; ĦBackrefs don't work in syntax-propertize-rules!
188 "\\([RUru]\\)?[Rr]?\\(?:\\('\\)'\\('\\)\\|\\(?2:\"\\)\"\\(?3:\"\\)\\)"
189 (3 (ignore (python-quote-syntax)))) 177 (3 (ignore (python-quote-syntax))))
190 ;; This doesn't really help. 178 ;; This doesn't really help.
191 ;;((rx (and ?\\ (group ?\n))) (1 " ")) 179 ;;((rx (and ?\\ (group ?\n))) (1 " "))
diff --git a/lisp/progmodes/tcl.el b/lisp/progmodes/tcl.el
index 10fe0e7885e..620d236078b 100644
--- a/lisp/progmodes/tcl.el
+++ b/lisp/progmodes/tcl.el
@@ -607,15 +607,11 @@ Commands:
607 (set (make-local-variable 'dabbrev-abbrev-skip-leading-regexp) "[$!]") 607 (set (make-local-variable 'dabbrev-abbrev-skip-leading-regexp) "[$!]")
608 (set (make-local-variable 'dabbrev-abbrev-char-regexp) "\\sw\\|\\s_") 608 (set (make-local-variable 'dabbrev-abbrev-char-regexp) "\\sw\\|\\s_")
609 609
610 ;; This can only be set to t in Emacs 19 and XEmacs.
611 ;; Emacs 18 and Epoch lose.
612 (set (make-local-variable 'parse-sexp-ignore-comments) t) 610 (set (make-local-variable 'parse-sexp-ignore-comments) t)
613 ;; XEmacs has defun-prompt-regexp, but I don't believe 611 ;; XEmacs has defun-prompt-regexp, but I don't believe
614 ;; that it works for end-of-defun -- only for 612 ;; that it works for end-of-defun -- only for
615 ;; beginning-of-defun. 613 ;; beginning-of-defun.
616 (set (make-local-variable 'defun-prompt-regexp) tcl-omit-ws-regexp) 614 (set (make-local-variable 'defun-prompt-regexp) tcl-omit-ws-regexp)
617 ;; The following doesn't work in Lucid Emacs 19.6, but maybe
618 ;; it will appear in later versions.
619 (set (make-local-variable 'add-log-current-defun-function) 615 (set (make-local-variable 'add-log-current-defun-function)
620 'tcl-add-log-defun) 616 'tcl-add-log-defun)
621 617
@@ -1201,11 +1197,7 @@ semicolon, opening brace, or opening bracket on the same line."
1201 "Determine if point is in a comment. 1197 "Determine if point is in a comment.
1202Returns a list of the form `(FLAG . STATE)'. STATE can be used 1198Returns a list of the form `(FLAG . STATE)'. STATE can be used
1203as input to future invocations. FLAG is nil if not in comment, 1199as input to future invocations. FLAG is nil if not in comment,
1204t otherwise. If in comment, leaves point at beginning of comment. 1200t otherwise. If in comment, leaves point at beginning of comment."
1205
1206This function does not work in Emacs 18.
1207See also `tcl-simple-scan-for-comment', a
1208simpler version that is often right, and works in Emacs 18."
1209 (let ((bol (save-excursion 1201 (let ((bol (save-excursion
1210 (goto-char end) 1202 (goto-char end)
1211 (line-beginning-position))) 1203 (line-beginning-position)))
diff --git a/lisp/progmodes/verilog-mode.el b/lisp/progmodes/verilog-mode.el
index 2bd4021a85f..42527ff60eb 100644
--- a/lisp/progmodes/verilog-mode.el
+++ b/lisp/progmodes/verilog-mode.el
@@ -124,9 +124,9 @@
124;;; Code: 124;;; Code:
125 125
126;; This variable will always hold the version number of the mode 126;; This variable will always hold the version number of the mode
127(defconst verilog-mode-version "647" 127(defconst verilog-mode-version "650"
128 "Version of this Verilog mode.") 128 "Version of this Verilog mode.")
129(defconst verilog-mode-release-date "2010-10-20-GNU" 129(defconst verilog-mode-release-date "2010-11-05-GNU"
130 "Release date of this Verilog mode.") 130 "Release date of this Verilog mode.")
131(defconst verilog-mode-release-emacs t 131(defconst verilog-mode-release-emacs t
132 "If non-nil, this version of Verilog mode was released with Emacs itself.") 132 "If non-nil, this version of Verilog mode was released with Emacs itself.")
@@ -4551,16 +4551,18 @@ FILENAME or defaults to `buffer-file-name`."
4551 default nil nil 4551 default nil nil
4552 'verilog-preprocess-history default))))) 4552 'verilog-preprocess-history default)))))
4553 (unless command (setq command (verilog-expand-command verilog-preprocessor))) 4553 (unless command (setq command (verilog-expand-command verilog-preprocessor)))
4554 (let* ((dir (file-name-directory (or filename buffer-file-name))) 4554 (let* ((fontlocked (and (boundp 'font-lock-mode) font-lock-mode))
4555 (dir (file-name-directory (or filename buffer-file-name)))
4555 (file (file-name-nondirectory (or filename buffer-file-name))) 4556 (file (file-name-nondirectory (or filename buffer-file-name)))
4556 (cmd (concat "cd " dir "; " command " " file))) 4557 (cmd (concat "cd " dir "; " command " " file)))
4557 (with-output-to-temp-buffer "*Verilog-Preprocessed*" 4558 (with-output-to-temp-buffer "*Verilog-Preprocessed*"
4558 (save-excursion 4559 (with-current-buffer (get-buffer "*Verilog-Preprocessed*")
4559 (set-buffer "*Verilog-Preprocessed*")
4560 (insert (concat "// " cmd "\n")) 4560 (insert (concat "// " cmd "\n"))
4561 (shell-command cmd "*Verilog-Preprocessed*") 4561 (shell-command cmd "*Verilog-Preprocessed*")
4562 (verilog-mode) 4562 (verilog-mode)
4563 (font-lock-mode))))) 4563 ;; Without this force, it takes a few idle seconds
4564 ;; to get the color, which is very jarring
4565 (when fontlocked (font-lock-fontify-buffer))))))
4564 4566
4565 4567
4566;; 4568;;
@@ -7266,7 +7268,10 @@ Return a array of [outputs inouts inputs wire reg assign const]."
7266 ((looking-at "\\s-*\\(\\[[^]]+\\]\\)") 7268 ((looking-at "\\s-*\\(\\[[^]]+\\]\\)")
7267 (goto-char (match-end 0)) 7269 (goto-char (match-end 0))
7268 (cond (newsig ; Memory, not just width. Patch last signal added's memory (nth 3) 7270 (cond (newsig ; Memory, not just width. Patch last signal added's memory (nth 3)
7269 (setcar (cdr (cdr (cdr newsig))) (match-string 1))) 7271 (setcar (cdr (cdr (cdr newsig)))
7272 (if (verilog-sig-memory newsig)
7273 (concat (verilog-sig-memory newsig) (match-string 1))
7274 (match-string 1))))
7270 (vec ;; Multidimensional 7275 (vec ;; Multidimensional
7271 (setq multidim (cons vec multidim)) 7276 (setq multidim (cons vec multidim))
7272 (setq vec (verilog-string-replace-matches 7277 (setq vec (verilog-string-replace-matches
@@ -7404,7 +7409,9 @@ Return a array of [outputs inouts inputs wire reg assign const]."
7404 (cons (verilog-sig-new 7409 (cons (verilog-sig-new
7405 sig 7410 sig
7406 (if dotname (verilog-sig-bits portdata) vec) 7411 (if dotname (verilog-sig-bits portdata) vec)
7407 (concat "To/From " comment) nil nil 7412 (concat "To/From " comment)
7413 (verilog-sig-memory portdata)
7414 nil
7408 (verilog-sig-signed portdata) 7415 (verilog-sig-signed portdata)
7409 (verilog-sig-type portdata) 7416 (verilog-sig-type portdata)
7410 multidim nil) 7417 multidim nil)
@@ -7415,7 +7422,9 @@ Return a array of [outputs inouts inputs wire reg assign const]."
7415 (cons (verilog-sig-new 7422 (cons (verilog-sig-new
7416 sig 7423 sig
7417 (if dotname (verilog-sig-bits portdata) vec) 7424 (if dotname (verilog-sig-bits portdata) vec)
7418 (concat "From " comment) nil nil 7425 (concat "From " comment)
7426 (verilog-sig-memory portdata)
7427 nil
7419 (verilog-sig-signed portdata) 7428 (verilog-sig-signed portdata)
7420 (verilog-sig-type portdata) 7429 (verilog-sig-type portdata)
7421 multidim nil) 7430 multidim nil)
@@ -7426,7 +7435,9 @@ Return a array of [outputs inouts inputs wire reg assign const]."
7426 (cons (verilog-sig-new 7435 (cons (verilog-sig-new
7427 sig 7436 sig
7428 (if dotname (verilog-sig-bits portdata) vec) 7437 (if dotname (verilog-sig-bits portdata) vec)
7429 (concat "To " comment) nil nil 7438 (concat "To " comment)
7439 (verilog-sig-memory portdata)
7440 nil
7430 (verilog-sig-signed portdata) 7441 (verilog-sig-signed portdata)
7431 (verilog-sig-type portdata) 7442 (verilog-sig-type portdata)
7432 multidim nil) 7443 multidim nil)
@@ -7436,7 +7447,9 @@ Return a array of [outputs inouts inputs wire reg assign const]."
7436 (cons (verilog-sig-new 7447 (cons (verilog-sig-new
7437 sig 7448 sig
7438 (if dotname (verilog-sig-bits portdata) vec) 7449 (if dotname (verilog-sig-bits portdata) vec)
7439 (concat "To/From " comment) nil nil 7450 (concat "To/From " comment)
7451 (verilog-sig-memory portdata)
7452 nil
7440 (verilog-sig-signed portdata) 7453 (verilog-sig-signed portdata)
7441 (verilog-sig-type portdata) 7454 (verilog-sig-type portdata)
7442 multidim nil) 7455 multidim nil)
@@ -7448,7 +7461,9 @@ Return a array of [outputs inouts inputs wire reg assign const]."
7448 (cons (verilog-sig-new 7461 (cons (verilog-sig-new
7449 sig 7462 sig
7450 (if dotname (verilog-sig-bits portdata) vec) 7463 (if dotname (verilog-sig-bits portdata) vec)
7451 (concat "To/From " comment) nil nil 7464 (concat "To/From " comment)
7465 (verilog-sig-memory portdata)
7466 nil
7452 (verilog-sig-signed portdata) 7467 (verilog-sig-signed portdata)
7453 (verilog-sig-type portdata) 7468 (verilog-sig-type portdata)
7454 multidim nil) 7469 multidim nil)
@@ -8862,7 +8877,9 @@ with appropriate INDENT-PT indentation."
8862 (indent-to (max 24 (+ indent-pt 16))) 8877 (indent-to (max 24 (+ indent-pt 16)))
8863 (unless (= (char-syntax (preceding-char)) ?\ ) 8878 (unless (= (char-syntax (preceding-char)) ?\ )
8864 (insert " ")) ; Need space between "]name" if indent-to did nothing 8879 (insert " ")) ; Need space between "]name" if indent-to did nothing
8865 (insert (verilog-sig-name sig))) 8880 (insert (verilog-sig-name sig))
8881 (when (verilog-sig-memory sig)
8882 (insert " " (verilog-sig-memory sig))))
8866 8883
8867(defun verilog-insert-definition (sigs direction indent-pt v2k &optional dont-sort) 8884(defun verilog-insert-definition (sigs direction indent-pt v2k &optional dont-sort)
8868 "Print out a definition for a list of SIGS of the given DIRECTION, 8885 "Print out a definition for a list of SIGS of the given DIRECTION,