diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2010-11-09 15:07:10 -0500 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2010-11-09 15:07:10 -0500 |
commit | d607b96bc2824116a8fe0e5840ce49da7ce4514f (patch) | |
tree | 229a11bba88b67e8961db4d10aa8b3725f3a4873 /lisp/progmodes | |
parent | 27410d0ac3406a341cc90ada064047a7f1ea5209 (diff) | |
parent | c00980655bc15ca019fd6c559c69601be18f2407 (diff) | |
download | emacs-d607b96bc2824116a8fe0e5840ce49da7ce4514f.tar.gz emacs-d607b96bc2824116a8fe0e5840ce49da7ce4514f.tar.bz2 emacs-d607b96bc2824116a8fe0e5840ce49da7ce4514f.zip |
Merge from emacs-23
Diffstat (limited to 'lisp/progmodes')
-rw-r--r-- | lisp/progmodes/python.el | 18 | ||||
-rw-r--r-- | lisp/progmodes/tcl.el | 10 | ||||
-rw-r--r-- | lisp/progmodes/verilog-mode.el | 43 |
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 @@ ;; string delimiters. Fixme: Is there a better way? ;; First avoid a sequence preceded by an odd number of backslashes. (syntax-propertize-rules - (;; (rx (not (any ?\\)) - ;; ?\\ (* (and ?\\ ?\\)) - ;; (group (syntax string-quote)) - ;; (backref 1) - ;; (group (backref 1))) - ;; ĦBackrefs don't work in syntax-propertize-rules! - "[^\\]\\\\\\(\\\\\\\\\\)*\\(?:''\\('\\)\\|\"\"\\(?2:\"\\)\\)" - (2 "\"")) ; dummy - (;; (rx (optional (group (any "uUrR"))) ; prefix gets syntax property - ;; (optional (any "rR")) ; possible second prefix - ;; (group (syntax string-quote)) ; maybe gets property - ;; (backref 2) ; per first quote - ;; (group (backref 2))) ; maybe gets property - ;; ĦBackrefs don't work in syntax-propertize-rules! - "\\([RUru]\\)?[Rr]?\\(?:\\('\\)'\\('\\)\\|\\(?2:\"\\)\"\\(?3:\"\\)\\)" + (;; ĦBackrefs don't work in syntax-propertize-rules! + (concat "\\(?:\\([RUru]\\)[Rr]?\\|^\\|[^\\]\\(?:\\\\.\\)*\\)" ;Prefix. + "\\(?:\\('\\)'\\('\\)\\|\\(?2:\"\\)\"\\(?3:\"\\)\\)") (3 (ignore (python-quote-syntax)))) ;; This doesn't really help. ;;((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: (set (make-local-variable 'dabbrev-abbrev-skip-leading-regexp) "[$!]") (set (make-local-variable 'dabbrev-abbrev-char-regexp) "\\sw\\|\\s_") - ;; This can only be set to t in Emacs 19 and XEmacs. - ;; Emacs 18 and Epoch lose. (set (make-local-variable 'parse-sexp-ignore-comments) t) ;; XEmacs has defun-prompt-regexp, but I don't believe ;; that it works for end-of-defun -- only for ;; beginning-of-defun. (set (make-local-variable 'defun-prompt-regexp) tcl-omit-ws-regexp) - ;; The following doesn't work in Lucid Emacs 19.6, but maybe - ;; it will appear in later versions. (set (make-local-variable 'add-log-current-defun-function) 'tcl-add-log-defun) @@ -1201,11 +1197,7 @@ semicolon, opening brace, or opening bracket on the same line." "Determine if point is in a comment. Returns a list of the form `(FLAG . STATE)'. STATE can be used as input to future invocations. FLAG is nil if not in comment, -t otherwise. If in comment, leaves point at beginning of comment. - -This function does not work in Emacs 18. -See also `tcl-simple-scan-for-comment', a -simpler version that is often right, and works in Emacs 18." +t otherwise. If in comment, leaves point at beginning of comment." (let ((bol (save-excursion (goto-char end) (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 @@ ;;; Code: ;; This variable will always hold the version number of the mode -(defconst verilog-mode-version "647" +(defconst verilog-mode-version "650" "Version of this Verilog mode.") -(defconst verilog-mode-release-date "2010-10-20-GNU" +(defconst verilog-mode-release-date "2010-11-05-GNU" "Release date of this Verilog mode.") (defconst verilog-mode-release-emacs t "If non-nil, this version of Verilog mode was released with Emacs itself.") @@ -4551,16 +4551,18 @@ FILENAME or defaults to `buffer-file-name`." default nil nil 'verilog-preprocess-history default))))) (unless command (setq command (verilog-expand-command verilog-preprocessor))) - (let* ((dir (file-name-directory (or filename buffer-file-name))) + (let* ((fontlocked (and (boundp 'font-lock-mode) font-lock-mode)) + (dir (file-name-directory (or filename buffer-file-name))) (file (file-name-nondirectory (or filename buffer-file-name))) (cmd (concat "cd " dir "; " command " " file))) (with-output-to-temp-buffer "*Verilog-Preprocessed*" - (save-excursion - (set-buffer "*Verilog-Preprocessed*") + (with-current-buffer (get-buffer "*Verilog-Preprocessed*") (insert (concat "// " cmd "\n")) (shell-command cmd "*Verilog-Preprocessed*") (verilog-mode) - (font-lock-mode))))) + ;; Without this force, it takes a few idle seconds + ;; to get the color, which is very jarring + (when fontlocked (font-lock-fontify-buffer)))))) ;; @@ -7266,7 +7268,10 @@ Return a array of [outputs inouts inputs wire reg assign const]." ((looking-at "\\s-*\\(\\[[^]]+\\]\\)") (goto-char (match-end 0)) (cond (newsig ; Memory, not just width. Patch last signal added's memory (nth 3) - (setcar (cdr (cdr (cdr newsig))) (match-string 1))) + (setcar (cdr (cdr (cdr newsig))) + (if (verilog-sig-memory newsig) + (concat (verilog-sig-memory newsig) (match-string 1)) + (match-string 1)))) (vec ;; Multidimensional (setq multidim (cons vec multidim)) (setq vec (verilog-string-replace-matches @@ -7404,7 +7409,9 @@ Return a array of [outputs inouts inputs wire reg assign const]." (cons (verilog-sig-new sig (if dotname (verilog-sig-bits portdata) vec) - (concat "To/From " comment) nil nil + (concat "To/From " comment) + (verilog-sig-memory portdata) + nil (verilog-sig-signed portdata) (verilog-sig-type portdata) multidim nil) @@ -7415,7 +7422,9 @@ Return a array of [outputs inouts inputs wire reg assign const]." (cons (verilog-sig-new sig (if dotname (verilog-sig-bits portdata) vec) - (concat "From " comment) nil nil + (concat "From " comment) + (verilog-sig-memory portdata) + nil (verilog-sig-signed portdata) (verilog-sig-type portdata) multidim nil) @@ -7426,7 +7435,9 @@ Return a array of [outputs inouts inputs wire reg assign const]." (cons (verilog-sig-new sig (if dotname (verilog-sig-bits portdata) vec) - (concat "To " comment) nil nil + (concat "To " comment) + (verilog-sig-memory portdata) + nil (verilog-sig-signed portdata) (verilog-sig-type portdata) multidim nil) @@ -7436,7 +7447,9 @@ Return a array of [outputs inouts inputs wire reg assign const]." (cons (verilog-sig-new sig (if dotname (verilog-sig-bits portdata) vec) - (concat "To/From " comment) nil nil + (concat "To/From " comment) + (verilog-sig-memory portdata) + nil (verilog-sig-signed portdata) (verilog-sig-type portdata) multidim nil) @@ -7448,7 +7461,9 @@ Return a array of [outputs inouts inputs wire reg assign const]." (cons (verilog-sig-new sig (if dotname (verilog-sig-bits portdata) vec) - (concat "To/From " comment) nil nil + (concat "To/From " comment) + (verilog-sig-memory portdata) + nil (verilog-sig-signed portdata) (verilog-sig-type portdata) multidim nil) @@ -8862,7 +8877,9 @@ with appropriate INDENT-PT indentation." (indent-to (max 24 (+ indent-pt 16))) (unless (= (char-syntax (preceding-char)) ?\ ) (insert " ")) ; Need space between "]name" if indent-to did nothing - (insert (verilog-sig-name sig))) + (insert (verilog-sig-name sig)) + (when (verilog-sig-memory sig) + (insert " " (verilog-sig-memory sig)))) (defun verilog-insert-definition (sigs direction indent-pt v2k &optional dont-sort) "Print out a definition for a list of SIGS of the given DIRECTION, |