commit abd838ef8bab125f4360b8618ffe742e1e045625 (HEAD, refs/remotes/origin/master) Author: Paul Eggert Date: Sun Aug 16 23:52:30 2015 -0700 Spelling fixes diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index 1ccf5e2..90a140b 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el @@ -4652,7 +4652,7 @@ Argument MIME is non-nil if this is a mime message." (when (and (null decrypts) mime mime-disabled) - ;; Re-enable mime processinjg + ;; Re-enable mime processing. (rmail-mime) ;; Find each Show button and show that part. (while (search-forward " Show " nil t) @@ -4672,7 +4672,7 @@ Argument MIME is non-nil if this is a mime message." (unless decrypts (error "Nothing to decrypt"))))) - + ;;;; Desktop support diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el index 8392df2..6ad803d 100644 --- a/lisp/progmodes/elisp-mode.el +++ b/lisp/progmodes/elisp-mode.el @@ -604,7 +604,7 @@ It can be quoted, or be inside a quoted form." (`apropos (elisp--xref-find-apropos id)))) -;; WORKAROUND: This is nominally a constant, but the text properities +;; WORKAROUND: This is nominally a constant, but the text properties ;; are not preserved thru dump if use defconst. See bug#21237. (defvar elisp--xref-format (let ((str "(%s %s)")) @@ -612,7 +612,7 @@ It can be quoted, or be inside a quoted form." (put-text-property 4 6 'face 'font-lock-function-name-face str) str)) -;; WORKAROUND: This is nominally a constant, but the text properities +;; WORKAROUND: This is nominally a constant, but the text properties ;; are not preserved thru dump if use defconst. See bug#21237. (defvar elisp--xref-format-extra (let ((str "(%s %s %s)")) @@ -693,12 +693,12 @@ otherwise build the summary from TYPE and SYMBOL." ;; specializers. ;; ;; If the default method is declared by the cl-defgeneric - ;; declaration, it will have the same location as teh + ;; declaration, it will have the same location as the ;; cl-defgeneric, so we want to exclude it from the ;; result. In this case, it will have a null doc ;; string. User declarations of default methods may also ;; have null doc strings, but we hope that is - ;; rare. Perhaps this hueristic will discourage that. + ;; rare. Perhaps this heuristic will discourage that. (dolist (method (cl--generic-method-table generic)) (let* ((info (cl--generic-method-info method));; qual-string combined-args doconly (specializers (cl--generic-method-specializers method)) diff --git a/test/automated/elisp-mode-tests.el b/test/automated/elisp-mode-tests.el index 47212e9..64b3f66 100644 --- a/test/automated/elisp-mode-tests.el +++ b/test/automated/elisp-mode-tests.el @@ -117,7 +117,7 @@ ;;; xref (defun xref-elisp-test-descr-to-target (xref) - "Return an appropiate `looking-at' match string for XREF." + "Return an appropriate `looking-at' match string for XREF." (let* ((loc (xref-item-location xref)) (type (or (xref-elisp-location-type loc) 'defun))) @@ -176,11 +176,11 @@ ))) -(defun xref-elisp-test-run (xrefs expecteds) - (should (= (length xrefs) (length expecteds))) +(defun xref-elisp-test-run (xrefs expected-xrefs) + (should (= (length xrefs) (length expected-xrefs))) (while xrefs (let ((xref (pop xrefs)) - (expected (pop expecteds))) + (expected (pop expected-xrefs))) (should (equal xref (or (when (consp expected) (car expected)) expected))) @@ -297,11 +297,11 @@ to (xref-elisp-test-descr-to-target xref)." "non-default for separate-default") (cl-defmethod xref-elisp-generic-implicit-generic () - "doc string implict-generic default" + "doc string implicit-generic default" "default for implicit generic") (cl-defmethod xref-elisp-generic-implicit-generic ((this xref-elisp-root-type)) - "doc string implict-generic xref-elisp-root-type" + "doc string implicit-generic xref-elisp-root-type" "non-default for implicit generic") @@ -460,7 +460,7 @@ to (xref-elisp-test-descr-to-target xref)." ;; for more comments. ;; ;; IMPROVEME: return defvar instead of defun if source near starting -;; point indicates the user is searching for a varible, not a +;; point indicates the user is searching for a variable, not a ;; function. (require 'compile) ;; not loaded by default at test time (xref-elisp-deftest find-defs-defun-defvar-el commit 9a6d63fe2a6f8e46af83beefa48c18a05a47497b Author: Michael Albinus Date: Sun Aug 16 21:06:58 2015 +0200 ; ChangeLog.2: Fix another Tramp commit diff --git a/ChangeLog.2 b/ChangeLog.2 index 446c123..d4b7fd1 100644 --- a/ChangeLog.2 +++ b/ChangeLog.2 @@ -181,7 +181,7 @@ 2015-08-14 Jürgen Hötzel - Flush file properties in Tramp.Jürgen Hötzel + Flush file properties in Tramp * lisp/net/tramp-sh.el (tramp-sh-handle-set-file-modes) (tramp-sh-handle-set-file-times): * lisp/net/tramp-adb.el (tramp-adb-handle-set-file-modes) commit 4fedca4f7bc108e4b4a64006da73a5373ae29141 Author: Michael Albinus Date: Sun Aug 16 21:05:53 2015 +0200 ; ChangeLog.2: Fix author of last Tramp commit diff --git a/ChangeLog.2 b/ChangeLog.2 index 27b4916..446c123 100644 --- a/ChangeLog.2 +++ b/ChangeLog.2 @@ -52,7 +52,7 @@ Remove 'nt/zipdist.bat' (no longer used) * nt/zipdist.bat: Remove - no longer used. -2015-08-15 Michael Albinus +2015-08-15 Jürgen Hötzel * lisp/net/tramp-sh.el (tramp-remote-selinux-p): Use "selinuxenabled" rather than "getenforce". @@ -181,7 +181,7 @@ 2015-08-14 Jürgen Hötzel - Flush file properties in Tramp. + Flush file properties in Tramp.Jürgen Hötzel * lisp/net/tramp-sh.el (tramp-sh-handle-set-file-modes) (tramp-sh-handle-set-file-times): * lisp/net/tramp-adb.el (tramp-adb-handle-set-file-modes) commit 9ce1d38890a77e93af0d20f51c53419c097200d3 Author: Paul Eggert Date: Sun Aug 16 08:59:50 2015 -0700 Use curved quotes in core elisp diagnostics In the core elisp files, use curved quotes in diagnostic formats, so that they follow user preference as per ‘text-quoting-style’ rather than being hard-coded to quote `like this'. * lisp/abbrev.el (expand-region-abbrevs): * lisp/button.el (button-category-symbol, button-put) (make-text-button): * lisp/cus-start.el: * lisp/custom.el (custom-add-dependencies, custom-check-theme) (custom--sort-vars-1, load-theme): * lisp/emacs-lisp/byte-run.el (defun, defsubst): * lisp/emacs-lisp/cl-generic.el (cl-defgeneric) (cl-generic-generalizers): * lisp/emacs-lisp/macroexp.el (macroexp--obsolete-warning): * lisp/emacs-lisp/map-ynp.el (map-y-or-n-p): * lisp/emacs-lisp/nadvice.el (advice--make-docstring) (advice--make, define-advice): * lisp/emacs-lisp/tabulated-list.el (tabulated-list-put-tag): * lisp/emacs-lisp/timer.el (timer-event-handler): * lisp/env.el (setenv): * lisp/facemenu.el (facemenu-add-new-face) (facemenu-add-new-color): * lisp/faces.el (face-documentation, read-face-name) (face-read-string, read-face-font, face-spec-set-match-display) (read-color, x-resolve-font-name): * lisp/files.el (locate-user-emacs-file, find-alternate-file) (set-auto-mode, hack-local-variables) (hack-one-local-variable--obsolete) (dir-locals-set-directory-class, write-file) (basic-save-buffer, delete-directory, copy-directory) (recover-session, recover-session-finish, insert-directory) (file-modes-char-to-who, file-modes-symbolic-to-number) (move-file-to-trash): * lisp/font-lock.el (font-lock-fontify-buffer): * lisp/format.el (format-write-file, format-find-file) (format-insert-file): * lisp/frame.el (get-device-terminal, select-frame-by-name): * lisp/fringe.el (fringe--check-style): * lisp/help.el (describe-minor-mode-from-indicator): * lisp/image.el (image-type): * lisp/international/fontset.el (x-must-resolve-font-name): * lisp/international/mule-cmds.el (prefer-coding-system) (select-safe-coding-system-interactively) (select-safe-coding-system, activate-input-method) (toggle-input-method, describe-current-input-method): * lisp/international/mule-conf.el (code-offset): * lisp/mouse.el (minor-mode-menu-from-indicator): * lisp/replace.el (query-replace-read-from) (occur-after-change-function, occur-1): * lisp/scroll-bar.el (scroll-bar-columns): * lisp/simple.el (execute-extended-command) (undo-outer-limit-truncate, compose-mail, set-variable) (choose-completion-string, define-alternatives): * lisp/startup.el (site-run-file, tty-handle-args, ) (command-line, command-line-1): * lisp/subr.el (noreturn, define-error, add-to-list) (read-char-choice): * lisp/term/common-win.el (x-handle-xrm-switch) (x-handle-name-switch, x-handle-args): * lisp/term/x-win.el (x-handle-parent-id, x-handle-smid): Use curved quotes in diagnostics. * lisp/international/mule.el (find-auto-coding): Use " to quote in a diagnostic, to be consistent with the rest of this file. diff --git a/lisp/abbrev.el b/lisp/abbrev.el index f9f078b..02b9fd7 100644 --- a/lisp/abbrev.el +++ b/lisp/abbrev.el @@ -399,7 +399,7 @@ A prefix argument means don't query; expand all abbrevs." (buffer-substring-no-properties (save-excursion (forward-word -1) (point)) pnt))) - (if (or noquery (y-or-n-p (format "Expand `%s'? " string))) + (if (or noquery (y-or-n-p (format "Expand ‘%s’? " string))) (expand-abbrev))))))) ;;; Abbrev properties. diff --git a/lisp/button.el b/lisp/button.el index e7602dd..5fe5bf0 100644 --- a/lisp/button.el +++ b/lisp/button.el @@ -114,7 +114,7 @@ Mode-specific keymaps may want to use this as their parent keymap.") "Return the symbol used by button-type TYPE to store properties. Buttons inherit them by setting their `category' property to that symbol." (or (get type 'button-category-symbol) - (error "Unknown button type `%s'" type))) + (error "Unknown button type ‘%s’" type))) (defun define-button-type (name &rest properties) "Define a `button type' called NAME (a symbol). @@ -208,7 +208,7 @@ changes to a supertype are not reflected in its subtypes)." (setq val (button-category-symbol val))) ((eq prop 'category) ;; Disallow updating the `category' property directly. - (error "Button `category' property may not be set directly"))) + (error "Button ‘category’ property may not be set directly"))) ;; Add the property. (cond ((overlayp button) (overlay-put button prop val)) @@ -333,7 +333,7 @@ Also see `insert-text-button'." (setq object beg beg 0 end (length object))) ;; Disallow setting the `category' property directly. (when (plist-get properties 'category) - (error "Button `category' property may not be set directly")) + (error "Button ‘category’ property may not be set directly")) (if (null type-entry) ;; The user didn't specify a `type' property, use the default. (setq properties (cons 'category (cons 'default-button properties))) diff --git a/lisp/cus-start.el b/lisp/cus-start.el index 7a37198..daa95d1 100644 --- a/lisp/cus-start.el +++ b/lisp/cus-start.el @@ -637,7 +637,7 @@ since it could result in memory overflow and make Emacs crash." (if (not (boundp symbol)) ;; If variables are removed from C code, give an error here! (and native-p - (message "Note, built-in variable `%S' not bound" symbol)) + (message "Note, built-in variable ‘%S’ not bound" symbol)) ;; Save the standard value, unless we already did. (or (get symbol 'standard-value) (put symbol 'standard-value (list standard))) diff --git a/lisp/custom.el b/lisp/custom.el index ea5ab7a..f2b5d52 100644 --- a/lisp/custom.el +++ b/lisp/custom.el @@ -548,13 +548,13 @@ VALUE should be a list of symbols. For each symbol in that list, this specifies that SYMBOL should be set after the specified symbol, if both appear in constructs like `custom-set-variables'." (unless (listp value) - (error "Invalid custom dependency `%s'" value)) + (error "Invalid custom dependency ‘%s’" value)) (let* ((deps (get symbol 'custom-dependencies)) (new-deps deps)) (while value (let ((dep (car value))) (unless (symbolp dep) - (error "Invalid custom dependency `%s'" dep)) + (error "Invalid custom dependency ‘%s’" dep)) (unless (memq dep new-deps) (setq new-deps (cons dep new-deps))) (setq value (cdr value)))) @@ -830,7 +830,7 @@ to the front of this list.") (defsubst custom-check-theme (theme) "Check whether THEME is valid, and signal an error if it is not." (unless (custom-theme-p theme) - (error "Unknown theme `%s'" theme))) + (error "Unknown theme ‘%s’" theme))) (defun custom-push-theme (prop symbol theme mode &optional value) "Record VALUE for face or variable SYMBOL in custom theme THEME. @@ -1043,7 +1043,7 @@ list, in which A occurs before B if B was defined with a (when elt (cond ((eq (car elt) 'dependant) - (error "Circular custom dependency on `%s'" sym)) + (error "Circular custom dependency on ‘%s’" sym)) ((car elt) (setcar elt 'dependant) (dolist (dep (get sym 'custom-dependencies)) @@ -1201,7 +1201,7 @@ Return t if THEME was successfully loaded, nil otherwise." (custom-available-themes)))) nil nil)) (unless (custom-theme-name-valid-p theme) - (error "Invalid theme name `%s'" theme)) + (error "Invalid theme name ‘%s’" theme)) ;; If THEME is already enabled, re-enable it after loading, even if ;; NO-ENABLE is t. (if no-enable @@ -1217,7 +1217,7 @@ Return t if THEME was successfully loaded, nil otherwise." '("" "c"))) hash) (unless fn - (error "Unable to find theme file for `%s'" theme)) + (error "Unable to find theme file for ‘%s’" theme)) (with-temp-buffer (insert-file-contents fn) (setq hash (secure-hash 'sha256 (current-buffer))) diff --git a/lisp/emacs-lisp/byte-run.el b/lisp/emacs-lisp/byte-run.el index 081ea31..2022e1d 100644 --- a/lisp/emacs-lisp/byte-run.el +++ b/lisp/emacs-lisp/byte-run.el @@ -267,7 +267,7 @@ The return value is undefined. (cdr body) body))) nil) - (t (message "Warning: Unknown defun property `%S' in %S" + (t (message "Warning: Unknown defun property ‘%S’ in %S" (car x) name))))) decls)) (def (list 'defalias @@ -317,7 +317,7 @@ The return value is undefined. (declare (debug defun) (doc-string 3)) (or (memq (get name 'byte-optimizer) '(nil byte-compile-inline-expand)) - (error "`%s' is a primitive" name)) + (error "‘%s’ is a primitive" name)) `(prog1 (defun ,name ,arglist ,@body) (eval-and-compile diff --git a/lisp/emacs-lisp/cl-generic.el b/lisp/emacs-lisp/cl-generic.el index 7ae63b1..cecd737 100644 --- a/lisp/emacs-lisp/cl-generic.el +++ b/lisp/emacs-lisp/cl-generic.el @@ -192,7 +192,7 @@ BODY, if present, is used as the body of a default method. (when doc (error "Multiple doc strings for %S" name)) (setq doc (cadr (pop options-and-methods)))) (`declare - (when declarations (error "Multiple `declare' for %S" name)) + (when declarations (error "Multiple ‘declare’ for %S" name)) (setq declarations (pop options-and-methods))) (`:method (push (cdr (pop options-and-methods)) methods)) (_ (push (pop options-and-methods) options)))) @@ -208,7 +208,7 @@ BODY, if present, is used as the body of a default method. defun-declarations-alist)))) (cond (f (apply (car f) name args (cdr declaration))) - (t (message "Warning: Unknown defun property `%S' in %S" + (t (message "Warning: Unknown defun property ‘%S’ in %S" (car declaration) name) nil)))) (cdr declarations)) @@ -1070,7 +1070,7 @@ The value returned is a list of elements of the form (and (assq type cl--generic-typeof-types) (progn (if (memq type '(vector array sequence)) - (message "`%S' also matches CL structs and EIEIO classes" type)) + (message "‘%S’ also matches CL structs and EIEIO classes" type)) (list cl--generic-typeof-generalizer))) (cl-call-next-method))) diff --git a/lisp/emacs-lisp/macroexp.el b/lisp/emacs-lisp/macroexp.el index ffc6585..cc461c8 100644 --- a/lisp/emacs-lisp/macroexp.el +++ b/lisp/emacs-lisp/macroexp.el @@ -146,10 +146,10 @@ and also to avoid outputting the warning during normal execution." (defun macroexp--obsolete-warning (fun obsolescence-data type) (let ((instead (car obsolescence-data)) (asof (nth 2 obsolescence-data))) - (format "`%s' is an obsolete %s%s%s" fun type + (format "‘%s’ is an obsolete %s%s%s" fun type (if asof (concat " (as of " asof ")") "") (cond ((stringp instead) (concat "; " instead)) - (instead (format "; use `%s' instead." instead)) + (instead (format "; use ‘%s’ instead." instead)) (t "."))))) (defun macroexpand-1 (form &optional environment) diff --git a/lisp/emacs-lisp/map-ynp.el b/lisp/emacs-lisp/map-ynp.el index 08b34fb..ceae99b 100644 --- a/lisp/emacs-lisp/map-ynp.el +++ b/lisp/emacs-lisp/map-ynp.el @@ -198,9 +198,9 @@ Returns the number of actions taken." (objects (if help (nth 1 help) "objects")) (action (if help (nth 2 help) "act on"))) (concat - (format "Type SPC or `y' to %s the current %s; -DEL or `n' to skip the current %s; -RET or `q' to give up on the %s (skip all remaining %s); + (format "Type SPC or ‘y’ to %s the current %s; +DEL or ‘n’ to skip the current %s; +RET or ‘q’ to give up on the %s (skip all remaining %s); C-g to quit (cancel the whole command); ! to %s all remaining %s;\n" action object object action objects action diff --git a/lisp/emacs-lisp/nadvice.el b/lisp/emacs-lisp/nadvice.el index 5a59a98..4d5b0c7 100644 --- a/lisp/emacs-lisp/nadvice.el +++ b/lisp/emacs-lisp/nadvice.el @@ -95,7 +95,7 @@ Each element has the form (WHERE BYTECODE STACK) where: (propertize (format "%s advice: " where) 'face 'warning) (let ((fun (advice--car flist))) - (if (symbolp fun) (format "`%S'" fun) + (if (symbolp fun) (format "‘%S’" fun) (let* ((name (cdr (assq 'name (advice--props flist)))) (doc (documentation fun t)) (usage (help-split-fundoc doc function))) @@ -176,7 +176,7 @@ WHERE is a symbol to select an entry in `advice--where-alist'." (advice--make-1 (aref main 1) (aref main 3) (advice--car main) rest (advice--props main))) (let ((desc (assq where advice--where-alist))) - (unless desc (error "Unknown add-function location `%S'" where)) + (unless desc (error "Unknown add-function location ‘%S’" where)) (advice--make-1 (nth 1 desc) (nth 2 desc) function main props))))) @@ -461,7 +461,7 @@ otherwise it is named `SYMBOL@NAME'. (advice (cond ((null name) `(lambda ,lambda-list ,@body)) ((or (stringp name) (symbolp name)) (intern (format "%s@%s" symbol name))) - (t (error "Unrecognized name spec `%S'" name))))) + (t (error "Unrecognized name spec ‘%S’" name))))) `(prog1 ,@(and (symbolp advice) `((defun ,advice ,lambda-list ,@body))) (advice-add ',symbol ,where #',advice ,@(and props `(',props)))))) diff --git a/lisp/emacs-lisp/tabulated-list.el b/lisp/emacs-lisp/tabulated-list.el index cd61eb9..404dbd1 100644 --- a/lisp/emacs-lisp/tabulated-list.el +++ b/lisp/emacs-lisp/tabulated-list.el @@ -129,7 +129,7 @@ no entry at POS. POS, if omitted or nil, defaults to point." TAG should be a string, with length <= `tabulated-list-padding'. If ADVANCE is non-nil, move forward by one line afterwards." (unless (stringp tag) - (error "Invalid argument to `tabulated-list-put-tag'")) + (error "Invalid argument to ‘tabulated-list-put-tag’")) (unless (> tabulated-list-padding 0) (error "Unable to tag the current line")) (save-excursion diff --git a/lisp/emacs-lisp/timer.el b/lisp/emacs-lisp/timer.el index 9ae11b7..dadbe5f 100644 --- a/lisp/emacs-lisp/timer.el +++ b/lisp/emacs-lisp/timer.el @@ -324,7 +324,7 @@ This function is called, by name, directly by the C code." (apply (timer--function timer) (timer--args timer))) (error (message "Error running timer%s: %S" (if (symbolp (timer--function timer)) - (format " `%s'" (timer--function timer)) "") + (format " ‘%s’" (timer--function timer)) "") err))) (when (and retrigger ;; If the timer's been canceled, don't "retrigger" it diff --git a/lisp/env.el b/lisp/env.el index 3966ab1..f50ed12 100644 --- a/lisp/env.el +++ b/lisp/env.el @@ -175,7 +175,7 @@ a side-effect." (let ((codings (find-coding-systems-string (concat variable value)))) (unless (or (eq 'undecided (car codings)) (memq (coding-system-base locale-coding-system) codings)) - (error "Can't encode `%s=%s' with `locale-coding-system'" + (error "Can't encode ‘%s=%s’ with ‘locale-coding-system’" variable (or value ""))))) (and value substitute-env-vars @@ -185,7 +185,7 @@ a side-effect." (if (and value (multibyte-string-p value)) (setq value (encode-coding-string value locale-coding-system))) (if (string-match "=" variable) - (error "Environment variable name `%s' contains `='" variable)) + (error "Environment variable name ‘%s’ contains ‘=’" variable)) (if (string-equal "TZ" variable) (set-time-zone-rule value)) (setq process-environment (setenv-internal process-environment diff --git a/lisp/facemenu.el b/lisp/facemenu.el index 3d58943..6c847f0 100644 --- a/lisp/facemenu.el +++ b/lisp/facemenu.el @@ -797,10 +797,10 @@ This is called whenever you create a new face, and at other times." symbol (intern name))) (setq menu 'facemenu-face-menu) (setq docstring - (purecopy (format "Select face `%s' for subsequent insertion. + (purecopy (format "Select face ‘%s’ for subsequent insertion. If the mark is active and there is no prefix argument, -apply face `%s' to the region instead. -This command was defined by `facemenu-add-new-face'." +apply face ‘%s’ to the region instead. +This command was defined by ‘facemenu-add-new-face’." name name))) (cond ((facemenu-iterate ; check if equivalent face is already in the menu (lambda (m) (and (listp m) @@ -846,12 +846,12 @@ Return the event type (a symbol) of the added menu entry. This is called whenever you use a new color." (let (symbol) (unless (color-defined-p color) - (error "Color `%s' undefined" color)) + (error "Color ‘%s’ undefined" color)) (cond ((eq menu 'facemenu-foreground-menu) (setq symbol (intern (concat "fg:" color)))) ((eq menu 'facemenu-background-menu) (setq symbol (intern (concat "bg:" color)))) - (t (error "MENU should be `facemenu-foreground-menu' or `facemenu-background-menu'"))) + (t (error "MENU should be ‘facemenu-foreground-menu’ or ‘facemenu-background-menu’"))) (unless (facemenu-iterate ; Check if color is already in the menu. (lambda (m) (and (listp m) (eq (car m) symbol))) diff --git a/lisp/faces.el b/lisp/faces.el index 125b14d..15ed699 100644 --- a/lisp/faces.el +++ b/lisp/faces.el @@ -574,7 +574,7 @@ If FACE is a face-alias, get the documentation for the target face." (let ((alias (get face 'face-alias))) (if alias (let ((doc (get alias 'face-documentation))) - (format "%s is an alias for the face `%s'.%s" face alias + (format "%s is an alias for the face ‘%s’.%s" face alias (if doc (format "\n%s" doc) ""))) (get face 'face-documentation)))) @@ -1005,7 +1005,7 @@ a single face name." (setq default (car (split-string default crm-separator t)))) (let ((prompt (if default - (format "%s (default `%s'): " prompt default) + (format "%s (default ‘%s’): " prompt default) (format "%s: " prompt))) aliasfaces nonaliasfaces faces) ;; Build up the completion tables. @@ -1137,9 +1137,9 @@ Value is the new attribute value." (let* ((completion-ignore-case t) (value (completing-read (if default - (format "%s for face `%s' (default %s): " + (format "%s for face ‘%s’ (default %s): " name face default) - (format "%s for face `%s': " name face)) + (format "%s for face ‘%s’: " name face)) completion-alist nil nil nil nil default))) (if (equal value "") default value))) @@ -1224,7 +1224,8 @@ of a global face. Value is the new attribute value." "Read the name of a font for FACE on FRAME. If optional argument FRAME is nil or omitted, use the selected frame." (let ((completion-ignore-case t)) - (completing-read (format "Set font attributes of face `%s' from font: " face) + (completing-read (format "Set font attributes of face ‘%s’ from font: " + face) (append (fontset-list) (x-list-fonts "*" nil frame))))) @@ -1547,7 +1548,7 @@ If FRAME is nil, the current FRAME is used." options)) ((eq req 'supports) (display-supports-face-attributes-p options frame)) - (t (error "Unknown req `%S' with options `%S'" + (t (error "Unknown req ‘%S’ with options ‘%S’" req options))))) match)) @@ -1920,7 +1921,7 @@ resulting color name in the echo area." (logand 65535 (nth 0 components)) (logand 65535 (nth 1 components)) (logand 65535 (nth 2 components)))))))) - (when msg (message "Color: `%s'" color)) + (when msg (message "Color: ‘%s’" color)) color)) (defun face-at-point (&optional thing multiple) @@ -2773,13 +2774,13 @@ also the same size as FACE on FRAME, or fail." (if (string-match-p "\\*" pattern) (if (null (face-font face)) (error "No matching fonts are the same height as the frame default font") - (error "No matching fonts are the same height as face `%s'" face)) + (error "No matching fonts are the same height as face ‘%s’" face)) (if (null (face-font face)) - (error "Height of font `%s' doesn't match the frame default font" + (error "Height of font ‘%s’ doesn't match the frame default font" pattern) - (error "Height of font `%s' doesn't match face `%s'" + (error "Height of font ‘%s’ doesn't match face ‘%s’" pattern face))) - (error "No fonts match `%s'" pattern))) + (error "No fonts match ‘%s’" pattern))) (car fonts)) (cdr (assq 'font (frame-parameters (selected-frame)))))) diff --git a/lisp/files.el b/lisp/files.el index dd0f286..1039267 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -995,10 +995,10 @@ directory if it does not exist." (put 'user-emacs-directory-warning 'this-session t) (display-warning 'initialization (format "\ -Unable to %s `user-emacs-directory' (%s). +Unable to %s ‘user-emacs-directory’ (%s). Any data that would normally be written there may be lost! If you never want to see this message again, -customize the variable `user-emacs-directory-warning'." +customize the variable ‘user-emacs-directory-warning’." errtype user-emacs-directory))))) bestname)))) @@ -1641,7 +1641,7 @@ killed." (user-error "Aborted")) (and (buffer-modified-p) buffer-file-name (not (yes-or-no-p - (format "Kill and replace buffer `%s' without saving it? " + (format "Kill and replace buffer ‘%s’ without saving it? " (buffer-name)))) (user-error "Aborted")) (let ((obuf (current-buffer)) @@ -2789,7 +2789,7 @@ we don't actually set it to the same mode the buffer already has." (catch 'nop (dolist (mode (nreverse modes)) (if (not (functionp mode)) - (message "Ignoring unknown mode `%s'" mode) + (message "Ignoring unknown mode ‘%s’" mode) (setq done t) (or (set-auto-mode-0 mode keep-mode-if-same) ;; continuing would call minor modes again, toggling them off @@ -2803,7 +2803,7 @@ we don't actually set it to the same mode the buffer already has." (setq mode (hack-local-variables t)) (not (memq mode modes)) ; already tried and failed (if (not (functionp mode)) - (message "Ignoring unknown mode `%s'" mode) + (message "Ignoring unknown mode ‘%s’" mode) (setq done t) (set-auto-mode-0 mode keep-mode-if-same))) ;; If we didn't, look for an interpreter specified in the first line. @@ -3419,7 +3419,7 @@ local variables, but directory-local variables may still be applied." (setq hack-local-variables--warned-lexical t) (display-warning :warning - (format "%s: `lexical-binding' at end of file unreliable" + (format "%s: ‘lexical-binding’ at end of file unreliable" (file-name-nondirectory (or buffer-file-name "")))))) (t @@ -3556,7 +3556,7 @@ It is dangerous if either of these conditions are met: var (if since (format " (since %s)" since)) (if (stringp instead) (substitute-command-keys instead) - (format "use `%s' instead" instead))))))) + (format "use ‘%s’ instead" instead))))))) (defun hack-one-local-variable (var val) "Set local variable VAR with value VAL. @@ -3673,7 +3673,7 @@ variables from CLASS are applied to the buffer. The variables for a class are defined using `dir-locals-set-class-variables'." (setq directory (file-name-as-directory (expand-file-name directory))) (unless (assq class dir-locals-class-alist) - (error "No such class `%s'" (symbol-name class))) + (error "No such class ‘%s’" (symbol-name class))) (push (list directory class mtime) dir-locals-directory-cache)) (defun dir-locals-set-class-variables (class variables) @@ -4028,7 +4028,7 @@ Interactively, confirmation is required unless you supply a prefix argument." (not (and (eq (framep-on-display) 'ns) (listp last-nonmenu-event) use-dialog-box)) - (or (y-or-n-p (format "File `%s' exists; overwrite? " filename)) + (or (y-or-n-p (format "File ‘%s’ exists; overwrite? " filename)) (user-error "Canceled"))) (set-visited-file-name filename (not confirm)))) (set-buffer-modified-p t) @@ -4733,7 +4733,7 @@ Before and after saving the buffer, this function runs ;; Signal an error if the user specified the name of an ;; existing directory. (error "%s is a directory" filename) - (unless (y-or-n-p (format "File `%s' exists; overwrite? " + (unless (y-or-n-p (format "File ‘%s’ exists; overwrite? " filename)) (error "Canceled")))) (set-visited-file-name filename))) @@ -4774,7 +4774,7 @@ Before and after saving the buffer, this function runs (expand-file-name buffer-file-name)))) (unless (file-exists-p dir) (if (y-or-n-p - (format "Directory `%s' does not exist; create? " dir)) + (format "Directory ‘%s’ does not exist; create? " dir)) (make-directory dir t) (error "Canceled"))) (setq setmodes (basic-save-buffer-1)))) @@ -5217,7 +5217,7 @@ given. With a prefix argument, TRASH is nil." (list dir (if (directory-files dir nil directory-files-no-dot-files-regexp) (y-or-n-p - (format "Directory `%s' is not empty, really %s? " + (format "Directory ‘%s’ is not empty, really %s? " dir (if trashing "trash" "delete"))) nil) (null current-prefix-arg)))) @@ -5323,7 +5323,7 @@ directly into NEWNAME instead." default-directory default-directory nil nil) current-prefix-arg t nil))) (when (file-in-directory-p newname directory) - (error "Cannot copy `%s' into its subdirectory `%s'" + (error "Cannot copy ‘%s’ into its subdirectory ‘%s’" directory newname)) ;; If default-directory is a remote directory, make sure we find its ;; copy-directory handler. @@ -5695,7 +5695,7 @@ To choose one, move point to the proper line and then type C-c C-c. Then you'll be asked about a number of files to recover." (interactive) (if (null auto-save-list-file-prefix) - (error "You set `auto-save-list-file-prefix' to disable making session files")) + (error "You set ‘auto-save-list-file-prefix’ to disable making session files")) (let ((dir (file-name-directory auto-save-list-file-prefix)) (nd (file-name-nondirectory auto-save-list-file-prefix))) (unless (file-directory-p dir) @@ -5789,7 +5789,7 @@ This command is used in the special Dired buffer created by (condition-case nil (save-excursion (recover-file file)) (error - "Failed to recover `%s'" file))) + "Failed to recover ‘%s’" file))) files '("file" "files" "recover")) (message "No files can be recovered from this session now"))) @@ -6474,7 +6474,7 @@ normally equivalent short `-D' option is just passed on to file result) ;; Unix. Access the file to get a suitable error. (access-file file "Reading directory") - (error "Listing directory failed but `access-file' worked"))) + (error "Listing directory failed but ‘access-file’ worked"))) (when (if (stringp switches) (string-match "--dired\\>" switches) @@ -6767,7 +6767,7 @@ for the specified category of users." ((= char ?g) #o2070) ((= char ?o) #o1007) ((= char ?a) #o7777) - (t (error "%c: bad `who' character" char)))) + (t (error "%c: bad ‘who’ character" char)))) (defun file-modes-char-to-right (char &optional from) "Convert CHAR to a numeric value of mode bits. @@ -6839,7 +6839,7 @@ as in \"og+rX-w\"." (file-modes-rights-to-number (substring modes (match-end 1)) num-who num-modes) modes (substring modes (match-end 3)))) - (error "Parse error in modes near `%s'" (substring modes 0)))) + (error "Parse error in modes near ‘%s’" (substring modes 0)))) num-modes))) (defun read-file-modes (&optional prompt orig-file) @@ -6908,7 +6908,7 @@ Otherwise, trash FILENAME using the freedesktop.org conventions, trash-dir))) ;; We can't trash a parent directory of trash-directory. (if (string-prefix-p fn trash-dir) - (error "Trash directory `%s' is a subdirectory of `%s'" + (error "Trash directory ‘%s’ is a subdirectory of ‘%s’" trash-dir filename)) (unless (file-directory-p trash-dir) (make-directory trash-dir t)) diff --git a/lisp/font-lock.el b/lisp/font-lock.el index b145513..2fba6a8 100644 --- a/lisp/font-lock.el +++ b/lisp/font-lock.el @@ -1051,7 +1051,7 @@ The region it returns may start or end in the middle of a line.") ;; Of course, this function doesn't do all of the above in all situations ;; (e.g. depending on whether jit-lock is in use) and it can't guess what ;; the caller wants. - (interactive-only "use `font-lock-ensure' or `font-lock-flush' instead.")) + (interactive-only "use ‘font-lock-ensure’ or ‘font-lock-flush’ instead.")) (interactive "p") (font-lock-set-defaults) (let ((font-lock-verbose (or font-lock-verbose interactively))) diff --git a/lisp/format.el b/lisp/format.el index 1a05e7e..afec51c 100644 --- a/lisp/format.el +++ b/lisp/format.el @@ -395,7 +395,7 @@ unless you supply a prefix argument." (cdr (assq 'default-directory (buffer-local-variables))) nil nil (buffer-name)))) - (fmt (format-read (format "Write file `%s' in format: " + (fmt (format-read (format "Write file ‘%s’ in format: " (file-name-nondirectory file))))) (list file fmt (not current-prefix-arg)))) (let ((old-formats buffer-file-format) @@ -416,7 +416,7 @@ If FORMAT is nil then do not do any format conversion." (interactive ;; Same interactive spec as write-file, plus format question. (let* ((file (read-file-name "Find file: ")) - (fmt (format-read (format "Read file `%s' in format: " + (fmt (format-read (format "Read file ‘%s’ in format: " (file-name-nondirectory file))))) (list file fmt))) (let ((format-alist nil)) @@ -435,7 +435,7 @@ a list (ABSOLUTE-FILE-NAME SIZE)." (interactive ;; Same interactive spec as write-file, plus format question. (let* ((file (read-file-name "Find file: ")) - (fmt (format-read (format "Read file `%s' in format: " + (fmt (format-read (format "Read file ‘%s’ in format: " (file-name-nondirectory file))))) (list file fmt))) (let (value size old-undo) diff --git a/lisp/frame.el b/lisp/frame.el index 1177a00..d1e7c00 100644 --- a/lisp/frame.el +++ b/lisp/frame.el @@ -743,7 +743,7 @@ the name of an X display device (HOST.SERVER.SCREEN) or a tty device file." (frame-terminal f))) ((terminal-live-p device) device) (t - (error "Invalid argument %s in `get-device-terminal'" device)))) + (error "Invalid argument %s in ‘get-device-terminal’" device)))) (defun frames-on-display-list (&optional device) "Return a list of all frames on DEVICE. @@ -894,7 +894,7 @@ If there is no frame by that name, signal an error." (frame (cdr (assoc name frame-names-alist)))) (if frame (select-frame-set-input-focus frame) - (error "There is no frame named `%s'" name)))) + (error "There is no frame named ‘%s’" name)))) ;;;; Background mode. diff --git a/lisp/fringe.el b/lisp/fringe.el index 8f40c46..f982b35 100644 --- a/lisp/fringe.el +++ b/lisp/fringe.el @@ -122,7 +122,7 @@ See `fringe-mode' for possible values and their effect." (and (consp style) (or (null (car style)) (integerp (car style))) (or (null (cdr style)) (integerp (cdr style)))) - (error "Invalid fringe style `%s'" style))) + (error "Invalid fringe style ‘%s’" style))) ;; For initialization of fringe-mode, take account of changes ;; made explicitly to default-frame-alist. diff --git a/lisp/help.el b/lisp/help.el index 461a8ab..a8991b5 100644 --- a/lisp/help.el +++ b/lisp/help.el @@ -1040,7 +1040,7 @@ is currently activated with completion." (let ((minor-mode (lookup-minor-mode-from-indicator indicator))) (if minor-mode (describe-minor-mode-from-symbol minor-mode) - (error "Cannot find minor mode for `%s'" indicator)))) + (error "Cannot find minor mode for ‘%s’" indicator)))) (defun lookup-minor-mode-from-indicator (indicator) "Return a minor mode symbol from its indicator on the mode line." diff --git a/lisp/image.el b/lisp/image.el index b023491..1c268c4 100644 --- a/lisp/image.el +++ b/lisp/image.el @@ -343,7 +343,7 @@ of image data. If that doesn't work, and SOURCE is a file name, use its file extension as image type. Optional DATA-P non-nil means SOURCE is a string containing image data." (when (and (not data-p) (not (stringp source))) - (error "Invalid image file name `%s'" source)) + (error "Invalid image file name ‘%s’" source)) (unless type (setq type (if data-p (image-type-from-data source) @@ -351,7 +351,7 @@ Optional DATA-P non-nil means SOURCE is a string containing image data." (image-type-from-file-name source)))) (or type (error "Cannot determine image type"))) (or (memq type (and (boundp 'image-types) image-types)) - (error "Invalid image type `%s'" type)) + (error "Invalid image type ‘%s’" type)) type) diff --git a/lisp/international/fontset.el b/lisp/international/fontset.el index 2d57955..98f0170 100644 --- a/lisp/international/fontset.el +++ b/lisp/international/fontset.el @@ -1055,7 +1055,7 @@ Value is name of that font." (condition-case nil (setq ascii-font (x-resolve-font-name pattern)) (error - (message "Warning: no fonts matching `%s' available" pattern) + (message "Warning: no fonts matching ‘%s’ available" pattern) (aset xlfd-fields index "*") (setq index (1+ index)))))) (unless ascii-font diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el index 59fc37d..2142f0b 100644 --- a/lisp/international/mule-cmds.el +++ b/lisp/international/mule-cmds.el @@ -400,9 +400,9 @@ To prefer, for instance, utf-8, say the following: \(prefer-coding-system 'utf-8)" (interactive "zPrefer coding system: ") (if (not (and coding-system (coding-system-p coding-system))) - (error "Invalid coding system `%s'" coding-system)) + (error "Invalid coding system ‘%s’" coding-system)) (if (memq (coding-system-type coding-system) '(raw-text undecided)) - (error "Can't prefer the coding system `%s'" coding-system)) + (error "Can't prefer the coding system ‘%s’" coding-system)) (let ((base (coding-system-base coding-system)) (eol-type (coding-system-eol-type coding-system))) (set-coding-system-priority base) @@ -417,7 +417,7 @@ To prefer, for instance, utf-8, say the following: (set-default-coding-systems base) (if (called-interactively-p 'interactive) (or (eq base default-file-name-coding-system) - (message "The default value of `file-name-coding-system' was not changed because the specified coding system is not suitable for file names."))))) + (message "The default value of ‘file-name-coding-system’ was not changed because the specified coding system is not suitable for file names."))))) (defvar sort-coding-systems-predicate nil "If non-nil, a predicate function to sort coding systems. @@ -719,14 +719,14 @@ DEFAULT is the coding system to use by default in the query." (insert "No default coding systems to try for " (if (stringp from) (format "string \"%s\"." from) - (format "buffer `%s'." bufname))) + (format "buffer ‘%s’." bufname))) (insert "These default coding systems were tried to encode" (if (stringp from) (concat " \"" (if (> (length from) 10) (concat (substring from 0 10) "...\"") (concat from "\""))) - (format " text\nin the buffer `%s'" bufname)) + (format " text\nin the buffer ‘%s’" bufname)) ":\n") (let ((pos (point)) (fill-prefix " ")) @@ -876,12 +876,12 @@ and TO is ignored." (display-warning 'mule (format "\ -Invalid coding system `%s' is specified +Invalid coding system ‘%s’ is specified for the current buffer/file by the %s. It is highly recommended to fix it before writing to a file." (car auto-cs) (if (eq (cdr auto-cs) :coding) ":coding tag" - (format "variable `%s'" (cdr auto-cs)))) + (format "variable ‘%s’" (cdr auto-cs)))) :warning) (or (yes-or-no-p "Really proceed with writing? ") (error "Save aborted")) @@ -1451,7 +1451,7 @@ If INPUT-METHOD is nil, deactivate any current input method." (unless (or current-input-method (null input-method)) (let ((slot (assoc input-method input-method-alist))) (if (null slot) - (error "Can't activate input method `%s'" input-method)) + (error "Can't activate input method ‘%s’" input-method)) (setq current-input-method-title nil) (let ((func (nth 2 slot))) (if (functionp func) @@ -1460,7 +1460,7 @@ If INPUT-METHOD is nil, deactivate any current input method." (progn (require (cdr func)) (apply (car func) input-method (nthcdr 5 slot))) - (error "Can't activate input method `%s'" input-method)))) + (error "Can't activate input method ‘%s’" input-method)))) (setq current-input-method input-method) (or (stringp current-input-method-title) (setq current-input-method-title (nth 3 slot))) @@ -1538,7 +1538,7 @@ which marks the variable `default-input-method' as set for Custom buffers." (interactive "P\np") (if toggle-input-method-active - (error "Recursive use of `toggle-input-method'")) + (error "Recursive use of ‘toggle-input-method’")) (if (and current-input-method (not arg)) (deactivate-input-method) (let ((toggle-input-method-active t) @@ -1598,7 +1598,7 @@ This is a subroutine for `describe-input-method'." (if (and (symbolp describe-current-input-method-function) (fboundp describe-current-input-method-function)) (funcall describe-current-input-method-function) - (message "No way to describe the current input method `%s'" + (message "No way to describe the current input method ‘%s’" current-input-method) (ding)) (error "No input method is activated now"))) diff --git a/lisp/international/mule-conf.el b/lisp/international/mule-conf.el index babb83b..c3d58aa 100644 --- a/lisp/international/mule-conf.el +++ b/lisp/international/mule-conf.el @@ -904,7 +904,7 @@ (dolist (script '(devanagari sanskrit bengali tamil telugu assamese oriya kannada malayalam gujarati punjabi)) (define-charset (intern (format "%s-cdac" script)) - (format "Glyphs of %s script for CDAC font. Subset of `indian-glyph'." + (format "Glyphs of %s script for CDAC font. Subset of ‘indian-glyph’." (capitalize (symbol-name script))) :short-name (format "CDAC %s glyphs" (capitalize (symbol-name script))) :supplementary-p t @@ -915,7 +915,7 @@ (dolist (script '(devanagari bengali punjabi gujarati oriya tamil telugu kannada malayalam)) (define-charset (intern (format "%s-akruti" script)) - (format "Glyphs of %s script for AKRUTI font. Subset of `indian-glyph'." + (format "Glyphs of %s script for AKRUTI font. Subset of ‘indian-glyph’." (capitalize (symbol-name script))) :short-name (format "AKRUTI %s glyphs" (capitalize (symbol-name script))) :supplementary-p t diff --git a/lisp/international/mule.el b/lisp/international/mule.el index 181474c..946f793 100644 --- a/lisp/international/mule.el +++ b/lisp/international/mule.el @@ -2002,7 +2002,7 @@ use \"coding: 'raw-text\" instead." (goto-char pos) (when (and set-auto-coding-for-load (re-search-forward re-unibyte tail-end t)) - (display-warning 'mule "`unibyte: t' is obsolete; \ + (display-warning 'mule "\"unibyte: t\" is obsolete; \ use \"coding: 'raw-text\" instead." :warning) (setq coding-system 'raw-text)) (when (and (not coding-system) diff --git a/lisp/mouse.el b/lisp/mouse.el index 221d30b..5048271 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el @@ -146,7 +146,7 @@ items `Turn Off' and `Help'." (describe-minor-mode-completion-table-for-indicator)))) (let* ((minor-mode (lookup-minor-mode-from-indicator indicator)) (mm-fun (or (get minor-mode :minor-mode-function) minor-mode))) - (unless minor-mode (error "Cannot find minor mode for `%s'" indicator)) + (unless minor-mode (error "Cannot find minor mode for ‘%s’" indicator)) (let* ((map (cdr-safe (assq minor-mode minor-mode-map-alist))) (menu (and (keymapp map) (lookup-key map [menu-bar])))) (setq menu diff --git a/lisp/replace.el b/lisp/replace.el index aa1da08..3cdb54f 100644 --- a/lisp/replace.el +++ b/lisp/replace.el @@ -209,9 +209,9 @@ wants to replace FROM with TO." (let ((match (match-string 3 from))) (cond ((string= match "\\n") - (message "Note: `\\n' here doesn't match a newline; to do that, type C-q C-j instead")) + (message "Note: ‘\\n’ here doesn't match a newline; to do that, type C-q C-j instead")) ((string= match "\\t") - (message "Note: `\\t' here doesn't match a tab; to do that, just type TAB"))) + (message "Note: ‘\\t’ here doesn't match a tab; to do that, just type TAB"))) (sit-for 2))) (if (not to) from @@ -1140,7 +1140,7 @@ To return to ordinary Occur mode, use \\[occur-cease-edit]." (goto-char m) (recenter line) (if readonly - (message "Buffer `%s' is read only." buf) + (message "Buffer ‘%s’ is read only." buf) (delete-region (line-beginning-position) (line-end-position)) (insert text)) (move-to-column col))))))) @@ -1495,7 +1495,7 @@ See also `multi-occur'." ;; Don't display regexp if with remaining text ;; it is longer than window-width. (if (> (+ (length regexp) 42) (window-width)) - "" (format " for `%s'" (query-replace-descr regexp))))) + "" (format " for ‘%s’" (query-replace-descr regexp))))) (setq occur-revert-arguments (list regexp nlines bufs)) (if (= count 0) (kill-buffer occur-buf) diff --git a/lisp/scroll-bar.el b/lisp/scroll-bar.el index 635990a..c46e05d 100644 --- a/lisp/scroll-bar.el +++ b/lisp/scroll-bar.el @@ -61,7 +61,7 @@ SIDE must be the symbol `left' or `right'." (cols (nth 1 wsb))) (cond ((not (memq side '(left right))) - (error "`left' or `right' expected instead of %S" side)) + (error "‘left’ or ‘right’ expected instead of %S" side)) ((and (eq vtype side) cols)) ((eq (frame-parameter nil 'vertical-scroll-bars) side) ;; nil means it's a non-toolkit scroll bar, and its width in diff --git a/lisp/simple.el b/lisp/simple.el index 2636777..923d88d 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -1655,7 +1655,7 @@ invoking, give a prefix argument to `execute-extended-command'." (not executing-kbd-macro) (where-is-internal function overriding-local-map t)))) (unless (commandp function) - (error "`%s' is not a valid command name" command-name)) + (error "‘%s’ is not a valid command name" command-name)) (setq this-command function) ;; Normally `real-this-command' should never be changed, but here we really ;; want to pretend that M-x RET is nothing more than a "key @@ -1689,7 +1689,7 @@ invoking, give a prefix argument to `execute-extended-command'." (symbol-name function) typed)))) (when binding (with-temp-message - (format "You can run the command `%s' with %s" + (format "You can run the command ‘%s’ with %s" function (if (stringp binding) (concat "M-x " binding " RET") @@ -2796,7 +2796,7 @@ This variable only matters if `undo-ask-before-discard' is non-nil.") ;; but we don't want to ask the question again. (setq undo-extra-outer-limit (+ size 50000)) (if (let (use-dialog-box track-mouse executing-kbd-macro ) - (yes-or-no-p (format "Buffer `%s' undo info is %d bytes long; discard it? " + (yes-or-no-p (format "Buffer ‘%s’ undo info is %d bytes long; discard it? " (buffer-name) size))) (progn (setq buffer-undo-list nil) (setq undo-extra-outer-limit nil) @@ -2804,7 +2804,7 @@ This variable only matters if `undo-ask-before-discard' is non-nil.") nil)) (display-warning '(undo discard-info) (concat - (format "Buffer `%s' undo info was %d bytes long.\n" + (format "Buffer ‘%s’ undo info was %d bytes long.\n" (buffer-name) size) "The undo info was discarded because it exceeded \ `undo-outer-limit'. @@ -7265,8 +7265,8 @@ buffer buried." (format "\ The default mail mode is now Message mode. You have the following Mail mode variable%s customized: -\n %s\n\nTo use Mail mode, set `mail-user-agent' to sendmail-user-agent. -To disable this warning, set `compose-mail-user-agent-warnings' to nil." +\n %s\n\nTo use Mail mode, set ‘mail-user-agent’ to sendmail-user-agent. +To disable this warning, set ‘compose-mail-user-agent-warnings’ to nil." (if (> (length warn-vars) 1) "s" "") (mapconcat 'symbol-name warn-vars " ")))))) @@ -7337,8 +7337,8 @@ With a prefix argument, set VARIABLE to VALUE buffer-locally." (t "globally")))) (val (progn (when obsolete - (message (concat "`%S' is obsolete; " - (if (symbolp obsolete) "use `%S' instead" "%s")) + (message (concat "‘%S’ is obsolete; " + (if (symbolp obsolete) "use ‘%S’ instead" "%s")) var obsolete) (sit-for 3)) (if prop @@ -7362,7 +7362,7 @@ With a prefix argument, set VARIABLE to VALUE buffer-locally." (require 'cus-edit) (setq type (widget-convert type)) (unless (widget-apply type :match value) - (user-error "Value `%S' does not match type %S of %S" + (user-error "Value ‘%S’ does not match type %S of %S" value (car type) variable)))) (if make-local @@ -7573,7 +7573,7 @@ back on `completion-list-insert-choice-function' when nil." ;; `base-position'. It's difficult to make any use of `base-size', ;; so we just ignore it. (unless (consp base-position) - (message "Obsolete `base-size' passed to choose-completion-string") + (message "Obsolete ‘base-size’ passed to choose-completion-string") (setq base-position nil)) (let* ((buffer (or buffer completion-reference-buffer)) @@ -8298,7 +8298,7 @@ CUSTOMIZATIONS, if non-nil, should be composed of alternating `(progn (defcustom ,varalt-sym nil - ,(format "Alist of alternative implementations for the `%s' command. + ,(format "Alist of alternative implementations for the ‘%s’ command. Each entry must be a pair (ALTNAME . ALTFUN), where: ALTNAME - The name shown at user to describe the alternative implementation. @@ -8311,28 +8311,28 @@ ALTFUN - The function called to implement this alternative." (defvar ,varimp-sym nil "Internal use only.") (defun ,command (&optional arg) - ,(format "Run generic command `%s'. + ,(format "Run generic command ‘%s’. If used for the first time, or with interactive ARG, ask the user which -implementation to use for `%s'. The variable `%s' +implementation to use for ‘%s’. The variable ‘%s’ contains the list of implementations currently supported for this command." command-name command-name varalt-name) (interactive "P") (when (or arg (null ,varimp-sym)) (let ((val (completing-read - ,(format "Select implementation for command `%s': " + ,(format "Select implementation for command ‘%s’: " command-name) ,varalt-sym nil t))) (unless (string-equal val "") (when (null ,varimp-sym) (message - "Use `C-u M-x %s RET' to select another implementation" + "Use ‘C-u M-x %s RET’ to select another implementation" ,command-name) (sit-for 3)) (customize-save-variable ',varimp-sym (cdr (assoc-string val ,varalt-sym)))))) (if ,varimp-sym (call-interactively ,varimp-sym) - (message ,(format "No implementation selected for command `%s'" + (message ,(format "No implementation selected for command ‘%s’" command-name))))))) diff --git a/lisp/startup.el b/lisp/startup.el index 11d2212..3248a99 100644 --- a/lisp/startup.el +++ b/lisp/startup.el @@ -360,7 +360,7 @@ this variable usefully is to set it while building and dumping Emacs." :group 'initialization :initialize #'custom-initialize-default :set (lambda (_variable _value) - (error "Customizing `site-run-file' does not work"))) + (error "Customizing ‘site-run-file’ does not work"))) (make-obsolete-variable 'system-name "use (system-name) instead" "25.1") @@ -752,7 +752,7 @@ to prepare for opening the first frame (e.g. open a connection to an X server)." (let ((elt (assoc completion tty-long-option-alist))) ;; Check for abbreviated long option. (or elt - (error "Option `%s' is ambiguous" argi)) + (error "Option ‘%s’ is ambiguous" argi)) (setq argi (cdr elt))) ;; Check for a short option. (setq argval nil @@ -902,7 +902,7 @@ please check its value") ((stringp completion) (let ((elt (assoc completion longopts))) (unless elt - (error "Option `%s' is ambiguous" argi)) + (error "Option ‘%s’ is ambiguous" argi)) (setq argi (substring (car elt) 1)))) (t (setq argval nil @@ -945,7 +945,7 @@ please check its value") (setq done t))) ;; Was argval set but not used? (and argval - (error "Option `%s' doesn't allow an argument" argi)))) + (error "Option ‘%s’ doesn't allow an argument" argi)))) ;; Re-attach the --display arg. (and display-arg (setq args (append display-arg args))) @@ -964,7 +964,7 @@ please check its value") (not (featurep (intern (concat (symbol-name initial-window-system) "-win"))))) - (error "Unsupported window system `%s'" initial-window-system)) + (error "Unsupported window system ‘%s’" initial-window-system)) ;; Process window-system specific command line parameters. (setq command-line-args (let ((window-system initial-window-system)) ;Hack attack! @@ -1176,10 +1176,10 @@ please check its value") (error (display-warning 'initialization - (format "An error occurred while loading `%s':\n\n%s%s%s\n\n\ + (format "An error occurred while loading ‘%s’:\n\n%s%s%s\n\n\ To ensure normal operation, you should investigate and remove the cause of the error in your initialization file. Start Emacs with -the `--debug-init' option to view a complete error backtrace." +the ‘--debug-init’ option to view a complete error backtrace." user-init-file (get (car error) 'error-message) (if (cdr error) ": " "") @@ -1311,8 +1311,8 @@ the `--debug-init' option to view a complete error backtrace." (expand-file-name user-emacs-directory)) (setq warned t) (display-warning 'initialization - (format "Your `load-path' seems to contain -your `.emacs.d' directory: %s\n\ + (format "Your ‘load-path’ seems to contain +your ‘.emacs.d’ directory: %s\n\ This is likely to cause problems...\n\ Consider using a subdirectory instead, e.g.: %s" dir (expand-file-name @@ -2260,7 +2260,7 @@ nil default-directory" name) (if (stringp completion) (let ((elt (member completion longopts))) (or elt - (error "Option `%s' is ambiguous" argi)) + (error "Option ‘%s’ is ambiguous" argi)) (setq argi (substring (car elt) 1))) (setq argval nil argi orig-argi))))) @@ -2330,7 +2330,7 @@ nil default-directory" name) (setq inhibit-startup-screen t) (setq tem (or argval (pop command-line-args-left))) (or (stringp tem) - (error "File name omitted from `-insert' option")) + (error "File name omitted from ‘-insert’ option")) (insert-file-contents (command-line-normalize-file-name tem))) ((equal argi "-kill") @@ -2365,7 +2365,7 @@ nil default-directory" name) ;; An explicit option to specify visiting a file. (setq tem (or argval (pop command-line-args-left))) (unless (stringp tem) - (error "File name omitted from `%s' option" argi)) + (error "File name omitted from ‘%s’ option" argi)) (funcall process-file-arg tem)) ;; These command lines now have no effect. @@ -2386,7 +2386,7 @@ nil default-directory" name) (unless did-hook ;; Presume that the argument is a file name. (if (string-match "\\`-" argi) - (error "Unknown option `%s'" argi)) + (error "Unknown option ‘%s’" argi)) ;; FIXME: Why do we only inhibit the startup ;; screen for -nw? (unless initial-window-system diff --git a/lisp/subr.el b/lisp/subr.el index 3dd87d6..7e7dbd1 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -72,7 +72,7 @@ For more information, see Info node `(elisp)Declaring Functions'." If FORM does return, signal an error." (declare (debug t)) `(prog1 ,form - (error "Form marked with `noreturn' did return"))) + (error "Form marked with ‘noreturn’ did return"))) (defmacro 1value (form) "Evaluate FORM, expecting a constant return value. @@ -320,7 +320,7 @@ Defaults to `error'." (mapcar (lambda (parent) (cons parent (or (get parent 'error-conditions) - (error "Unknown signal `%s'" parent)))) + (error "Unknown signal ‘%s’" parent)))) parent)) (cons parent (get parent 'error-conditions))))) (put name 'error-conditions @@ -1606,7 +1606,7 @@ can do the job." exp (let* ((sym (cadr list-var)) (append (eval append)) - (msg (format "`add-to-list' can't use lexical var `%s'; use `push' or `cl-pushnew'" + (msg (format "‘add-to-list’ can't use lexical var ‘%s’; use ‘push’ or ‘cl-pushnew’" sym)) ;; Big ugly hack so we only output a warning during ;; byte-compilation, and so we can use @@ -2207,7 +2207,7 @@ Any input that is not one of CHARS is ignored. If optional argument INHIBIT-KEYBOARD-QUIT is non-nil, ignore keyboard-quit events while waiting for a valid input." (unless (consp chars) - (error "Called `read-char-choice' without valid char choices")) + (error "Called ‘read-char-choice’ without valid char choices")) (let (char done show-help (helpbuf " *Char Help*")) (let ((cursor-in-echo-area t) (executing-kbd-macro executing-kbd-macro) diff --git a/lisp/term/common-win.el b/lisp/term/common-win.el index 98ad5ac..ccac142 100644 --- a/lisp/term/common-win.el +++ b/lisp/term/common-win.el @@ -112,7 +112,7 @@ ;; Handle the -xrm option. (defun x-handle-xrm-switch (switch) (unless (consp x-invocation-args) - (error "%s: missing argument to `%s' option" (invocation-name) switch)) + (error "%s: missing argument to ‘%s’ option" (invocation-name) switch)) (setq x-command-line-resources (if (null x-command-line-resources) (pop x-invocation-args) @@ -152,7 +152,7 @@ ;; the initial frame, too. (defun x-handle-name-switch (switch) (or (consp x-invocation-args) - (error "%s: missing argument to `%s' option" (invocation-name) switch)) + (error "%s: missing argument to ‘%s’ option" (invocation-name) switch)) (setq x-resource-name (pop x-invocation-args) initial-frame-alist (cons (cons 'name x-resource-name) initial-frame-alist))) @@ -207,7 +207,7 @@ have been processed." (let ((elt (assoc completion option-alist))) ;; Check for abbreviated long option. (or elt - (error "Option `%s' is ambiguous" this-switch)) + (error "Option ‘%s’ is ambiguous" this-switch)) (setq this-switch completion)))))) (setq aelt (assoc this-switch option-alist)) (if aelt (setq handler (nth 2 aelt))) diff --git a/lisp/term/x-win.el b/lisp/term/x-win.el index ebd76a6..c325661 100644 --- a/lisp/term/x-win.el +++ b/lisp/term/x-win.el @@ -93,7 +93,7 @@ ;; Handle the --parent-id option. (defun x-handle-parent-id (switch) (or (consp x-invocation-args) - (error "%s: missing argument to `%s' option" (invocation-name) switch)) + (error "%s: missing argument to ‘%s’ option" (invocation-name) switch)) (setq initial-frame-alist (cons (cons 'parent-id (string-to-number (car x-invocation-args))) @@ -104,7 +104,7 @@ ;; to give us back our session id we had on the previous run. (defun x-handle-smid (switch) (or (consp x-invocation-args) - (error "%s: missing argument to `%s' option" (invocation-name) switch)) + (error "%s: missing argument to ‘%s’ option" (invocation-name) switch)) (setq x-session-previous-id (car x-invocation-args) x-invocation-args (cdr x-invocation-args))) commit 3a91d153106aee673e0ba2cca58d7f3986d7ee13 Author: Paul Eggert Date: Sun Aug 16 08:34:44 2015 -0700 Convert lisp/term/x-win.el to UTF-8 * lisp/term/x-win.el: Convert to UTF-8. This doesn't affect runtime behavior, and the file is multilingual so compile-time appearance shouldn't be an issue. * admin/notes/unicode: Document this. diff --git a/admin/notes/unicode b/admin/notes/unicode index ebec417..079173f 100644 --- a/admin/notes/unicode +++ b/admin/notes/unicode @@ -226,7 +226,6 @@ nontrivial changes to the build process. lisp/leim/quail/japanese.el lisp/leim/quail/py-punct.el lisp/leim/quail/pypunct-b5.el - lisp/term/x-win.el This file contains just Chinese characters, and has same problem. Also, it contains characters that cannot be encoded in UTF-8. diff --git a/lisp/term/x-win.el b/lisp/term/x-win.el index 39145ff..ebd76a6 100644 --- a/lisp/term/x-win.el +++ b/lisp/term/x-win.el @@ -1,4 +1,4 @@ -;;; x-win.el --- parse relevant switches and set up for X -*-coding: iso-2022-7bit; lexical-binding:t -*- +;;; x-win.el --- parse relevant switches and set up for X -*-coding: utf-8; lexical-binding:t -*- ;; Copyright (C) 1993-1994, 2001-2015 Free Software Foundation, Inc. @@ -307,830 +307,822 @@ as returned by `x-server-vendor'." (pair '( ;; Latin-2 - (#x1a1 . ?,B!(B) - (#x1a2 . ?,B"(B) - (#x1a3 . ?,B#(B) - (#x1a5 . ?,B%(B) - (#x1a6 . ?,B&(B) - (#x1a9 . ?,B)(B) - (#x1aa . ?,B*(B) - (#x1ab . ?,B+(B) - (#x1ac . ?,B,(B) - (#x1ae . ?,B.(B) - (#x1af . ?,B/(B) - (#x1b1 . ?,B1(B) - (#x1b2 . ?,B2(B) - (#x1b3 . ?,B3(B) - (#x1b5 . ?,B5(B) - (#x1b6 . ?,B6(B) - (#x1b7 . ?,B7(B) - (#x1b9 . ?,B9(B) - (#x1ba . ?,B:(B) - (#x1bb . ?,B;(B) - (#x1bc . ?,B<(B) - (#x1bd . ?,B=(B) - (#x1be . ?,B>(B) - (#x1bf . ?,B?(B) - (#x1c0 . ?,B@(B) - (#x1c3 . ?,BC(B) - (#x1c5 . ?,BE(B) - (#x1c6 . ?,BF(B) - (#x1c8 . ?,BH(B) - (#x1ca . ?,BJ(B) - (#x1cc . ?,BL(B) - (#x1cf . ?,BO(B) - (#x1d0 . ?,BP(B) - (#x1d1 . ?,BQ(B) - (#x1d2 . ?,BR(B) - (#x1d5 . ?,BU(B) - (#x1d8 . ?,BX(B) - (#x1d9 . ?,BY(B) - (#x1db . ?,B[(B) - (#x1de . ?,B^(B) - (#x1e0 . ?,B`(B) - (#x1e3 . ?,Bc(B) - (#x1e5 . ?,Be(B) - (#x1e6 . ?,Bf(B) - (#x1e8 . ?,Bh(B) - (#x1ea . ?,Bj(B) - (#x1ec . ?,Bl(B) - (#x1ef . ?,Bo(B) - (#x1f0 . ?,Bp(B) - (#x1f1 . ?,Bq(B) - (#x1f2 . ?,Br(B) - (#x1f5 . ?,Bu(B) - (#x1f8 . ?,Bx(B) - (#x1f9 . ?,By(B) - (#x1fb . ?,B{(B) - (#x1fe . ?,B~(B) - (#x1ff . ?,B(B) + (#x1a1 . ?Ą) + (#x1a2 . ?˘) + (#x1a3 . ?Ł) + (#x1a5 . ?Ľ) + (#x1a6 . ?Ś) + (#x1a9 . ?Š) + (#x1aa . ?Ş) + (#x1ab . ?Ť) + (#x1ac . ?Ź) + (#x1ae . ?Ž) + (#x1af . ?Ż) + (#x1b1 . ?ą) + (#x1b2 . ?˛) + (#x1b3 . ?ł) + (#x1b5 . ?ľ) + (#x1b6 . ?ś) + (#x1b7 . ?ˇ) + (#x1b9 . ?š) + (#x1ba . ?ş) + (#x1bb . ?ť) + (#x1bc . ?ź) + (#x1bd . ?˝) + (#x1be . ?ž) + (#x1bf . ?ż) + (#x1c0 . ?Ŕ) + (#x1c3 . ?Ă) + (#x1c5 . ?Ĺ) + (#x1c6 . ?Ć) + (#x1c8 . ?Č) + (#x1ca . ?Ę) + (#x1cc . ?Ě) + (#x1cf . ?Ď) + (#x1d0 . ?Đ) + (#x1d1 . ?Ń) + (#x1d2 . ?Ň) + (#x1d5 . ?Ő) + (#x1d8 . ?Ř) + (#x1d9 . ?Ů) + (#x1db . ?Ű) + (#x1de . ?Ţ) + (#x1e0 . ?ŕ) + (#x1e3 . ?ă) + (#x1e5 . ?ĺ) + (#x1e6 . ?ć) + (#x1e8 . ?č) + (#x1ea . ?ę) + (#x1ec . ?ě) + (#x1ef . ?ď) + (#x1f0 . ?đ) + (#x1f1 . ?ń) + (#x1f2 . ?ň) + (#x1f5 . ?ő) + (#x1f8 . ?ř) + (#x1f9 . ?ů) + (#x1fb . ?ű) + (#x1fe . ?ţ) + (#x1ff . ?˙) ;; Latin-3 - (#x2a1 . ?,C!(B) - (#x2a6 . ?,C&(B) - (#x2a9 . ?,C)(B) - (#x2ab . ?,C+(B) - (#x2ac . ?,C,(B) - (#x2b1 . ?,C1(B) - (#x2b6 . ?,C6(B) - (#x2b9 . ?,C9(B) - (#x2bb . ?,C;(B) - (#x2bc . ?,C<(B) - (#x2c5 . ?,CE(B) - (#x2c6 . ?,CF(B) - (#x2d5 . ?,CU(B) - (#x2d8 . ?,CX(B) - (#x2dd . ?,C](B) - (#x2de . ?,C^(B) - (#x2e5 . ?,Ce(B) - (#x2e6 . ?,Cf(B) - (#x2f5 . ?,Cu(B) - (#x2f8 . ?,Cx(B) - (#x2fd . ?,C}(B) - (#x2fe . ?,C~(B) + (#x2a1 . ?Ħ) + (#x2a6 . ?Ĥ) + (#x2a9 . ?İ) + (#x2ab . ?Ğ) + (#x2ac . ?Ĵ) + (#x2b1 . ?ħ) + (#x2b6 . ?ĥ) + (#x2b9 . ?ı) + (#x2bb . ?ğ) + (#x2bc . ?ĵ) + (#x2c5 . ?Ċ) + (#x2c6 . ?Ĉ) + (#x2d5 . ?Ġ) + (#x2d8 . ?Ĝ) + (#x2dd . ?Ŭ) + (#x2de . ?Ŝ) + (#x2e5 . ?ċ) + (#x2e6 . ?ĉ) + (#x2f5 . ?ġ) + (#x2f8 . ?ĝ) + (#x2fd . ?ŭ) + (#x2fe . ?ŝ) ;; Latin-4 - (#x3a2 . ?,D"(B) - (#x3a3 . ?,D#(B) - (#x3a5 . ?,D%(B) - (#x3a6 . ?,D&(B) - (#x3aa . ?,D*(B) - (#x3ab . ?,D+(B) - (#x3ac . ?,D,(B) - (#x3b3 . ?,D3(B) - (#x3b5 . ?,D5(B) - (#x3b6 . ?,D6(B) - (#x3ba . ?,D:(B) - (#x3bb . ?,D;(B) - (#x3bc . ?,D<(B) - (#x3bd . ?,D=(B) - (#x3bf . ?,D?(B) - (#x3c0 . ?,D@(B) - (#x3c7 . ?,DG(B) - (#x3cc . ?,DL(B) - (#x3cf . ?,DO(B) - (#x3d1 . ?,DQ(B) - (#x3d2 . ?,DR(B) - (#x3d3 . ?,DS(B) - (#x3d9 . ?,DY(B) - (#x3dd . ?,D](B) - (#x3de . ?,D^(B) - (#x3e0 . ?,D`(B) - (#x3e7 . ?,Dg(B) - (#x3ec . ?,Dl(B) - (#x3ef . ?,Do(B) - (#x3f1 . ?,Dq(B) - (#x3f2 . ?,Dr(B) - (#x3f3 . ?,Ds(B) - (#x3f9 . ?,Dy(B) - (#x3fd . ?,D}(B) - (#x3fe . ?,D~(B) - ;; Kana: Fixme: needs conversion to Japanese charset -- seems - ;; to require jisx0213, for which the Unicode translation - ;; isn't clear. Using Emacs to convert this to Unicode and back changes - ;; this from "(J~(B" (i.e., bytes "ESC ( J ~ ESC ( B") to "$(G"#(B" (i.e., bytes - ;; "ESC $ ( G " # ESC ( B"). - (#x47e . ?(J~(B) - (#x4a1 . ?$A!#(B) - (#x4a2 . ?\$A!8(B) - (#x4a3 . ?\$A!9(B) - (#x4a4 . ?$A!"(B) - (#x4a5 . ?$A!$(B) - (#x4a6 . ?$A%r(B) - (#x4a7 . ?$A%!(B) - (#x4a8 . ?$A%#(B) - (#x4a9 . ?$A%%(B) - (#x4aa . ?$A%'(B) - (#x4ab . ?$A%)(B) - (#x4ac . ?$A%c(B) - (#x4ad . ?$A%e(B) - (#x4ae . ?$A%g(B) - (#x4af . ?$A%C(B) - (#x4b0 . ?$B!<(B) - (#x4b1 . ?$A%"(B) - (#x4b2 . ?$A%$(B) - (#x4b3 . ?$A%&(B) - (#x4b4 . ?$A%((B) - (#x4b5 . ?$A%*(B) - (#x4b6 . ?$A%+(B) - (#x4b7 . ?$A%-(B) - (#x4b8 . ?$A%/(B) - (#x4b9 . ?$A%1(B) - (#x4ba . ?$A%3(B) - (#x4bb . ?$A%5(B) - (#x4bc . ?$A%7(B) - (#x4bd . ?$A%9(B) - (#x4be . ?$A%;(B) - (#x4bf . ?$A%=(B) - (#x4c0 . ?$A%?(B) - (#x4c1 . ?$A%A(B) - (#x4c2 . ?$A%D(B) - (#x4c3 . ?$A%F(B) - (#x4c4 . ?$A%H(B) - (#x4c5 . ?$A%J(B) - (#x4c6 . ?$A%K(B) - (#x4c7 . ?$A%L(B) - (#x4c8 . ?$A%M(B) - (#x4c9 . ?$A%N(B) - (#x4ca . ?$A%O(B) - (#x4cb . ?$A%R(B) - (#x4cc . ?$A%U(B) - (#x4cd . ?$A%X(B) - (#x4ce . ?$A%[(B) - (#x4cf . ?$A%^(B) - (#x4d0 . ?$A%_(B) - (#x4d1 . ?$A%`(B) - (#x4d2 . ?$A%a(B) - (#x4d3 . ?$A%b(B) - (#x4d4 . ?$A%d(B) - (#x4d5 . ?$A%f(B) - (#x4d6 . ?$A%h(B) - (#x4d7 . ?$A%i(B) - (#x4d8 . ?$A%j(B) - (#x4d9 . ?$A%k(B) - (#x4da . ?$A%l(B) - (#x4db . ?$A%m(B) - (#x4dc . ?$A%o(B) - (#x4dd . ?$A%s(B) - (#x4de . ?$B!+(B) - (#x4df . ?$B!,(B) + (#x3a2 . ?ĸ) + (#x3a3 . ?Ŗ) + (#x3a5 . ?Ĩ) + (#x3a6 . ?Ļ) + (#x3aa . ?Ē) + (#x3ab . ?Ģ) + (#x3ac . ?Ŧ) + (#x3b3 . ?ŗ) + (#x3b5 . ?ĩ) + (#x3b6 . ?ļ) + (#x3ba . ?ē) + (#x3bb . ?ģ) + (#x3bc . ?ŧ) + (#x3bd . ?Ŋ) + (#x3bf . ?ŋ) + (#x3c0 . ?Ā) + (#x3c7 . ?Į) + (#x3cc . ?Ė) + (#x3cf . ?Ī) + (#x3d1 . ?Ņ) + (#x3d2 . ?Ō) + (#x3d3 . ?Ķ) + (#x3d9 . ?Ų) + (#x3dd . ?Ũ) + (#x3de . ?Ū) + (#x3e0 . ?ā) + (#x3e7 . ?į) + (#x3ec . ?ė) + (#x3ef . ?ī) + (#x3f1 . ?ņ) + (#x3f2 . ?ō) + (#x3f3 . ?ķ) + (#x3f9 . ?ų) + (#x3fd . ?ũ) + (#x3fe . ?ū) + (#x47e . ?‾) + (#x4a1 . ?。) + (#x4a2 . ?\「) + (#x4a3 . ?\」) + (#x4a4 . ?、) + (#x4a5 . ?・) + (#x4a6 . ?ヲ) + (#x4a7 . ?ァ) + (#x4a8 . ?ィ) + (#x4a9 . ?ゥ) + (#x4aa . ?ェ) + (#x4ab . ?ォ) + (#x4ac . ?ャ) + (#x4ad . ?ュ) + (#x4ae . ?ョ) + (#x4af . ?ッ) + (#x4b0 . ?ー) + (#x4b1 . ?ア) + (#x4b2 . ?イ) + (#x4b3 . ?ウ) + (#x4b4 . ?エ) + (#x4b5 . ?オ) + (#x4b6 . ?カ) + (#x4b7 . ?キ) + (#x4b8 . ?ク) + (#x4b9 . ?ケ) + (#x4ba . ?コ) + (#x4bb . ?サ) + (#x4bc . ?シ) + (#x4bd . ?ス) + (#x4be . ?セ) + (#x4bf . ?ソ) + (#x4c0 . ?タ) + (#x4c1 . ?チ) + (#x4c2 . ?ツ) + (#x4c3 . ?テ) + (#x4c4 . ?ト) + (#x4c5 . ?ナ) + (#x4c6 . ?ニ) + (#x4c7 . ?ヌ) + (#x4c8 . ?ネ) + (#x4c9 . ?ノ) + (#x4ca . ?ハ) + (#x4cb . ?ヒ) + (#x4cc . ?フ) + (#x4cd . ?ヘ) + (#x4ce . ?ホ) + (#x4cf . ?マ) + (#x4d0 . ?ミ) + (#x4d1 . ?ム) + (#x4d2 . ?メ) + (#x4d3 . ?モ) + (#x4d4 . ?ヤ) + (#x4d5 . ?ユ) + (#x4d6 . ?ヨ) + (#x4d7 . ?ラ) + (#x4d8 . ?リ) + (#x4d9 . ?ル) + (#x4da . ?レ) + (#x4db . ?ロ) + (#x4dc . ?ワ) + (#x4dd . ?ン) + (#x4de . ?゛) + (#x4df . ?゜) ;; Arabic - (#x5ac . ?,G,(B) - (#x5bb . ?,G;(B) - (#x5bf . ?,G?(B) - (#x5c1 . ?,GA(B) - (#x5c2 . ?,GB(B) - (#x5c3 . ?,GC(B) - (#x5c4 . ?,GD(B) - (#x5c5 . ?,GE(B) - (#x5c6 . ?,GF(B) - (#x5c7 . ?,GG(B) - (#x5c8 . ?,GH(B) - (#x5c9 . ?,GI(B) - (#x5ca . ?,GJ(B) - (#x5cb . ?,GK(B) - (#x5cc . ?,GL(B) - (#x5cd . ?,GM(B) - (#x5ce . ?,GN(B) - (#x5cf . ?,GO(B) - (#x5d0 . ?,GP(B) - (#x5d1 . ?,GQ(B) - (#x5d2 . ?,GR(B) - (#x5d3 . ?,GS(B) - (#x5d4 . ?,GT(B) - (#x5d5 . ?,GU(B) - (#x5d6 . ?,GV(B) - (#x5d7 . ?,GW(B) - (#x5d8 . ?,GX(B) - (#x5d9 . ?,GY(B) - (#x5da . ?,GZ(B) - (#x5e0 . ?,G`(B) - (#x5e1 . ?,Ga(B) - (#x5e2 . ?,Gb(B) - (#x5e3 . ?,Gc(B) - (#x5e4 . ?,Gd(B) - (#x5e5 . ?,Ge(B) - (#x5e6 . ?,Gf(B) - (#x5e7 . ?,Gg(B) - (#x5e8 . ?,Gh(B) - (#x5e9 . ?,Gi(B) - (#x5ea . ?,Gj(B) - (#x5eb . ?,Gk(B) - (#x5ec . ?,Gl(B) - (#x5ed . ?,Gm(B) - (#x5ee . ?,Gn(B) - (#x5ef . ?,Go(B) - (#x5f0 . ?,Gp(B) - (#x5f1 . ?,Gq(B) - (#x5f2 . ?,Gr(B) + (#x5ac . ?،) + (#x5bb . ?؛) + (#x5bf . ?؟) + (#x5c1 . ?ء) + (#x5c2 . ?آ) + (#x5c3 . ?أ) + (#x5c4 . ?ؤ) + (#x5c5 . ?إ) + (#x5c6 . ?ئ) + (#x5c7 . ?ا) + (#x5c8 . ?ب) + (#x5c9 . ?ة) + (#x5ca . ?ت) + (#x5cb . ?ث) + (#x5cc . ?ج) + (#x5cd . ?ح) + (#x5ce . ?خ) + (#x5cf . ?د) + (#x5d0 . ?ذ) + (#x5d1 . ?ر) + (#x5d2 . ?ز) + (#x5d3 . ?س) + (#x5d4 . ?ش) + (#x5d5 . ?ص) + (#x5d6 . ?ض) + (#x5d7 . ?ط) + (#x5d8 . ?ظ) + (#x5d9 . ?ع) + (#x5da . ?غ) + (#x5e0 . ?ـ) + (#x5e1 . ?ف) + (#x5e2 . ?ق) + (#x5e3 . ?ك) + (#x5e4 . ?ل) + (#x5e5 . ?م) + (#x5e6 . ?ن) + (#x5e7 . ?ه) + (#x5e8 . ?و) + (#x5e9 . ?ى) + (#x5ea . ?ي) + (#x5eb . ?ً) + (#x5ec . ?ٌ) + (#x5ed . ?ٍ) + (#x5ee . ?َ) + (#x5ef . ?ُ) + (#x5f0 . ?ِ) + (#x5f1 . ?ّ) + (#x5f2 . ?ْ) ;; Cyrillic - (#x680 . ?$,1)R(B) - (#x681 . ?$,1)V(B) - (#x682 . ?$,1)Z(B) - (#x683 . ?$,1)\(B) - (#x684 . ?$,1)b(B) - (#x685 . ?$,1)n(B) - (#x686 . ?$,1)p(B) - (#x687 . ?$,1)r(B) - (#x688 . ?$,1)v(B) - (#x689 . ?$,1)x(B) - (#x68a . ?$,1)z(B) - (#x68c . ?$,1*8(B) - (#x68d . ?$,1*B(B) - (#x68e . ?$,1*H(B) - (#x68f . ?$,1*N(B) - (#x690 . ?$,1)S(B) - (#x691 . ?$,1)W(B) - (#x692 . ?$,1)[(B) - (#x693 . ?$,1)](B) - (#x694 . ?$,1)c(B) - (#x695 . ?$,1)o(B) - (#x696 . ?$,1)q(B) - (#x697 . ?$,1)s(B) - (#x698 . ?$,1)w(B) - (#x699 . ?$,1)y(B) - (#x69a . ?$,1){(B) - (#x69c . ?$,1*9(B) - (#x69d . ?$,1*C(B) - (#x69e . ?$,1*I(B) - (#x69f . ?$,1*O(B) - (#x6a1 . ?,Lr(B) - (#x6a2 . ?,Ls(B) - (#x6a3 . ?,Lq(B) - (#x6a4 . ?,Lt(B) - (#x6a5 . ?,Lu(B) - (#x6a6 . ?,Lv(B) - (#x6a7 . ?,Lw(B) - (#x6a8 . ?,Lx(B) - (#x6a9 . ?,Ly(B) - (#x6aa . ?,Lz(B) - (#x6ab . ?,L{(B) - (#x6ac . ?,L|(B) - (#x6ae . ?,L~(B) - (#x6af . ?,L(B) - (#x6b0 . ?,Lp(B) - (#x6b1 . ?,L"(B) - (#x6b2 . ?,L#(B) - (#x6b3 . ?,L!(B) - (#x6b4 . ?,L$(B) - (#x6b5 . ?,L%(B) - (#x6b6 . ?,L&(B) - (#x6b7 . ?,L'(B) - (#x6b8 . ?,L((B) - (#x6b9 . ?,L)(B) - (#x6ba . ?,L*(B) - (#x6bb . ?,L+(B) - (#x6bc . ?,L,(B) - (#x6be . ?,L.(B) - (#x6bf . ?,L/(B) - (#x6c0 . ?,Ln(B) - (#x6c1 . ?,LP(B) - (#x6c2 . ?,LQ(B) - (#x6c3 . ?,Lf(B) - (#x6c4 . ?,LT(B) - (#x6c5 . ?,LU(B) - (#x6c6 . ?,Ld(B) - (#x6c7 . ?,LS(B) - (#x6c8 . ?,Le(B) - (#x6c9 . ?,LX(B) - (#x6ca . ?,LY(B) - (#x6cb . ?,LZ(B) - (#x6cc . ?,L[(B) - (#x6cd . ?,L\(B) - (#x6ce . ?,L](B) - (#x6cf . ?,L^(B) - (#x6d0 . ?,L_(B) - (#x6d1 . ?,Lo(B) - (#x6d2 . ?,L`(B) - (#x6d3 . ?,La(B) - (#x6d4 . ?,Lb(B) - (#x6d5 . ?,Lc(B) - (#x6d6 . ?,LV(B) - (#x6d7 . ?,LR(B) - (#x6d8 . ?,Ll(B) - (#x6d9 . ?,Lk(B) - (#x6da . ?,LW(B) - (#x6db . ?,Lh(B) - (#x6dc . ?,Lm(B) - (#x6dd . ?,Li(B) - (#x6de . ?,Lg(B) - (#x6df . ?,Lj(B) - (#x6e0 . ?,LN(B) - (#x6e1 . ?,L0(B) - (#x6e2 . ?,L1(B) - (#x6e3 . ?,LF(B) - (#x6e4 . ?,L4(B) - (#x6e5 . ?,L5(B) - (#x6e6 . ?,LD(B) - (#x6e7 . ?,L3(B) - (#x6e8 . ?,LE(B) - (#x6e9 . ?,L8(B) - (#x6ea . ?,L9(B) - (#x6eb . ?,L:(B) - (#x6ec . ?,L;(B) - (#x6ed . ?,L<(B) - (#x6ee . ?,L=(B) - (#x6ef . ?,L>(B) - (#x6f0 . ?,L?(B) - (#x6f1 . ?,LO(B) - (#x6f2 . ?,L@(B) - (#x6f3 . ?,LA(B) - (#x6f4 . ?,LB(B) - (#x6f5 . ?,LC(B) - (#x6f6 . ?,L6(B) - (#x6f7 . ?,L2(B) - (#x6f8 . ?,LL(B) - (#x6f9 . ?,LK(B) - (#x6fa . ?,L7(B) - (#x6fb . ?,LH(B) - (#x6fc . ?,LM(B) - (#x6fd . ?,LI(B) - (#x6fe . ?,LG(B) - (#x6ff . ?,LJ(B) + (#x680 . ?Ғ) + (#x681 . ?Җ) + (#x682 . ?Қ) + (#x683 . ?Ҝ) + (#x684 . ?Ң) + (#x685 . ?Ү) + (#x686 . ?Ұ) + (#x687 . ?Ҳ) + (#x688 . ?Ҷ) + (#x689 . ?Ҹ) + (#x68a . ?Һ) + (#x68c . ?Ә) + (#x68d . ?Ӣ) + (#x68e . ?Ө) + (#x68f . ?Ӯ) + (#x690 . ?ғ) + (#x691 . ?җ) + (#x692 . ?қ) + (#x693 . ?ҝ) + (#x694 . ?ң) + (#x695 . ?ү) + (#x696 . ?ұ) + (#x697 . ?ҳ) + (#x698 . ?ҷ) + (#x699 . ?ҹ) + (#x69a . ?һ) + (#x69c . ?ә) + (#x69d . ?ӣ) + (#x69e . ?ө) + (#x69f . ?ӯ) + (#x6a1 . ?ђ) + (#x6a2 . ?ѓ) + (#x6a3 . ?ё) + (#x6a4 . ?є) + (#x6a5 . ?ѕ) + (#x6a6 . ?і) + (#x6a7 . ?ї) + (#x6a8 . ?ј) + (#x6a9 . ?љ) + (#x6aa . ?њ) + (#x6ab . ?ћ) + (#x6ac . ?ќ) + (#x6ae . ?ў) + (#x6af . ?џ) + (#x6b0 . ?№) + (#x6b1 . ?Ђ) + (#x6b2 . ?Ѓ) + (#x6b3 . ?Ё) + (#x6b4 . ?Є) + (#x6b5 . ?Ѕ) + (#x6b6 . ?І) + (#x6b7 . ?Ї) + (#x6b8 . ?Ј) + (#x6b9 . ?Љ) + (#x6ba . ?Њ) + (#x6bb . ?Ћ) + (#x6bc . ?Ќ) + (#x6be . ?Ў) + (#x6bf . ?Џ) + (#x6c0 . ?ю) + (#x6c1 . ?а) + (#x6c2 . ?б) + (#x6c3 . ?ц) + (#x6c4 . ?д) + (#x6c5 . ?е) + (#x6c6 . ?ф) + (#x6c7 . ?г) + (#x6c8 . ?х) + (#x6c9 . ?и) + (#x6ca . ?й) + (#x6cb . ?к) + (#x6cc . ?л) + (#x6cd . ?м) + (#x6ce . ?н) + (#x6cf . ?о) + (#x6d0 . ?п) + (#x6d1 . ?я) + (#x6d2 . ?р) + (#x6d3 . ?с) + (#x6d4 . ?т) + (#x6d5 . ?у) + (#x6d6 . ?ж) + (#x6d7 . ?в) + (#x6d8 . ?ь) + (#x6d9 . ?ы) + (#x6da . ?з) + (#x6db . ?ш) + (#x6dc . ?э) + (#x6dd . ?щ) + (#x6de . ?ч) + (#x6df . ?ъ) + (#x6e0 . ?Ю) + (#x6e1 . ?А) + (#x6e2 . ?Б) + (#x6e3 . ?Ц) + (#x6e4 . ?Д) + (#x6e5 . ?Е) + (#x6e6 . ?Ф) + (#x6e7 . ?Г) + (#x6e8 . ?Х) + (#x6e9 . ?И) + (#x6ea . ?Й) + (#x6eb . ?К) + (#x6ec . ?Л) + (#x6ed . ?М) + (#x6ee . ?Н) + (#x6ef . ?О) + (#x6f0 . ?П) + (#x6f1 . ?Я) + (#x6f2 . ?Р) + (#x6f3 . ?С) + (#x6f4 . ?Т) + (#x6f5 . ?У) + (#x6f6 . ?Ж) + (#x6f7 . ?В) + (#x6f8 . ?Ь) + (#x6f9 . ?Ы) + (#x6fa . ?З) + (#x6fb . ?Ш) + (#x6fc . ?Э) + (#x6fd . ?Щ) + (#x6fe . ?Ч) + (#x6ff . ?Ъ) ;; Greek - (#x7a1 . ?,F6(B) - (#x7a2 . ?,F8(B) - (#x7a3 . ?,F9(B) - (#x7a4 . ?,F:(B) - (#x7a5 . ?,FZ(B) - (#x7a7 . ?,F<(B) - (#x7a8 . ?,F>(B) - (#x7a9 . ?,F[(B) - (#x7ab . ?,F?(B) - (#x7ae . ?,F5(B) - (#x7af . ?,F/(B) - (#x7b1 . ?,F\(B) - (#x7b2 . ?,F](B) - (#x7b3 . ?,F^(B) - (#x7b4 . ?,F_(B) - (#x7b5 . ?,Fz(B) - (#x7b6 . ?,F@(B) - (#x7b7 . ?,F|(B) - (#x7b8 . ?,F}(B) - (#x7b9 . ?,F{(B) - (#x7ba . ?,F`(B) - (#x7bb . ?,F~(B) - (#x7c1 . ?,FA(B) - (#x7c2 . ?,FB(B) - (#x7c3 . ?,FC(B) - (#x7c4 . ?,FD(B) - (#x7c5 . ?,FE(B) - (#x7c6 . ?,FF(B) - (#x7c7 . ?,FG(B) - (#x7c8 . ?,FH(B) - (#x7c9 . ?,FI(B) - (#x7ca . ?,FJ(B) - (#x7cb . ?,FK(B) - (#x7cc . ?,FL(B) - (#x7cd . ?,FM(B) - (#x7ce . ?,FN(B) - (#x7cf . ?,FO(B) - (#x7d0 . ?,FP(B) - (#x7d1 . ?,FQ(B) - (#x7d2 . ?,FS(B) - (#x7d4 . ?,FT(B) - (#x7d5 . ?,FU(B) - (#x7d6 . ?,FV(B) - (#x7d7 . ?,FW(B) - (#x7d8 . ?,FX(B) - (#x7d9 . ?,FY(B) - (#x7e1 . ?,Fa(B) - (#x7e2 . ?,Fb(B) - (#x7e3 . ?,Fc(B) - (#x7e4 . ?,Fd(B) - (#x7e5 . ?,Fe(B) - (#x7e6 . ?,Ff(B) - (#x7e7 . ?,Fg(B) - (#x7e8 . ?,Fh(B) - (#x7e9 . ?,Fi(B) - (#x7ea . ?,Fj(B) - (#x7eb . ?,Fk(B) - (#x7ec . ?,Fl(B) - (#x7ed . ?,Fm(B) - (#x7ee . ?,Fn(B) - (#x7ef . ?,Fo(B) - (#x7f0 . ?,Fp(B) - (#x7f1 . ?,Fq(B) - (#x7f2 . ?,Fs(B) - (#x7f3 . ?,Fr(B) - (#x7f4 . ?,Ft(B) - (#x7f5 . ?,Fu(B) - (#x7f6 . ?,Fv(B) - (#x7f7 . ?,Fw(B) - (#x7f8 . ?,Fx(B) - (#x7f9 . ?,Fy(B) + (#x7a1 . ?Ά) + (#x7a2 . ?Έ) + (#x7a3 . ?Ή) + (#x7a4 . ?Ί) + (#x7a5 . ?Ϊ) + (#x7a7 . ?Ό) + (#x7a8 . ?Ύ) + (#x7a9 . ?Ϋ) + (#x7ab . ?Ώ) + (#x7ae . ?΅) + (#x7af . ?―) + (#x7b1 . ?ά) + (#x7b2 . ?έ) + (#x7b3 . ?ή) + (#x7b4 . ?ί) + (#x7b5 . ?ϊ) + (#x7b6 . ?ΐ) + (#x7b7 . ?ό) + (#x7b8 . ?ύ) + (#x7b9 . ?ϋ) + (#x7ba . ?ΰ) + (#x7bb . ?ώ) + (#x7c1 . ?Α) + (#x7c2 . ?Β) + (#x7c3 . ?Γ) + (#x7c4 . ?Δ) + (#x7c5 . ?Ε) + (#x7c6 . ?Ζ) + (#x7c7 . ?Η) + (#x7c8 . ?Θ) + (#x7c9 . ?Ι) + (#x7ca . ?Κ) + (#x7cb . ?Λ) + (#x7cc . ?Μ) + (#x7cd . ?Ν) + (#x7ce . ?Ξ) + (#x7cf . ?Ο) + (#x7d0 . ?Π) + (#x7d1 . ?Ρ) + (#x7d2 . ?Σ) + (#x7d4 . ?Τ) + (#x7d5 . ?Υ) + (#x7d6 . ?Φ) + (#x7d7 . ?Χ) + (#x7d8 . ?Ψ) + (#x7d9 . ?Ω) + (#x7e1 . ?α) + (#x7e2 . ?β) + (#x7e3 . ?γ) + (#x7e4 . ?δ) + (#x7e5 . ?ε) + (#x7e6 . ?ζ) + (#x7e7 . ?η) + (#x7e8 . ?θ) + (#x7e9 . ?ι) + (#x7ea . ?κ) + (#x7eb . ?λ) + (#x7ec . ?μ) + (#x7ed . ?ν) + (#x7ee . ?ξ) + (#x7ef . ?ο) + (#x7f0 . ?π) + (#x7f1 . ?ρ) + (#x7f2 . ?σ) + (#x7f3 . ?ς) + (#x7f4 . ?τ) + (#x7f5 . ?υ) + (#x7f6 . ?φ) + (#x7f7 . ?χ) + (#x7f8 . ?ψ) + (#x7f9 . ?ω) ;; Technical - (#x8a1 . ?$,1|W(B) - (#x8a2 . ?$A)0(B) - (#x8a3 . ?$A)$(B) - (#x8a4 . ?$,1{ (B) - (#x8a5 . ?$,1{!(B) - (#x8a6 . ?$A)&(B) - (#x8a7 . ?$,1|A(B) - (#x8a8 . ?$,1|C(B) - (#x8a9 . ?$,1|D(B) - (#x8aa . ?$,1|F(B) - (#x8ab . ?$,1|;(B) - (#x8ac . ?$,1|=(B) - (#x8ad . ?$,1|>(B) - (#x8ae . ?$,1|@(B) - (#x8af . ?$,1|H(B) - (#x8b0 . ?$,1|L(B) - (#x8bc . ?$A!\(B) - (#x8bd . ?$A!Y(B) - (#x8be . ?$A!](B) - (#x8bf . ?$A!R(B) - (#x8c0 . ?$A!`(B) - (#x8c1 . ?$A!X(B) - (#x8c2 . ?$A!^(B) - (#x8c5 . ?$B"`(B) - (#x8c8 . ?$(G"D(B) - (#x8c9 . ?$(O"l(B) - (#x8cd . ?$B"N(B) - (#x8ce . ?$B"M(B) - (#x8cf . ?$A!T(B) - (#x8d6 . ?$A!L(B) - (#x8da . ?$B">(B) - (#x8db . ?$B"?(B) - (#x8dc . ?$A!I(B) - (#x8dd . ?$A!H(B) - (#x8de . ?$A!D(B) - (#x8df . ?$A!E(B) - (#x8ef . ?$B"_(B) - (#x8f6 . ?$,1!R(B) - (#x8fb . ?$A!{(B) - (#x8fc . ?$A!|(B) - (#x8fd . ?$A!z(B) - (#x8fe . ?$A!}(B) + (#x8a1 . ?⎷) + (#x8a2 . ?┌) + (#x8a3 . ?─) + (#x8a4 . ?⌠) + (#x8a5 . ?⌡) + (#x8a6 . ?│) + (#x8a7 . ?⎡) + (#x8a8 . ?⎣) + (#x8a9 . ?⎤) + (#x8aa . ?⎦) + (#x8ab . ?⎛) + (#x8ac . ?⎝) + (#x8ad . ?⎞) + (#x8ae . ?⎠) + (#x8af . ?⎨) + (#x8b0 . ?⎬) + (#x8bc . ?≤) + (#x8bd . ?≠) + (#x8be . ?≥) + (#x8bf . ?∫) + (#x8c0 . ?∴) + (#x8c1 . ?∝) + (#x8c2 . ?∞) + (#x8c5 . ?∇) + (#x8c8 . ?∼) + (#x8c9 . ?≃) + (#x8cd . ?⇔) + (#x8ce . ?⇒) + (#x8cf . ?≡) + (#x8d6 . ?√) + (#x8da . ?⊂) + (#x8db . ?⊃) + (#x8dc . ?∩) + (#x8dd . ?∪) + (#x8de . ?∧) + (#x8df . ?∨) + (#x8ef . ?∂) + (#x8f6 . ?ƒ) + (#x8fb . ?←) + (#x8fc . ?↑) + (#x8fd . ?→) + (#x8fe . ?↓) ;; Special - (#x9e0 . ?$A!t(B) - (#x9e1 . ?$(C"F(B) - (#x9e2 . ?$(GB*(B) - (#x9e3 . ?$(GB-(B) - (#x9e4 . ?$(GB.(B) - (#x9e5 . ?$(GB+(B) - (#x9e8 . ?$,1}d(B) - (#x9e9 . ?$(GB,(B) - (#x9ea . ?$A)<(B) - (#x9eb . ?$A)4(B) - (#x9ec . ?$A)0(B) - (#x9ed . ?$A)8(B) - (#x9ee . ?$A)`(B) - (#x9ef . ?$,1|Z(B) - (#x9f0 . ?$,1|[(B) - (#x9f1 . ?$A)$(B) - (#x9f2 . ?$,1|\(B) - (#x9f3 . ?$,1|](B) - (#x9f4 . ?$A)@(B) - (#x9f5 . ?$A)H(B) - (#x9f6 . ?$A)X(B) - (#x9f7 . ?$A)P(B) - (#x9f8 . ?$A)&(B) + (#x9e0 . ?◆) + (#x9e1 . ?▒) + (#x9e2 . ?␉) + (#x9e3 . ?␌) + (#x9e4 . ?␍) + (#x9e5 . ?␊) + (#x9e8 . ?␤) + (#x9e9 . ?␋) + (#x9ea . ?┘) + (#x9eb . ?┐) + (#x9ec . ?┌) + (#x9ed . ?└) + (#x9ee . ?┼) + (#x9ef . ?⎺) + (#x9f0 . ?⎻) + (#x9f1 . ?─) + (#x9f2 . ?⎼) + (#x9f3 . ?⎽) + (#x9f4 . ?├) + (#x9f5 . ?┤) + (#x9f6 . ?┴) + (#x9f7 . ?┬) + (#x9f8 . ?│) ;; Publishing - (#xaa1 . ?$,1rc(B) - (#xaa2 . ?$,1rb(B) - (#xaa3 . ?$,1rd(B) - (#xaa4 . ?$,1re(B) - (#xaa5 . ?$,1rg(B) - (#xaa6 . ?$,1rh(B) - (#xaa7 . ?$,1ri(B) - (#xaa8 . ?$,1rj(B) - (#xaa9 . ?$(G!7(B) - (#xaaa . ?$(G!9(B) - (#xaae . ?$A!-(B) - (#xaaf . ?$(G!-(B) - (#xab0 . ?$(O'x(B) - (#xab1 . ?$(O'y(B) - (#xab2 . ?$(O'z(B) - (#xab3 . ?$,1v6(B) - (#xab4 . ?$,1v7(B) - (#xab5 . ?$,1v8(B) - (#xab6 . ?$,1v9(B) - (#xab7 . ?$,1v:(B) - (#xab8 . ?$(G""(B) - (#xabb . ?$,1rr(B) - (#xabc . ?$,1{)(B) - (#xabe . ?$,1{*(B) - (#xac3 . ?$(C({(B) - (#xac4 . ?$(C(|(B) - (#xac5 . ?$(C(}(B) - (#xac6 . ?$(C(~(B) - (#xac9 . ?$(D"o(B) - (#xaca . ?$,2"s(B) - (#xacc . ?$(O##(B) - (#xacd . ?$(O#!(B) - (#xace . ?$A!p(B) - (#xacf . ?$,2!o(B) - (#xad0 . ?,F!(B) - (#xad1 . ?,F"(B) - (#xad2 . ?,Y4(B) - (#xad3 . ?,Y!(B) - (#xad4 . ?$,1u^(B) - (#xad6 . ?$A!d(B) - (#xad7 . ?$A!e(B) - (#xad9 . ?$,2%](B) - (#xadb . ?$,2!l(B) - (#xadc . ?$(O#$(B) - (#xadd . ?$(O#"(B) - (#xade . ?$A!q(B) - (#xadf . ?$,2!n(B) - (#xae0 . ?$(O#?(B) - (#xae1 . ?$,2!k(B) - (#xae2 . ?$,2!m(B) - (#xae3 . ?$A!w(B) - (#xae4 . ?$(G!}(B) - (#xae5 . ?$A!n(B) - (#xae6 . ?$(O#@(B) - (#xae7 . ?$,2!j(B) - (#xae8 . ?$A!x(B) - (#xae9 . ?$(G!~(B) - (#xaea . ?$(C"P(B) - (#xaeb . ?$(O-~(B) - (#xaec . ?$(O&@(B) - (#xaed . ?$(O&<(B) - (#xaee . ?$(O&>(B) - (#xaf0 . ?$,2%`(B) - (#xaf1 . ?$B"w(B) - (#xaf2 . ?$B"x(B) - (#xaf3 . ?$(O'{(B) - (#xaf4 . ?$,2%W(B) - (#xaf5 . ?$B"t(B) - (#xaf6 . ?$B"u(B) - (#xaf7 . ?$A!a(B) - (#xaf8 . ?$A!b(B) - (#xaf9 . ?$(O&g(B) - (#xafa . ?$,1zu(B) - (#xafb . ?$,1uW(B) - (#xafc . ?$,1s8(B) - (#xafd . ?$,1rz(B) - (#xafe . ?,Y%(B) + (#xaa1 . ? ) + (#xaa2 . ? ) + (#xaa3 . ? ) + (#xaa4 . ? ) + (#xaa5 . ? ) + (#xaa6 . ? ) + (#xaa7 . ? ) + (#xaa8 . ? ) + (#xaa9 . ?—) + (#xaaa . ?–) + (#xaae . ?…) + (#xaaf . ?‥) + (#xab0 . ?⅓) + (#xab1 . ?⅔) + (#xab2 . ?⅕) + (#xab3 . ?⅖) + (#xab4 . ?⅗) + (#xab5 . ?⅘) + (#xab6 . ?⅙) + (#xab7 . ?⅚) + (#xab8 . ?℅) + (#xabb . ?‒) + (#xabc . ?〈) + (#xabe . ?〉) + (#xac3 . ?⅛) + (#xac4 . ?⅜) + (#xac5 . ?⅝) + (#xac6 . ?⅞) + (#xac9 . ?™) + (#xaca . ?☓) + (#xacc . ?◁) + (#xacd . ?▷) + (#xace . ?○) + (#xacf . ?▯) + (#xad0 . ?‘) + (#xad1 . ?’) + (#xad2 . ?“) + (#xad3 . ?”) + (#xad4 . ?℞) + (#xad6 . ?′) + (#xad7 . ?″) + (#xad9 . ?✝) + (#xadb . ?▬) + (#xadc . ?◀) + (#xadd . ?▶) + (#xade . ?●) + (#xadf . ?▮) + (#xae0 . ?◦) + (#xae1 . ?▫) + (#xae2 . ?▭) + (#xae3 . ?△) + (#xae4 . ?▽) + (#xae5 . ?☆) + (#xae6 . ?•) + (#xae7 . ?▪) + (#xae8 . ?▲) + (#xae9 . ?▼) + (#xaea . ?☜) + (#xaeb . ?☞) + (#xaec . ?♣) + (#xaed . ?♦) + (#xaee . ?♥) + (#xaf0 . ?✠) + (#xaf1 . ?†) + (#xaf2 . ?‡) + (#xaf3 . ?✓) + (#xaf4 . ?✗) + (#xaf5 . ?♯) + (#xaf6 . ?♭) + (#xaf7 . ?♂) + (#xaf8 . ?♀) + (#xaf9 . ?☎) + (#xafa . ?⌕) + (#xafb . ?℗) + (#xafc . ?‸) + (#xafd . ?‚) + (#xafe . ?„) ;; APL (#xba3 . ?<) (#xba6 . ?>) - (#xba8 . ?$A!E(B) - (#xba9 . ?$A!D(B) - (#xbc0 . ?,A/(B) - (#xbc2 . ?$A!M(B) - (#xbc3 . ?$A!I(B) - (#xbc4 . ?$,1zj(B) + (#xba8 . ?∨) + (#xba9 . ?∧) + (#xbc0 . ?¯) + (#xbc2 . ?⊥) + (#xbc3 . ?∩) + (#xbc4 . ?⌊) (#xbc6 . ?_) - (#xbca . ?$,1x8(B) - (#xbcc . ?$,1|5(B) - (#xbce . ?$,1yd(B) - (#xbcf . ?$A!p(B) - (#xbd3 . ?$,1zh(B) - (#xbd6 . ?$A!H(B) - (#xbd8 . ?$B"?(B) - (#xbda . ?$B">(B) - (#xbdc . ?$,1yb(B) - (#xbfc . ?$,1yc(B) + (#xbca . ?∘) + (#xbcc . ?⎕) + (#xbce . ?⊤) + (#xbcf . ?○) + (#xbd3 . ?⌈) + (#xbd6 . ?∪) + (#xbd8 . ?⊃) + (#xbda . ?⊂) + (#xbdc . ?⊢) + (#xbfc . ?⊣) ;; Hebrew - (#xcdf . ?,H_(B) - (#xce0 . ?,H`(B) - (#xce1 . ?,Ha(B) - (#xce2 . ?,Hb(B) - (#xce3 . ?,Hc(B) - (#xce4 . ?,Hd(B) - (#xce5 . ?,He(B) - (#xce6 . ?,Hf(B) - (#xce7 . ?,Hg(B) - (#xce8 . ?,Hh(B) - (#xce9 . ?,Hi(B) - (#xcea . ?,Hj(B) - (#xceb . ?,Hk(B) - (#xcec . ?,Hl(B) - (#xced . ?,Hm(B) - (#xcee . ?,Hn(B) - (#xcef . ?,Ho(B) - (#xcf0 . ?,Hp(B) - (#xcf1 . ?,Hq(B) - (#xcf2 . ?,Hr(B) - (#xcf3 . ?,Hs(B) - (#xcf4 . ?,Ht(B) - (#xcf5 . ?,Hu(B) - (#xcf6 . ?,Hv(B) - (#xcf7 . ?,Hw(B) - (#xcf8 . ?,Hx(B) - (#xcf9 . ?,Hy(B) - (#xcfa . ?,Hz(B) + (#xcdf . ?‗) + (#xce0 . ?א) + (#xce1 . ?ב) + (#xce2 . ?ג) + (#xce3 . ?ד) + (#xce4 . ?ה) + (#xce5 . ?ו) + (#xce6 . ?ז) + (#xce7 . ?ח) + (#xce8 . ?ט) + (#xce9 . ?י) + (#xcea . ?ך) + (#xceb . ?כ) + (#xcec . ?ל) + (#xced . ?ם) + (#xcee . ?מ) + (#xcef . ?ן) + (#xcf0 . ?נ) + (#xcf1 . ?ס) + (#xcf2 . ?ע) + (#xcf3 . ?ף) + (#xcf4 . ?פ) + (#xcf5 . ?ץ) + (#xcf6 . ?צ) + (#xcf7 . ?ק) + (#xcf8 . ?ר) + (#xcf9 . ?ש) + (#xcfa . ?ת) ;; Thai - (#xda1 . ?,T!(B) - (#xda2 . ?,T"(B) - (#xda3 . ?,T#(B) - (#xda4 . ?,T$(B) - (#xda5 . ?,T%(B) - (#xda6 . ?,T&(B) - (#xda7 . ?,T'(B) - (#xda8 . ?,T((B) - (#xda9 . ?,T)(B) - (#xdaa . ?,T*(B) - (#xdab . ?,T+(B) - (#xdac . ?,T,(B) - (#xdad . ?,T-(B) - (#xdae . ?,T.(B) - (#xdaf . ?,T/(B) - (#xdb0 . ?,T0(B) - (#xdb1 . ?,T1(B) - (#xdb2 . ?,T2(B) - (#xdb3 . ?,T3(B) - (#xdb4 . ?,T4(B) - (#xdb5 . ?,T5(B) - (#xdb6 . ?,T6(B) - (#xdb7 . ?,T7(B) - (#xdb8 . ?,T8(B) - (#xdb9 . ?,T9(B) - (#xdba . ?,T:(B) - (#xdbb . ?,T;(B) - (#xdbc . ?,T<(B) - (#xdbd . ?,T=(B) - (#xdbe . ?,T>(B) - (#xdbf . ?,T?(B) - (#xdc0 . ?,T@(B) - (#xdc1 . ?,TA(B) - (#xdc2 . ?,TB(B) - (#xdc3 . ?,TC(B) - (#xdc4 . ?,TD(B) - (#xdc5 . ?,TE(B) - (#xdc6 . ?,TF(B) - (#xdc7 . ?,TG(B) - (#xdc8 . ?,TH(B) - (#xdc9 . ?,TI(B) - (#xdca . ?,TJ(B) - (#xdcb . ?,TK(B) - (#xdcc . ?,TL(B) - (#xdcd . ?,TM(B) - (#xdce . ?,TN(B) - (#xdcf . ?,TO(B) - (#xdd0 . ?,TP(B) - (#xdd1 . ?,TQ(B) - (#xdd2 . ?,TR(B) - (#xdd3 . ?,TS(B) - (#xdd4 . ?,TT(B) - (#xdd5 . ?,TU(B) - (#xdd6 . ?,TV(B) - (#xdd7 . ?,TW(B) - (#xdd8 . ?,TX(B) - (#xdd9 . ?,TY(B) - (#xdda . ?,TZ(B) - (#xddf . ?,T_(B) - (#xde0 . ?,T`(B) - (#xde1 . ?,Ta(B) - (#xde2 . ?,Tb(B) - (#xde3 . ?,Tc(B) - (#xde4 . ?,Td(B) - (#xde5 . ?,Te(B) - (#xde6 . ?,Tf(B) - (#xde7 . ?,Tg(B) - (#xde8 . ?,Th(B) - (#xde9 . ?,Ti(B) - (#xdea . ?,Tj(B) - (#xdeb . ?,Tk(B) - (#xdec . ?,Tl(B) - (#xded . ?,Tm(B) - (#xdf0 . ?,Tp(B) - (#xdf1 . ?,Tq(B) - (#xdf2 . ?,Tr(B) - (#xdf3 . ?,Ts(B) - (#xdf4 . ?,Tt(B) - (#xdf5 . ?,Tu(B) - (#xdf6 . ?,Tv(B) - (#xdf7 . ?,Tw(B) - (#xdf8 . ?,Tx(B) - (#xdf9 . ?,Ty(B) + (#xda1 . ?ก) + (#xda2 . ?ข) + (#xda3 . ?ฃ) + (#xda4 . ?ค) + (#xda5 . ?ฅ) + (#xda6 . ?ฆ) + (#xda7 . ?ง) + (#xda8 . ?จ) + (#xda9 . ?ฉ) + (#xdaa . ?ช) + (#xdab . ?ซ) + (#xdac . ?ฌ) + (#xdad . ?ญ) + (#xdae . ?ฎ) + (#xdaf . ?ฏ) + (#xdb0 . ?ฐ) + (#xdb1 . ?ฑ) + (#xdb2 . ?ฒ) + (#xdb3 . ?ณ) + (#xdb4 . ?ด) + (#xdb5 . ?ต) + (#xdb6 . ?ถ) + (#xdb7 . ?ท) + (#xdb8 . ?ธ) + (#xdb9 . ?น) + (#xdba . ?บ) + (#xdbb . ?ป) + (#xdbc . ?ผ) + (#xdbd . ?ฝ) + (#xdbe . ?พ) + (#xdbf . ?ฟ) + (#xdc0 . ?ภ) + (#xdc1 . ?ม) + (#xdc2 . ?ย) + (#xdc3 . ?ร) + (#xdc4 . ?ฤ) + (#xdc5 . ?ล) + (#xdc6 . ?ฦ) + (#xdc7 . ?ว) + (#xdc8 . ?ศ) + (#xdc9 . ?ษ) + (#xdca . ?ส) + (#xdcb . ?ห) + (#xdcc . ?ฬ) + (#xdcd . ?อ) + (#xdce . ?ฮ) + (#xdcf . ?ฯ) + (#xdd0 . ?ะ) + (#xdd1 . ?ั) + (#xdd2 . ?า) + (#xdd3 . ?ำ) + (#xdd4 . ?ิ) + (#xdd5 . ?ี) + (#xdd6 . ?ึ) + (#xdd7 . ?ื) + (#xdd8 . ?ุ) + (#xdd9 . ?ู) + (#xdda . ?ฺ) + (#xddf . ?฿) + (#xde0 . ?เ) + (#xde1 . ?แ) + (#xde2 . ?โ) + (#xde3 . ?ใ) + (#xde4 . ?ไ) + (#xde5 . ?ๅ) + (#xde6 . ?ๆ) + (#xde7 . ?็) + (#xde8 . ?่) + (#xde9 . ?้) + (#xdea . ?๊) + (#xdeb . ?๋) + (#xdec . ?์) + (#xded . ?ํ) + (#xdf0 . ?๐) + (#xdf1 . ?๑) + (#xdf2 . ?๒) + (#xdf3 . ?๓) + (#xdf4 . ?๔) + (#xdf5 . ?๕) + (#xdf6 . ?๖) + (#xdf7 . ?๗) + (#xdf8 . ?๘) + (#xdf9 . ?๙) ;; Korean - (#xea1 . ?$(C$!(B) - (#xea2 . ?$(C$"(B) - (#xea3 . ?$(C$#(B) - (#xea4 . ?$(C$$(B) - (#xea5 . ?$(C$%(B) - (#xea6 . ?$(C$&(B) - (#xea7 . ?$(C$'(B) - (#xea8 . ?$(C$((B) - (#xea9 . ?$(C$)(B) - (#xeaa . ?$(C$*(B) - (#xeab . ?$(C$+(B) - (#xeac . ?$(C$,(B) - (#xead . ?$(C$-(B) - (#xeae . ?$(C$.(B) - (#xeaf . ?$(C$/(B) - (#xeb0 . ?$(C$0(B) - (#xeb1 . ?$(C$1(B) - (#xeb2 . ?$(C$2(B) - (#xeb3 . ?$(C$3(B) - (#xeb4 . ?$(C$4(B) - (#xeb5 . ?$(C$5(B) - (#xeb6 . ?$(C$6(B) - (#xeb7 . ?$(C$7(B) - (#xeb8 . ?$(C$8(B) - (#xeb9 . ?$(C$9(B) - (#xeba . ?$(C$:(B) - (#xebb . ?$(C$;(B) - (#xebc . ?$(C$<(B) - (#xebd . ?$(C$=(B) - (#xebe . ?$(C$>(B) - (#xebf . ?$(C$?(B) - (#xec0 . ?$(C$@(B) - (#xec1 . ?$(C$A(B) - (#xec2 . ?$(C$B(B) - (#xec3 . ?$(C$C(B) - (#xec4 . ?$(C$D(B) - (#xec5 . ?$(C$E(B) - (#xec6 . ?$(C$F(B) - (#xec7 . ?$(C$G(B) - (#xec8 . ?$(C$H(B) - (#xec9 . ?$(C$I(B) - (#xeca . ?$(C$J(B) - (#xecb . ?$(C$K(B) - (#xecc . ?$(C$L(B) - (#xecd . ?$(C$M(B) - (#xece . ?$(C$N(B) - (#xecf . ?$(C$O(B) - (#xed0 . ?$(C$P(B) - (#xed1 . ?$(C$Q(B) - (#xed2 . ?$(C$R(B) - (#xed3 . ?$(C$S(B) - (#xed4 . ?$,1LH(B) - (#xed5 . ?$,1LI(B) - (#xed6 . ?$,1LJ(B) - (#xed7 . ?$,1LK(B) - (#xed8 . ?$,1LL(B) - (#xed9 . ?$,1LM(B) - (#xeda . ?$,1LN(B) - (#xedb . ?$,1LO(B) - (#xedc . ?$,1LP(B) - (#xedd . ?$,1LQ(B) - (#xede . ?$,1LR(B) - (#xedf . ?$,1LS(B) - (#xee0 . ?$,1LT(B) - (#xee1 . ?$,1LU(B) - (#xee2 . ?$,1LV(B) - (#xee3 . ?$,1LW(B) - (#xee4 . ?$,1LX(B) - (#xee5 . ?$,1LY(B) - (#xee6 . ?$,1LZ(B) - (#xee7 . ?$,1L[(B) - (#xee8 . ?$,1L\(B) - (#xee9 . ?$,1L](B) - (#xeea . ?$,1L^(B) - (#xeeb . ?$,1L_(B) - (#xeec . ?$,1L`(B) - (#xeed . ?$,1La(B) - (#xeee . ?$,1Lb(B) - (#xeef . ?$(C$](B) - (#xef0 . ?$(C$a(B) - (#xef1 . ?$(C$h(B) - (#xef2 . ?$(C$o(B) - (#xef3 . ?$(C$q(B) - (#xef4 . ?$(C$t(B) - (#xef5 . ?$(C$v(B) - (#xef6 . ?$(C$}(B) - (#xef7 . ?$(C$~(B) - (#xef8 . ?$,1M+(B) - (#xef9 . ?$,1M0(B) - (#xefa . ?$,1M9(B) - (#xeff . ?$,1tI(B) + (#xea1 . ?ㄱ) + (#xea2 . ?ㄲ) + (#xea3 . ?ㄳ) + (#xea4 . ?ㄴ) + (#xea5 . ?ㄵ) + (#xea6 . ?ㄶ) + (#xea7 . ?ㄷ) + (#xea8 . ?ㄸ) + (#xea9 . ?ㄹ) + (#xeaa . ?ㄺ) + (#xeab . ?ㄻ) + (#xeac . ?ㄼ) + (#xead . ?ㄽ) + (#xeae . ?ㄾ) + (#xeaf . ?ㄿ) + (#xeb0 . ?ㅀ) + (#xeb1 . ?ㅁ) + (#xeb2 . ?ㅂ) + (#xeb3 . ?ㅃ) + (#xeb4 . ?ㅄ) + (#xeb5 . ?ㅅ) + (#xeb6 . ?ㅆ) + (#xeb7 . ?ㅇ) + (#xeb8 . ?ㅈ) + (#xeb9 . ?ㅉ) + (#xeba . ?ㅊ) + (#xebb . ?ㅋ) + (#xebc . ?ㅌ) + (#xebd . ?ㅍ) + (#xebe . ?ㅎ) + (#xebf . ?ㅏ) + (#xec0 . ?ㅐ) + (#xec1 . ?ㅑ) + (#xec2 . ?ㅒ) + (#xec3 . ?ㅓ) + (#xec4 . ?ㅔ) + (#xec5 . ?ㅕ) + (#xec6 . ?ㅖ) + (#xec7 . ?ㅗ) + (#xec8 . ?ㅘ) + (#xec9 . ?ㅙ) + (#xeca . ?ㅚ) + (#xecb . ?ㅛ) + (#xecc . ?ㅜ) + (#xecd . ?ㅝ) + (#xece . ?ㅞ) + (#xecf . ?ㅟ) + (#xed0 . ?ㅠ) + (#xed1 . ?ㅡ) + (#xed2 . ?ㅢ) + (#xed3 . ?ㅣ) + (#xed4 . ?ᆨ) + (#xed5 . ?ᆩ) + (#xed6 . ?ᆪ) + (#xed7 . ?ᆫ) + (#xed8 . ?ᆬ) + (#xed9 . ?ᆭ) + (#xeda . ?ᆮ) + (#xedb . ?ᆯ) + (#xedc . ?ᆰ) + (#xedd . ?ᆱ) + (#xede . ?ᆲ) + (#xedf . ?ᆳ) + (#xee0 . ?ᆴ) + (#xee1 . ?ᆵ) + (#xee2 . ?ᆶ) + (#xee3 . ?ᆷ) + (#xee4 . ?ᆸ) + (#xee5 . ?ᆹ) + (#xee6 . ?ᆺ) + (#xee7 . ?ᆻ) + (#xee8 . ?ᆼ) + (#xee9 . ?ᆽ) + (#xeea . ?ᆾ) + (#xeeb . ?ᆿ) + (#xeec . ?ᇀ) + (#xeed . ?ᇁ) + (#xeee . ?ᇂ) + (#xeef . ?ㅭ) + (#xef0 . ?ㅱ) + (#xef1 . ?ㅸ) + (#xef2 . ?ㅿ) + (#xef3 . ?ㆁ) + (#xef4 . ?ㆄ) + (#xef5 . ?ㆆ) + (#xef6 . ?ㆍ) + (#xef7 . ?ㆎ) + (#xef8 . ?ᇫ) + (#xef9 . ?ᇰ) + (#xefa . ?ᇹ) + (#xeff . ?₩) ;; Latin-5 ;; Latin-6 ;; Latin-7 ;; Latin-8 ;; Latin-9 - (#x13bc . ?,b<(B) - (#x13bd . ?,b=(B) - (#x13be . ?,_/(B) + (#x13bc . ?Œ) + (#x13bd . ?œ) + (#x13be . ?Ÿ) ;; Currency - (#x20a0 . ?$,1t@(B) - (#x20a1 . ?$,1tA(B) - (#x20a2 . ?$,1tB(B) - (#x20a3 . ?$,1tC(B) - (#x20a4 . ?$,1tD(B) - (#x20a5 . ?$,1tE(B) - (#x20a6 . ?$,1tF(B) - (#x20a7 . ?$,1tG(B) - (#x20a8 . ?$,1tH(B) - (#x20aa . ?$,1tJ(B) - (#x20ab . ?$,1tK(B) - ;; Kana: Fixme: needs checking. Using Emacs to convert this to Unicode - ;; and back changes this from ",b$(B" (i.e., bytes "ESC , b $ ESC ( B") to - ;; ",F$(B" (i.e., bytes "ESC , F $ ESC ( B"). - (#x20ac . ?,b$(B))) + (#x20a0 . ?₠) + (#x20a1 . ?₡) + (#x20a2 . ?₢) + (#x20a3 . ?₣) + (#x20a4 . ?₤) + (#x20a5 . ?₥) + (#x20a6 . ?₦) + (#x20a7 . ?₧) + (#x20a8 . ?₨) + (#x20aa . ?₪) + (#x20ab . ?₫) + (#x20ac . ?€))) (puthash (car pair) (cdr pair) x-keysym-table)) ;; The following keysym codes for graphics are listed in the document commit cd671c6a1b5bdcc8b3e99d783ddfe037c2728428 Author: Eli Zaretskii Date: Sun Aug 16 17:36:13 2015 +0300 ; ChangeLog.2: Fix the entry about deleting makefile.w32-in diff --git a/ChangeLog.2 b/ChangeLog.2 index 422dd0b..27b4916 100644 --- a/ChangeLog.2 +++ b/ChangeLog.2 @@ -66,6 +66,25 @@ strings. (Bug#21263) Remove files used by the old MS-Windows specific build procedure + * admin/unidata/makefile.w32-in: + * doc/emacs/makefile.w32-in: + * doc/lispintro/makefile.w32-in: + * doc/lispref/makefile.w32-in: + * doc/misc/makefile.w32-in: + * leim/makefile.w32-in: + * lib-src/makefile.w32-in: + * lib/makefile.w32-in: + * lisp/makefile.w32-in: + * nt/INSTALL.OLD: + * nt/config.nt: + * nt/emacs-src.tags: + * nt/envadd.bat: + * nt/gmake.defs: + * nt/makefile.w32-in: + * nt/multi-install-info.bat: + * nt/nmake.defs: + * nt/paths.h: + * src/makefile.w32-in: Files deleted. * nt/configure.bat: Remove everything except the blurb about the new build procedure. * make-dist: Remove references to makefile.w32-in in various commit 6bfde469c6f4f7d9bcda329f3d72140bba8dce33 Author: Wilson Snyder Date: Sun Aug 16 08:44:16 2015 -0400 Update verilog-mode.el to 2015-05-14-6232468-vpo-GNU. * losp/progmodes/verilog-mode.el: Fix some non-automated indent issues and comments, bug943. (verilog-type-font-keywords): Cycle delay operators like ##1 and ##[0:$] are now highlighted in their entirety similarly to the # delay-control operator. Likewise, the followed-by operators #-# and #=# are no longer partially highlighed. (verilog-backward-syntactic-ws-quick, verilog-skip-backward-comments): Minor performance improvements to buffer traversal functions for reduced latency. (verilog-calc-1, verilog-in-deferred-immediate-final-p): When the keyword 'final' follows 'assert/assume/cover', then it is part of a deferred immediate assertion item and should not be treated as a final construct for indentation. Reported by Yuri Sugihara. (verilog-do-indent): Virtual task/function/class definition lines should not be considered as declarations. Reported by Enzo Chi. (verilog-do-indent): Do not falsely indent to '=' of property/sequence operators on subsequent lines of a multi-line statement. (verilog-assignment-operator-re): Fix '!==' operator and add support for '<->', ':/', '#-#', and '#=#' operators. (verilog-calculate-indent, verilog-label-be): Enable case-sensitive regular expression parsing when looking for keywords. (verilog-calc-1): Detect 'pure virtual method' declarations which exist in abstract classes. Reported by Enzo Chi and Kaushal Modi. (verilog-backward-ws&directives): When moving back to the start of a line and the preceeding line ended with an escaped-newline, then jump up one line. This properly consumes a multi-line pre-processor directive. Reported by Kaushal Modi. (verilog-dpi-import-export-re, verilog-extended-complete-re, verilog-calc-1): Teach verilog-mode to properly indent after a DPI import/export statement that resides outside of a module. Reported by Kaushal Modi. (verilog-extended-complete-re): Update regexp to match both "DPI-C" and "DPI". Reported by Kaushal Modi. diff --git a/lisp/progmodes/verilog-mode.el b/lisp/progmodes/verilog-mode.el index 93572d9..3ce185f 100644 --- a/lisp/progmodes/verilog-mode.el +++ b/lisp/progmodes/verilog-mode.el @@ -77,8 +77,8 @@ ;; the following in code (please un comment it first!) in your ;; .emacs, or in your site's site-load.el -; (autoload 'verilog-mode "verilog-mode" "Verilog mode" t ) -; (add-to-list 'auto-mode-alist '("\\.[ds]?vh?\\'" . verilog-mode)) +;; (autoload 'verilog-mode "verilog-mode" "Verilog mode" t ) +;; (add-to-list 'auto-mode-alist '("\\.[ds]?vh?\\'" . verilog-mode)) ;; Be sure to examine at the help for verilog-auto, and the other ;; verilog-auto-* functions for some major coding time savers. @@ -92,38 +92,38 @@ ;; in Local Variables in every file. Otherwise, different people's ;; AUTO expansion may result different whitespace changes. ;; -; ;; Enable syntax highlighting of **all** languages -; (global-font-lock-mode t) -; -; ;; User customization for Verilog mode -; (setq verilog-indent-level 3 -; verilog-indent-level-module 3 -; verilog-indent-level-declaration 3 -; verilog-indent-level-behavioral 3 -; verilog-indent-level-directive 1 -; verilog-case-indent 2 -; verilog-auto-newline t -; verilog-auto-indent-on-newline t -; verilog-tab-always-indent t -; verilog-auto-endcomments t -; verilog-minimum-comment-distance 40 -; verilog-indent-begin-after-if t -; verilog-auto-lineup 'declarations -; verilog-highlight-p1800-keywords nil -; verilog-linter "my_lint_shell_command" -; ) - -;; +;; ;; Enable syntax highlighting of **all** languages +;; (global-font-lock-mode t) +;; +;; ;; User customization for Verilog mode +;; (setq verilog-indent-level 3 +;; verilog-indent-level-module 3 +;; verilog-indent-level-declaration 3 +;; verilog-indent-level-behavioral 3 +;; verilog-indent-level-directive 1 +;; verilog-case-indent 2 +;; verilog-auto-newline t +;; verilog-auto-indent-on-newline t +;; verilog-tab-always-indent t +;; verilog-auto-endcomments t +;; verilog-minimum-comment-distance 40 +;; verilog-indent-begin-after-if t +;; verilog-auto-lineup 'declarations +;; verilog-highlight-p1800-keywords nil +;; verilog-linter "my_lint_shell_command" +;; ) + ;;; History: ;; ;; See commit history at http://www.veripool.org/verilog-mode.html ;; (This section is required to appease checkdoc.) ;;; Code: +;; ;; This variable will always hold the version number of the mode -(defconst verilog-mode-version "2015-05-14-6232468-vpo-GNU" +(defconst verilog-mode-version "2015-08-16-ce03c7a-vpo-GNU" "Version of this Verilog mode.") (defconst verilog-mode-release-emacs t "If non-nil, this version of Verilog mode was released with Emacs itself.") @@ -150,36 +150,36 @@ (error nil)) (condition-case nil (if (fboundp 'when) - nil ;; fab + nil ; fab (defmacro when (cond &rest body) (list 'if cond (cons 'progn body)))) (error nil)) (condition-case nil (if (fboundp 'unless) - nil ;; fab + nil ; fab (defmacro unless (cond &rest body) (cons 'if (cons cond (cons nil body))))) (error nil)) (condition-case nil (if (fboundp 'store-match-data) - nil ;; fab + nil ; fab (defmacro store-match-data (&rest _args) nil)) (error nil)) (condition-case nil (if (fboundp 'char-before) - nil ;; great + nil ; great (defmacro char-before (&rest _body) (char-after (1- (point))))) (error nil)) (condition-case nil (if (fboundp 'when) - nil ;; fab + nil ; fab (defsubst point-at-bol (&optional N) (save-excursion (beginning-of-line N) (point)))) (error nil)) (condition-case nil (if (fboundp 'when) - nil ;; fab + nil ; fab (defsubst point-at-eol (&optional N) (save-excursion (end-of-line N) (point)))) (error nil)) @@ -188,7 +188,7 @@ (error nil)) (condition-case nil (if (fboundp 'match-string-no-properties) - nil ;; great + nil ; great (defsubst match-string-no-properties (num &optional string) "Return string of text matched by last search, without text properties. NUM specifies which parenthesized expression in the last regexp. @@ -208,7 +208,7 @@ STRING should be given if the last search was by `string-match' on STRING." ) (error nil)) (if (and (featurep 'custom) (fboundp 'custom-declare-variable)) - nil ;; We've got what we needed + nil ; We've got what we needed ;; We have the old custom-library, hack around it! (defmacro defgroup (&rest _args) nil) (defmacro customize (&rest _args) @@ -224,7 +224,7 @@ STRING should be given if the last search was by `string-match' on STRING." ) (if (and (featurep 'custom) (fboundp 'customize-group)) - nil ;; We've got what we needed + nil ; We've got what we needed ;; We have an intermediate custom-library, hack around it! (defmacro customize-group (var &rest _args) `(customize ,var)) @@ -254,16 +254,16 @@ STRING should be given if the last search was by `string-match' on STRING." (if (fboundp 'function-max-args) (let ((args (function-max-args `regexp-opt))) (cond - ((eq args 3) ;; It takes 3 + ((eq args 3) ; It takes 3 (condition-case nil ; Hide this defun from emacses - ;with just a two input regexp + ; with just a two input regexp (defun verilog-regexp-opt (a b) "Deal with differing number of required arguments for `regexp-opt'. Call `regexp-opt' on A and B." (regexp-opt a b t)) (error nil)) ) - ((eq args 2) ;; It takes 2 + ((eq args 2) ; It takes 2 (defun verilog-regexp-opt (a b) "Call `regexp-opt' on A and B." (regexp-opt a b)) @@ -307,35 +307,35 @@ LIMIT. As a general recommendation, try to avoid using `looking-back' wherever possible, since it is slow." - (let ((start (point)) - (pos - (save-excursion - (and (re-search-backward (concat "\\(?:" regexp "\\)\\=") limit t) - (point))))) - (if (and greedy pos) - (save-restriction - (narrow-to-region (point-min) start) - (while (and (> pos (point-min)) - (save-excursion - (goto-char pos) - (backward-char 1) - (looking-at (concat "\\(?:" regexp "\\)\\'")))) - (setq pos (1- pos))) - (save-excursion - (goto-char pos) - (looking-at (concat "\\(?:" regexp "\\)\\'"))))) - (not (null pos))))))) + (let ((start (point)) + (pos + (save-excursion + (and (re-search-backward (concat "\\(?:" regexp "\\)\\=") limit t) + (point))))) + (if (and greedy pos) + (save-restriction + (narrow-to-region (point-min) start) + (while (and (> pos (point-min)) + (save-excursion + (goto-char pos) + (backward-char 1) + (looking-at (concat "\\(?:" regexp "\\)\\'")))) + (setq pos (1- pos))) + (save-excursion + (goto-char pos) + (looking-at (concat "\\(?:" regexp "\\)\\'"))))) + (not (null pos))))))) (eval-and-compile ;; Both xemacs and emacs (condition-case nil - (require 'diff) ;; diff-command and diff-switches + (require 'diff) ; diff-command and diff-switches (error nil)) (condition-case nil - (require 'compile) ;; compilation-error-regexp-alist-alist + (require 'compile) ; compilation-error-regexp-alist-alist (error nil)) (condition-case nil - (unless (fboundp 'buffer-chars-modified-tick) ;; Emacs 22 added + (unless (fboundp 'buffer-chars-modified-tick) ; Emacs 22 added (defmacro buffer-chars-modified-tick () (buffer-modified-tick))) (error nil)) ;; Added in Emacs 24.1 @@ -356,7 +356,7 @@ wherever possible, since it is slow." (defun verilog-easy-menu-filter (menu) "Filter `easy-menu-define' MENU to support new features." (cond ((not (featurep 'xemacs)) - menu) ;; GNU Emacs - passthru + menu) ; GNU Emacs - passthru ;; XEmacs doesn't support :help. Strip it. ;; Recursively filter the a submenu ((listp menu) @@ -370,7 +370,7 @@ wherever possible, since it is slow." (setq out (vconcat out (vector (aref menu i))) i (1+ i)))) out)) - (t menu))) ;; Default - ok + (t menu))) ; Default - ok ;;(verilog-easy-menu-filter ;; `("Verilog" ("MA" ["SAA" nil :help "Help SAA"] ["SAB" nil :help "Help SAA"]) ;; "----" ["MB" nil :help "Help MB"])) @@ -439,10 +439,10 @@ Set `verilog-in-hooks' during this time, to assist AUTO caches." :version "22.2" :group 'languages) -; (defgroup verilog-mode-fonts nil -; "Facilitates easy customization fonts used in Verilog source text" -; :link '(customize-apropos "font-lock-*" 'faces) -; :group 'verilog-mode) +;; (defgroup verilog-mode-fonts nil +;; "Facilitates easy customization fonts used in Verilog source text" +;; :link '(customize-apropos "font-lock-*" 'faces) +;; :group 'verilog-mode) (defgroup verilog-mode-indent nil "Customize indentation and highlighting of Verilog source text." @@ -736,7 +736,7 @@ file referenced. If false, this is not supported." Set this to \"wire\" if the Verilog code uses \"\\=`default_nettype none\". Note using \\=`default_nettype none isn't recommended practice; this mode is experimental." - :version "24.1" ;; rev670 + :version "24.1" ; rev670 :group 'verilog-mode-actions :type 'boolean) (put 'verilog-auto-declare-nettype 'safe-local-variable `stringp) @@ -744,7 +744,7 @@ mode is experimental." (defcustom verilog-auto-wire-type nil "Non-nil specifies the data type to use with `verilog-auto-wire' etc. Set this to \"logic\" for SystemVerilog code, or use `verilog-auto-logic'." - :version "24.1" ;; rev673 + :version "24.1" ; rev673 :group 'verilog-mode-actions :type 'boolean) (put 'verilog-auto-wire-type 'safe-local-variable `stringp) @@ -758,7 +758,7 @@ The name of the function or case will be set between the braces." (defcustom verilog-auto-delete-trailing-whitespace nil "Non-nil means to `delete-trailing-whitespace' in `verilog-auto'." - :version "24.1" ;; rev703 + :version "24.1" ; rev703 :group 'verilog-mode-actions :type 'boolean) (put 'verilog-auto-delete-trailing-whitespace 'safe-local-variable 'verilog-booleanp) @@ -827,8 +827,11 @@ Function takes three arguments, the original buffer, the difference buffer, and the point in original buffer with the first difference.") -;;; Compile support +;;; Compile support: +;; + (require 'compile) + (defvar verilog-error-regexp-added nil) (defvar verilog-error-regexp-emacs-alist @@ -1037,7 +1040,7 @@ If nil, all blocking assigned signals are ignored when any non-blocking assignment is in the AUTORESET block. This allows blocking assignments to be used for temporary values and not have those temporaries reset. See example in `verilog-auto-reset'." - :version "24.1" ;; rev718 + :version "24.1" ; rev718 :type 'boolean :group 'verilog-mode-auto) (put 'verilog-auto-reset-blocking-in-non 'safe-local-variable 'verilog-booleanp) @@ -1146,7 +1149,7 @@ declared together to remain together. Sorted order reduces changes when declarations are moved around in a file. See also `verilog-auto-arg-sort'." - :version "24.1" ;; rev688 + :version "24.1" ; rev688 :group 'verilog-mode-auto :type 'boolean) (put 'verilog-auto-inst-sort 'safe-local-variable 'verilog-booleanp) @@ -1186,7 +1189,7 @@ won't merge conflict." (defcustom verilog-auto-inst-interfaced-ports nil "Non-nil means include interfaced ports in AUTOINST expansions." - :version "24.3" ;; rev773, default change rev815 + :version "24.3" ; rev773, default change rev815 :group 'verilog-mode-auto :type 'boolean) (put 'verilog-auto-inst-interfaced-ports 'safe-local-variable 'verilog-booleanp) @@ -1215,7 +1218,7 @@ See the \\[verilog-faq] for examples on using this." (defcustom verilog-auto-template-warn-unused nil "Non-nil means report warning if an AUTO_TEMPLATE line is not used. This feature is not supported before Emacs 21.1 or XEmacs 21.4." - :version "24.3" ;;rev787 + :version "24.3" ; rev787 :group 'verilog-mode-auto :type 'boolean) (put 'verilog-auto-template-warn-unused 'safe-local-variable 'verilog-booleanp) @@ -1224,7 +1227,7 @@ This feature is not supported before Emacs 21.1 or XEmacs 21.4." "Data type used for the declaration for AUTOTIEOFF. If \"wire\" then create a wire, if \"assign\" create an assignment, else the data type for variable creation." - :version "24.1" ;; rev713 + :version "24.1" ; rev713 :group 'verilog-mode-auto :type 'string) (put 'verilog-auto-tieoff-declaration 'safe-local-variable 'stringp) @@ -1296,13 +1299,13 @@ See also `verilog-case-fold'." (defcustom verilog-before-save-font-hook nil "Hook run before `verilog-save-font-mods' removes highlighting." - :version "24.3" ;;rev735 + :version "24.3" ; rev735 :group 'verilog-mode-auto :type 'hook) (defcustom verilog-after-save-font-hook nil "Hook run after `verilog-save-font-mods' restores highlighting." - :version "24.3" ;;rev735 + :version "24.3" ; rev735 :group 'verilog-mode-auto :type 'hook) @@ -1330,6 +1333,9 @@ If set will become buffer local.") If set will become buffer local.") (make-variable-buffer-local 'verilog-project) +;;; Keymap and Menu: +;; + (defvar verilog-mode-map (let ((map (make-sparse-keymap))) (define-key map ";" 'electric-verilog-semi) @@ -1697,7 +1703,7 @@ will break, as the o's continuously replace. xa -> x works ok though." (defsubst verilog-re-search-forward (REGEXP BOUND NOERROR) ;; checkdoc-params: (REGEXP BOUND NOERROR) "Like `re-search-forward', but skips over match in comments or strings." - (let ((mdata '(nil nil))) ;; So match-end will return nil if no matches found + (let ((mdata '(nil nil))) ; So match-end will return nil if no matches found (while (and (re-search-forward REGEXP BOUND NOERROR) (setq mdata (match-data)) @@ -1713,7 +1719,7 @@ will break, as the o's continuously replace. xa -> x works ok though." (defsubst verilog-re-search-backward (REGEXP BOUND NOERROR) ;; checkdoc-params: (REGEXP BOUND NOERROR) "Like `re-search-backward', but skips over match in comments or strings." - (let ((mdata '(nil nil))) ;; So match-end will return nil if no matches found + (let ((mdata '(nil nil))) ; So match-end will return nil if no matches found (while (and (re-search-backward REGEXP BOUND NOERROR) (setq mdata (match-data)) @@ -1735,7 +1741,7 @@ so there may be a large up front penalty for the first search." (while (and (not pt) (re-search-forward regexp bound noerror)) (if (verilog-inside-comment-or-string-p) - (re-search-forward "[/\"\n]" nil t) ;; Only way a comment or quote can end + (re-search-forward "[/\"\n]" nil t) ; Only way a comment or quote can end (setq pt (match-end 0)))) pt)) @@ -1749,7 +1755,7 @@ so there may be a large up front penalty for the first search." (while (and (not pt) (re-search-backward regexp bound noerror)) (if (verilog-inside-comment-or-string-p) - (re-search-backward "[/\"]" nil t) ;; Only way a comment or quote can begin + (re-search-backward "[/\"]" nil t) ; Only way a comment or quote can begin (setq pt (match-beginning 0)))) pt)) @@ -1771,7 +1777,7 @@ This speeds up complicated regexp matches." (setq done nil))) (when done (goto-char done)) done)) -;;(verilog-re-search-forward-substr "-end" "get-end-of" nil t) ;;-end (test bait) +;;(verilog-re-search-forward-substr "-end" "get-end-of" nil t) ; -end (test bait) (defsubst verilog-re-search-backward-substr (substr regexp bound noerror) "Like `re-search-backward', but first search for SUBSTR constant. @@ -1791,7 +1797,7 @@ This speeds up complicated regexp matches." (setq done nil))) (when done (goto-char done)) done)) -;;(verilog-re-search-backward-substr "-end" "get-end-of" nil t) ;;-end (test bait) +;;(verilog-re-search-backward-substr "-end" "get-end-of" nil t) ; -end (test bait) (defun verilog-delete-trailing-whitespace () "Delete trailing spaces or tabs, but not newlines nor linefeeds. @@ -1803,13 +1809,13 @@ To call on \\[verilog-auto], set `verilog-auto-delete-trailing-whitespace'." ;; Similar to `delete-trailing-whitespace' but that's not present in XEmacs (save-excursion (goto-char (point-min)) - (while (re-search-forward "[ \t]+$" nil t) ;; Not syntactic WS as no formfeed + (while (re-search-forward "[ \t]+$" nil t) ; Not syntactic WS as no formfeed (replace-match "" nil nil)) (goto-char (point-max)) (unless (bolp) (insert "\n")))) (defvar compile-command) -(defvar create-lockfiles) ;; Emacs 24 +(defvar create-lockfiles) ; Emacs 24 ;; compilation program (defun verilog-set-compile-command () @@ -1867,7 +1873,7 @@ be substituted." t t command)) (setq command (verilog-string-replace-matches "\\b__FILE__\\b" (file-name-nondirectory - (or (buffer-file-name) "")) + (or (buffer-file-name) "")) t t command)) command) @@ -1908,35 +1914,34 @@ find the errors." ;; Following code only gets called from compilation-mode-hook on Emacs to add error handling. (defun verilog-error-regexp-add-emacs () - "Tell Emacs compile that we are Verilog. + "Tell Emacs compile that we are Verilog. Called by `compilation-mode-hook'. This allows \\[next-error] to find the errors." - (interactive) - (if (boundp 'compilation-error-regexp-alist-alist) - (progn - (if (not (assoc 'verilog-xl-1 compilation-error-regexp-alist-alist)) - (mapcar - (lambda (item) - (push (car item) compilation-error-regexp-alist) - (push item compilation-error-regexp-alist-alist) - ) - verilog-error-regexp-emacs-alist))))) + (interactive) + (when (boundp 'compilation-error-regexp-alist-alist) + (when (not (assoc 'verilog-xl-1 compilation-error-regexp-alist-alist)) + (mapcar + (lambda (item) + (push (car item) compilation-error-regexp-alist) + (push item compilation-error-regexp-alist-alist)) + verilog-error-regexp-emacs-alist)))) (if (featurep 'xemacs) (add-hook 'compilation-mode-hook 'verilog-error-regexp-add-xemacs)) (if (featurep 'emacs) (add-hook 'compilation-mode-hook 'verilog-error-regexp-add-emacs)) (defconst verilog-compiler-directives (eval-when-compile - '( ;; compiler directives, from IEEE 1800-2012 section 22.1 - "`__FILE__" "`__LINE" "`begin_keywords" "`celldefine" "`default_nettype" - "`define" "`else" "`elsif" "`end_keywords" "`endcelldefine" "`endif" - "`ifdef" "`ifndef" "`include" "`line" "`nounconnected_drive" "`pragma" - "`resetall" "`timescale" "`unconnected_drive" "`undef" "`undefineall" - ;; compiler directives not covered by IEEE 1800 - "`case" "`default" "`endfor" "`endprotect" "`endswitch" "`endwhile" "`for" - "`format" "`if" "`let" "`protect" "`switch" "`timescale" "`time_scale" - "`while" - )) + '( + ;; compiler directives, from IEEE 1800-2012 section 22.1 + "`__FILE__" "`__LINE" "`begin_keywords" "`celldefine" "`default_nettype" + "`define" "`else" "`elsif" "`end_keywords" "`endcelldefine" "`endif" + "`ifdef" "`ifndef" "`include" "`line" "`nounconnected_drive" "`pragma" + "`resetall" "`timescale" "`unconnected_drive" "`undef" "`undefineall" + ;; compiler directives not covered by IEEE 1800 + "`case" "`default" "`endfor" "`endprotect" "`endswitch" "`endwhile" "`for" + "`format" "`if" "`let" "`protect" "`switch" "`timescale" "`time_scale" + "`while" + )) "List of Verilog compiler directives.") (defconst verilog-directive-re @@ -2028,10 +2033,10 @@ find the errors." (eval-when-compile (verilog-regexp-opt '( -;; "`vmm_xactor_member_enum_array" "`vmm_\\(data\\|env\\|scenario\\|subenv\\|xactor\\)_member_\\(scalar\\|string\\|enum\\|vmm_data\\|channel\\|xactor\\|subenv\\|user_defined\\)\\(_array\\)?" -;; "`vmm_xactor_member_scalar_array" -;; "`vmm_xactor_member_scalar" + ;; "`vmm_xactor_member_enum_array" + ;; "`vmm_xactor_member_scalar_array" + ;; "`vmm_xactor_member_scalar" ) nil ))) (defconst verilog-ovm-statement-re @@ -2158,9 +2163,9 @@ find the errors." "`uvm_component_utils" "`uvm_create" "`uvm_create_on" - "`uvm_create_seq" ;; Undocumented in 1.1 + "`uvm_create_seq" ; Undocumented in 1.1 "`uvm_declare_p_sequencer" - "`uvm_declare_sequence_lib" ;; Deprecated in 1.1 + "`uvm_declare_sequence_lib" ; Deprecated in 1.1 "`uvm_do" "`uvm_do_callbacks" "`uvm_do_callbacks_exit_on" @@ -2172,8 +2177,8 @@ find the errors." "`uvm_do_on_with" "`uvm_do_pri" "`uvm_do_pri_with" - "`uvm_do_seq" ;; Undocumented in 1.1 - "`uvm_do_seq_with" ;; Undocumented in 1.1 + "`uvm_do_seq" ; Undocumented in 1.1 + "`uvm_do_seq_with" ; Undocumented in 1.1 "`uvm_do_with" "`uvm_error" "`uvm_error_context" @@ -2215,14 +2220,14 @@ find the errors." "`uvm_field_sarray_string" "`uvm_field_string" "`uvm_field_utils" - "`uvm_file" ;; Undocumented in 1.1, use `__FILE__ + "`uvm_file" ; Undocumented in 1.1, use `__FILE__ "`uvm_get_imp_decl" "`uvm_get_peek_imp_decl" "`uvm_info" "`uvm_info_context" - "`uvm_line" ;; Undocumented in 1.1, use `__LINE__ + "`uvm_line" ; Undocumented in 1.1, use `__LINE__ "`uvm_master_imp_decl" - "`uvm_non_blocking_transport_imp_decl" ;; Deprecated in 1.1 + "`uvm_non_blocking_transport_imp_decl" ; Deprecated in 1.1 "`uvm_nonblocking_get_imp_decl" "`uvm_nonblocking_get_peek_imp_decl" "`uvm_nonblocking_master_imp_decl" @@ -2232,7 +2237,7 @@ find the errors." "`uvm_nonblocking_transport_imp_decl" "`uvm_object_param_utils" "`uvm_object_registry" - "`uvm_object_registry_param" ;; Undocumented in 1.1 + "`uvm_object_registry_param" ; Undocumented in 1.1 "`uvm_object_utils" "`uvm_pack_array" "`uvm_pack_arrayN" @@ -2257,7 +2262,7 @@ find the errors." "`uvm_register_cb" "`uvm_send" "`uvm_send_pri" - "`uvm_sequence_utils" ;; Deprecated in 1.1 + "`uvm_sequence_utils" ; Deprecated in 1.1 "`uvm_set_super_type" "`uvm_slave_imp_decl" "`uvm_transport_imp_decl" @@ -2273,8 +2278,8 @@ find the errors." "`uvm_unpack_sarray" "`uvm_unpack_sarrayN" "`uvm_unpack_string" - "`uvm_update_sequence_lib" ;; Deprecated in 1.1 - "`uvm_update_sequence_lib_and_item" ;; Deprecated in 1.1 + "`uvm_update_sequence_lib" ; Deprecated in 1.1 + "`uvm_update_sequence_lib_and_item" ; Deprecated in 1.1 "`uvm_warning" "`uvm_warning_context") nil ))) @@ -2291,40 +2296,40 @@ find the errors." ;; b : (defconst verilog-assignment-operator-re (eval-when-compile - (verilog-regexp-opt - `( - ;; blocking assignment_operator - "=" "+=" "-=" "*=" "/=" "%=" "&=" "|=" "^=" "<<=" ">>=" "<<<=" ">>>=" - ;; non blocking assignment operator - "<=" - ;; comparison - "==" "!=" "===" "!===" "<=" ">=" "==\?" "!=\?" - ;; event_trigger - "->" "->>" - ;; property_expr - "|->" "|=>" - ;; Is this a legal verilog operator? - ":=" - ) 't - ))) + (verilog-regexp-opt + `( + ;; blocking assignment_operator + "=" "+=" "-=" "*=" "/=" "%=" "&=" "|=" "^=" "<<=" ">>=" "<<<=" ">>>=" + ;; non blocking assignment operator + "<=" + ;; comparison + "==" "!=" "===" "!==" "<=" ">=" "==\?" "!=\?" "<->" + ;; event_trigger + "->" "->>" + ;; property_expr + "|->" "|=>" "#-#" "#=#" + ;; distribution weighting + ":=" ":/" + ) 't + ))) (defconst verilog-assignment-operation-re (concat -; "\\(^\\s-*[A-Za-z0-9_]+\\(\\[\\([A-Za-z0-9_]+\\)\\]\\)*\\s-*\\)" -; "\\(^\\s-*[^=<>+-*/%&|^:\\s-]+[^=<>+-*/%&|^\n]*?\\)" - "\\(^.*?\\)" "\\B" verilog-assignment-operator-re "\\B" )) + ;; "\\(^\\s-*[A-Za-z0-9_]+\\(\\[\\([A-Za-z0-9_]+\\)\\]\\)*\\s-*\\)" + ;; "\\(^\\s-*[^=<>+-*/%&|^:\\s-]+[^=<>+-*/%&|^\n]*?\\)" + "\\(^.*?\\)" "\\B" verilog-assignment-operator-re "\\B" )) (defconst verilog-label-re (concat verilog-symbol-re "\\s-*:\\s-*")) (defconst verilog-property-re (concat "\\(" verilog-label-re "\\)?" + ;; "\\(assert\\|assume\\|cover\\)\\s-+property\\>" "\\(\\(assert\\|assume\\|cover\\)\\>\\s-+\\\\)\\|\\(assert\\)")) - ;; "\\(assert\\|assume\\|cover\\)\\s-+property\\>" (defconst verilog-no-indent-begin-re (eval-when-compile (verilog-regexp-words - '("always" "always_comb" "always_ff" "always_latch" "initial" "final" ;; procedural blocks - "if" "else" ;; conditional statements - "while" "for" "foreach" "repeat" "do" "forever" )))) ;; loop statements + '("always" "always_comb" "always_ff" "always_latch" "initial" "final" ; procedural blocks + "if" "else" ; conditional statements + "while" "for" "foreach" "repeat" "do" "forever" )))) ; loop statements (defconst verilog-ends-re ;; Parenthesis indicate type of keyword found @@ -2396,8 +2401,8 @@ find the errors." "package"))) "\\)")) -;;; NOTE: verilog-leap-to-head expects that verilog-end-block-re and -;;; verilog-end-block-ordered-re matches exactly the same strings. +;; NOTE: verilog-leap-to-head expects that verilog-end-block-re and +;; verilog-end-block-ordered-re matches exactly the same strings. (defconst verilog-end-block-ordered-re ;; Parenthesis indicate type of keyword found (concat "\\(\\\\)\\|" ; 1 @@ -2421,9 +2426,9 @@ find the errors." (eval-when-compile (verilog-regexp-words - `("end" ;; closes begin - "endcase" ;; closes any of case, casex casez or randcase - "join" "join_any" "join_none" ;; closes fork + `("end" ; closes begin + "endcase" ; closes any of case, casex casez or randcase + "join" "join_any" "join_none" ; closes fork "endclass" "endtable" "endspecify" @@ -2666,7 +2671,7 @@ find the errors." (eval-when-compile (verilog-regexp-words `("initial" "final" "always" "always_comb" "always_latch" "always_ff" "function" "task")))) (defconst verilog-coverpoint-re "\\w+\\s*:\\s*\\(coverpoint\\|cross\\constraint\\)" ) -(defconst verilog-in-constraint-re ;; keywords legal in constraint blocks starting a statement/block +(defconst verilog-in-constraint-re ; keywords legal in constraint blocks starting a statement/block (eval-when-compile (verilog-regexp-words `("if" "else" "solve" "foreach")))) (defconst verilog-indent-re @@ -2676,7 +2681,7 @@ find the errors." "{" "always" "always_latch" "always_ff" "always_comb" "begin" "end" -; "unique" "priority" + ;; "unique" "priority" "case" "casex" "casez" "randcase" "endcase" "class" "endclass" "clocking" "endclocking" @@ -2734,7 +2739,7 @@ find the errors." "`uvm_sequence_utils_begin" "`uvm_sequencer_utils_begin" ;; UVM End tokens - "`uvm_component_utils_end" ;; Typo in spec, it's not uvm_component_end + "`uvm_component_utils_end" ; Typo in spec, it's not uvm_component_end "`uvm_field_utils_end" "`uvm_object_utils_end" "`uvm_sequence_utils_end" @@ -2780,12 +2785,18 @@ find the errors." `( "endmodule" "endprimitive" "endinterface" "endpackage" "endprogram" "endclass" )))) + +(defconst verilog-dpi-import-export-re + (eval-when-compile + "\\(\\<\\(import\\|export\\)\\>\\s-+\"DPI\\(-C\\)?\"\\s-+\\(\\<\\(context\\|pure\\)\\>\\s-+\\)?\\([A-Za-z_][A-Za-z0-9_]*\\s-*=\\s-*\\)?\\<\\(function\\|task\\)\\>\\)" + )) + (defconst verilog-disable-fork-re "\\(disable\\|wait\\)\\s-+fork\\>") (defconst verilog-extended-case-re "\\(\\(unique0?\\s-+\\|priority\\s-+\\)?case[xz]?\\)") (defconst verilog-extended-complete-re (concat "\\(\\(\\\\s-+\\)?virtual\\s-+\\|\\\\|\\\\)\\)" "\\|\\(\\(\\\\s-+\\)*\\(\\\\|\\\\|\\\\)\\)" - "\\|\\(\\(\\\\s-+\\)?\\(\"DPI-C\"\\s-+\\)?\\(\\<\\(pure\\|context\\)\\>\\s-+\\)?\\([A-Za-z_][A-Za-z0-9_]*\\s-+=\\s-+\\)?\\(function\\>\\|task\\>\\)\\)" + "\\|\\(\\(\\<\\(import\\|export\\)\\>\\s-+\\)?\\(\"DPI\\(-C\\)?\"\\s-+\\)?\\(\\<\\(pure\\|context\\)\\>\\s-+\\)?\\([A-Za-z_][A-Za-z0-9_]*\\s-*=\\s-*\\)?\\(function\\>\\|task\\>\\)\\)" "\\|" verilog-extended-case-re )) (defconst verilog-basic-complete-re (eval-when-compile @@ -2848,10 +2859,10 @@ find the errors." "\\)\\|\\(?:" ;; `define and `if can span multiple lines if line ends in '\'. NOTE: `if is not IEEE 1800-2012 ;; from http://www.emacswiki.org/emacs/MultilineRegexp - (concat "\\<\\(`define\\|`if\\)\\>" ;; directive - "\\s-+" ;; separator - "\\(?:.*?\\(?:\n.*\\)*?\\)" ;; definition: to end of line, then maybe more lines (excludes any trailing \n) - "\\(?:\n\\s-*\n\\|\\'\\)") ;; blank line or EOF + (concat "\\<\\(`define\\|`if\\)\\>" ; directive + "\\s-+" ; separator + "\\(?:.*?\\(?:\n.*\\)*?\\)" ; definition: to end of line, then maybe more lines (excludes any trailing \n) + "\\(?:\n\\s-*\n\\|\\'\\)") ; blank line or EOF "\\)\\|\\(?:" ;; `() : i.e. `uvm_info(a,b,c) or any other pre-defined macro ;; Since parameters inside the macro can have parentheses, and @@ -2859,56 +2870,56 @@ find the errors." ;; parentheses and then continue to the end of the first ;; non-escaped EOL (concat "\\<`\\w+\\>\\s-*(" - "\\(?:.*?\\(?:\n.*\\)*?\\)" ;; definition: to end of line, then maybe more lines (excludes any trailing \n) - "\\(?:\n\\s-*\n\\|\\'\\)") ;; blank line or EOF + "\\(?:.*?\\(?:\n.*\\)*?\\)" ; definition: to end of line, then maybe more lines (excludes any trailing \n) + "\\(?:\n\\s-*\n\\|\\'\\)") ; blank line or EOF "\\)" ))) (defconst verilog-keywords (append verilog-compiler-directives - '( - "after" "alias" "always" "always_comb" "always_ff" "always_latch" "and" - "assert" "assign" "assume" "automatic" "before" "begin" "bind" - "bins" "binsof" "bit" "break" "buf" "bufif0" "bufif1" "byte" - "case" "casex" "casez" "cell" "chandle" "class" "clocking" "cmos" - "config" "const" "constraint" "context" "continue" "cover" - "covergroup" "coverpoint" "cross" "deassign" "default" "defparam" - "design" "disable" "dist" "do" "edge" "else" "end" "endcase" - "endclass" "endclocking" "endconfig" "endfunction" "endgenerate" - "endgroup" "endinterface" "endmodule" "endpackage" "endprimitive" - "endprogram" "endproperty" "endspecify" "endsequence" "endtable" - "endtask" "enum" "event" "expect" "export" "extends" "extern" - "final" "first_match" "for" "force" "foreach" "forever" "fork" - "forkjoin" "function" "generate" "genvar" "highz0" "highz1" "if" - "iff" "ifnone" "ignore_bins" "illegal_bins" "import" "incdir" - "include" "initial" "inout" "input" "inside" "instance" "int" - "integer" "interface" "intersect" "join" "join_any" "join_none" - "large" "liblist" "library" "local" "localparam" "logic" - "longint" "macromodule" "mailbox" "matches" "medium" "modport" "module" - "nand" "negedge" "new" "nmos" "nor" "noshowcancelled" "not" - "notif0" "notif1" "null" "or" "output" "package" "packed" - "parameter" "pmos" "posedge" "primitive" "priority" "program" - "property" "protected" "pull0" "pull1" "pulldown" "pullup" - "pulsestyle_onevent" "pulsestyle_ondetect" "pure" "rand" "randc" - "randcase" "randsequence" "rcmos" "real" "realtime" "ref" "reg" - "release" "repeat" "return" "rnmos" "rpmos" "rtran" "rtranif0" - "rtranif1" "scalared" "semaphore" "sequence" "shortint" "shortreal" - "showcancelled" "signed" "small" "solve" "specify" "specparam" - "static" "string" "strong0" "strong1" "struct" "super" "supply0" - "supply1" "table" "tagged" "task" "this" "throughout" "time" - "timeprecision" "timeunit" "tran" "tranif0" "tranif1" "tri" - "tri0" "tri1" "triand" "trior" "trireg" "type" "typedef" "union" - "unique" "unsigned" "use" "uwire" "var" "vectored" "virtual" "void" - "wait" "wait_order" "wand" "weak0" "weak1" "while" "wildcard" - "wire" "with" "within" "wor" "xnor" "xor" - ;; 1800-2009 - "accept_on" "checker" "endchecker" "eventually" "global" "implies" - "let" "nexttime" "reject_on" "restrict" "s_always" "s_eventually" - "s_nexttime" "s_until" "s_until_with" "strong" "sync_accept_on" - "sync_reject_on" "unique0" "until" "until_with" "untyped" "weak" - ;; 1800-2012 - "implements" "interconnect" "nettype" "soft" - )) + '( + "after" "alias" "always" "always_comb" "always_ff" "always_latch" "and" + "assert" "assign" "assume" "automatic" "before" "begin" "bind" + "bins" "binsof" "bit" "break" "buf" "bufif0" "bufif1" "byte" + "case" "casex" "casez" "cell" "chandle" "class" "clocking" "cmos" + "config" "const" "constraint" "context" "continue" "cover" + "covergroup" "coverpoint" "cross" "deassign" "default" "defparam" + "design" "disable" "dist" "do" "edge" "else" "end" "endcase" + "endclass" "endclocking" "endconfig" "endfunction" "endgenerate" + "endgroup" "endinterface" "endmodule" "endpackage" "endprimitive" + "endprogram" "endproperty" "endspecify" "endsequence" "endtable" + "endtask" "enum" "event" "expect" "export" "extends" "extern" + "final" "first_match" "for" "force" "foreach" "forever" "fork" + "forkjoin" "function" "generate" "genvar" "highz0" "highz1" "if" + "iff" "ifnone" "ignore_bins" "illegal_bins" "import" "incdir" + "include" "initial" "inout" "input" "inside" "instance" "int" + "integer" "interface" "intersect" "join" "join_any" "join_none" + "large" "liblist" "library" "local" "localparam" "logic" + "longint" "macromodule" "mailbox" "matches" "medium" "modport" "module" + "nand" "negedge" "new" "nmos" "nor" "noshowcancelled" "not" + "notif0" "notif1" "null" "or" "output" "package" "packed" + "parameter" "pmos" "posedge" "primitive" "priority" "program" + "property" "protected" "pull0" "pull1" "pulldown" "pullup" + "pulsestyle_onevent" "pulsestyle_ondetect" "pure" "rand" "randc" + "randcase" "randsequence" "rcmos" "real" "realtime" "ref" "reg" + "release" "repeat" "return" "rnmos" "rpmos" "rtran" "rtranif0" + "rtranif1" "scalared" "semaphore" "sequence" "shortint" "shortreal" + "showcancelled" "signed" "small" "solve" "specify" "specparam" + "static" "string" "strong0" "strong1" "struct" "super" "supply0" + "supply1" "table" "tagged" "task" "this" "throughout" "time" + "timeprecision" "timeunit" "tran" "tranif0" "tranif1" "tri" + "tri0" "tri1" "triand" "trior" "trireg" "type" "typedef" "union" + "unique" "unsigned" "use" "uwire" "var" "vectored" "virtual" "void" + "wait" "wait_order" "wand" "weak0" "weak1" "while" "wildcard" + "wire" "with" "within" "wor" "xnor" "xor" + ;; 1800-2009 + "accept_on" "checker" "endchecker" "eventually" "global" "implies" + "let" "nexttime" "reject_on" "restrict" "s_always" "s_eventually" + "s_nexttime" "s_until" "s_until_with" "strong" "sync_accept_on" + "sync_reject_on" "unique0" "until" "until_with" "untyped" "weak" + ;; 1800-2012 + "implements" "interconnect" "nettype" "soft" + )) "List of Verilog keywords.") (defconst verilog-comment-start-regexp "//\\|/\\*" @@ -2928,7 +2939,7 @@ find the errors." (modify-syntax-entry ?| "." table) ;; FIXME: This goes against Emacs conventions. Use "_" syntax instead and ;; then use regexps with things like "\\_<...\\_>". - (modify-syntax-entry ?` "w" table) ;; ` is part of definition symbols in Verilog + (modify-syntax-entry ?` "w" table) ; ` is part of definition symbols in Verilog (modify-syntax-entry ?_ "w" table) (modify-syntax-entry ?\' "." table) @@ -3119,9 +3130,9 @@ See also `verilog-font-lock-extra-types'.") (list ;; Fontify all builtin keywords (concat "\\<\\(" verilog-font-keywords "\\|" - ;; And user/system tasks and functions - "\\$[a-zA-Z][a-zA-Z0-9_\\$]*" - "\\)\\>") + ;; And user/system tasks and functions + "\\$[a-zA-Z][a-zA-Z0-9_\\$]*" + "\\)\\>") ;; Fontify all types (if verilog-highlight-grouping-keywords (cons (concat "\\<\\(" verilog-font-grouping-keywords "\\)\\>") @@ -3129,7 +3140,7 @@ See also `verilog-font-lock-extra-types'.") (cons (concat "\\<\\(" verilog-font-grouping-keywords "\\)\\>") 'font-lock-type-face)) (cons (concat "\\<\\(" verilog-type-font-keywords "\\)\\>") - 'font-lock-type-face) + 'font-lock-type-face) ;; Fontify IEEE-1800-2005 keywords appropriately (if verilog-highlight-p1800-keywords (cons (concat "\\<\\(" verilog-1800-2005-keywords "\\)\\>") @@ -3163,8 +3174,8 @@ See also `verilog-font-lock-extra-types'.") ;; Fontify function definitions (list (concat "\\\\s-+\\(integer\\|real\\(time\\)?\\|time\\)\\s-+\\(\\sw+\\)" ) - '(1 font-lock-keyword-face) - '(3 font-lock-constant-face prepend)) + '(1 font-lock-keyword-face) + '(3 font-lock-constant-face prepend)) '("\\\\s-+\\(\\[[^]]+\\]\\)\\s-+\\(\\sw+\\)" (1 font-lock-keyword-face) (2 font-lock-constant-face append)) @@ -3180,11 +3191,14 @@ See also `verilog-font-lock-extra-types'.") '("\\(\\\\\\S-*\\s-\\)" 0 font-lock-function-name-face) ;; Fontify macro definitions/ uses '("`\\s-*[A-Za-z][A-Za-z0-9_]*" 0 (if (boundp 'font-lock-preprocessor-face) - 'font-lock-preprocessor-face - 'font-lock-type-face)) + 'font-lock-preprocessor-face + 'font-lock-type-face)) ;; Fontify delays/numbers - '("\\(@\\)\\|\\(#\\s-*\\(\\(\[0-9_.\]+\\('s?[hdxbo][0-9a-fA-F_xz]*\\)?\\)\\|\\(([^()]+)\\|\\sw+\\)\\)\\)" + '("\\(@\\)\\|\\([ \t\n\f\r]#\\s-*\\(\\(\[0-9_.\]+\\('s?[hdxbo][0-9a-fA-F_xz]*\\)?\\)\\|\\(([^()]+)\\|\\sw+\\)\\)\\)" 0 font-lock-type-face append) + ;; Fontify property/sequence cycle delays - these start with '##' + '("\\(##\\(\\sw+\\|\\[[^\]]+\\]\\)\\)" + 0 font-lock-type-face append) ;; Fontify instantiation names '("\\([A-Za-z][A-Za-z0-9_]*\\)\\s-*(" 1 font-lock-function-name-face) ))) @@ -3257,10 +3271,10 @@ to full text form for parsing. Additional actions may be specified with (font-lock-mode 0) t))) (unwind-protect - (progn ,@body) - ;; Unwind forms - (when fontlocked (font-lock-mode t)) - (when hooked (verilog-run-hooks 'verilog-after-save-font-hook))))) + (progn ,@body) + ;; Unwind forms + (when fontlocked (font-lock-mode t)) + (when hooked (verilog-run-hooks 'verilog-after-save-font-hook))))) ;; ;; Comment detection and caching @@ -3292,7 +3306,7 @@ This requires that insertions must use `verilog-insert'." ;; Note this must work properly if there's multiple layers of calls ;; to verilog-save-scan-cache even with differing ticks. `(progn - (unless (verilog-scan-cache-ok-p) ;; Must be before let + (unless (verilog-scan-cache-ok-p) ; Must be before let (setq verilog-scan-cache-tick nil)) (let* ((verilog-scan-cache-preserving (current-buffer))) (progn ,@body)))) @@ -3330,7 +3344,7 @@ This creates v-cmts properties where comments are in force." (put-text-property (1+ pt) (point) 'v-cmts t)) ((looking-at "\"") (setq pt (point)) - (or (re-search-forward "[^\\]\"" end t) ;; don't forward-char first, since we look for a non backslash first + (or (re-search-forward "[^\\]\"" end t) ; don't forward-char first, since we look for a non backslash first ;; No error - let later code indicate it so we can (goto-char end)) (put-text-property (1+ pt) (point) 'v-cmts t)) @@ -3348,14 +3362,14 @@ either is ok to parse as a non-comment, or `verilog-insert' was used." (unless (verilog-scan-cache-ok-p) (save-excursion (verilog-save-buffer-state - (when verilog-debug - (message "Scanning %s cache=%s cachetick=%S tick=%S" (current-buffer) - verilog-scan-cache-preserving verilog-scan-cache-tick - (buffer-chars-modified-tick))) - (remove-text-properties (point-min) (point-max) '(v-cmts nil)) - (verilog-scan-region (point-min) (point-max)) - (setq verilog-scan-cache-tick (buffer-chars-modified-tick)) - (when verilog-debug (message "Scanning... done")))))) + (when verilog-debug + (message "Scanning %s cache=%s cachetick=%S tick=%S" (current-buffer) + verilog-scan-cache-preserving verilog-scan-cache-tick + (buffer-chars-modified-tick))) + (remove-text-properties (point-min) (point-max) '(v-cmts nil)) + (verilog-scan-region (point-min) (point-max)) + (setq verilog-scan-cache-tick (buffer-chars-modified-tick)) + (when verilog-debug (message "Scanning... done")))))) (defun verilog-scan-debug () "For debugging, show with display face results of `verilog-scan'." @@ -3427,13 +3441,13 @@ Use filename, if current buffer being edited shorten to just buffer name." ;; before that see if we are in a comment (verilog-forward-sexp)) -;;;used by hs-minor-mode (defun verilog-forward-sexp-function (arg) + "Move forward a sexp." + ;; Used by hs-minor-mode (if (< arg 0) (verilog-backward-sexp) (verilog-forward-sexp))) - (defun verilog-backward-sexp () (let ((reg) (elsec 1) @@ -3504,7 +3518,7 @@ Use filename, if current buffer being edited shorten to just buffer name." ((match-end 2) ;; Search forward for matching endcase (setq reg "\\(\\\\|\\(\\\\s-+\\|\\\\s-+\\)?\\[^:]\\)\\|\\(\\\\)" ) - (setq md 3) ;; ender is third item in regexp + (setq md 3) ; ender is third item in regexp ) ((match-end 4) ;; might be "disable fork" or "wait fork" @@ -3514,15 +3528,15 @@ Use filename, if current buffer being edited shorten to just buffer name." (looking-at verilog-disable-fork-re) (and (looking-at "fork") (progn - (setq here (point)) ;; sometimes a fork is just a fork + (setq here (point)) ; sometimes a fork is just a fork (forward-word -1) (looking-at verilog-disable-fork-re)))) - (progn ;; it is a disable fork; ignore it + (progn ; it is a disable fork; ignore it (goto-char (match-end 0)) (forward-word 1) (setq reg nil)) - (progn ;; it is a nice simple fork - (goto-char here) ;; return from looking for "disable fork" + (progn ; it is a nice simple fork + (goto-char here) ; return from looking for "disable fork" ;; Search forward for matching join (setq reg "\\(\\\\)\\|\\(\\\\)" ))))) ((match-end 6) @@ -3533,41 +3547,41 @@ Use filename, if current buffer being edited shorten to just buffer name." ;; Search forward for matching endtable (setq reg "\\" ) (setq nest 'no)) - ((match-end 8) - ;; Search forward for matching endspecify - (setq reg "\\(\\\\)\\|\\(\\\\)" )) - ((match-end 9) - ;; Search forward for matching endfunction - (setq reg "\\" ) - (setq nest 'no)) - ((match-end 10) - ;; Search forward for matching endfunction - (setq reg "\\" ) - (setq nest 'no)) - ((match-end 14) - ;; Search forward for matching endtask - (setq reg "\\" ) - (setq nest 'no)) - ((match-end 15) - ;; Search forward for matching endtask - (setq reg "\\" ) - (setq nest 'no)) - ((match-end 19) - ;; Search forward for matching endgenerate - (setq reg "\\(\\\\)\\|\\(\\\\)" )) - ((match-end 20) - ;; Search forward for matching endgroup - (setq reg "\\(\\\\)\\|\\(\\\\)" )) - ((match-end 21) - ;; Search forward for matching endproperty - (setq reg "\\(\\\\)\\|\\(\\\\)" )) - ((match-end 25) - ;; Search forward for matching endsequence - (setq reg "\\(\\<\\(rand\\)?sequence\\>\\)\\|\\(\\\\)" ) - (setq md 3)) ; 3 to get to endsequence in the reg above - ((match-end 27) - ;; Search forward for matching endclocking - (setq reg "\\(\\\\)\\|\\(\\\\)" ))) + ((match-end 8) + ;; Search forward for matching endspecify + (setq reg "\\(\\\\)\\|\\(\\\\)" )) + ((match-end 9) + ;; Search forward for matching endfunction + (setq reg "\\" ) + (setq nest 'no)) + ((match-end 10) + ;; Search forward for matching endfunction + (setq reg "\\" ) + (setq nest 'no)) + ((match-end 14) + ;; Search forward for matching endtask + (setq reg "\\" ) + (setq nest 'no)) + ((match-end 15) + ;; Search forward for matching endtask + (setq reg "\\" ) + (setq nest 'no)) + ((match-end 19) + ;; Search forward for matching endgenerate + (setq reg "\\(\\\\)\\|\\(\\\\)" )) + ((match-end 20) + ;; Search forward for matching endgroup + (setq reg "\\(\\\\)\\|\\(\\\\)" )) + ((match-end 21) + ;; Search forward for matching endproperty + (setq reg "\\(\\\\)\\|\\(\\\\)" )) + ((match-end 25) + ;; Search forward for matching endsequence + (setq reg "\\(\\<\\(rand\\)?sequence\\>\\)\\|\\(\\\\)" ) + (setq md 3)) ; 3 to get to endsequence in the reg above + ((match-end 27) + ;; Search forward for matching endclocking + (setq reg "\\(\\\\)\\|\\(\\\\)" ))) (if (and reg (forward-word 1)) (catch 'skip @@ -3590,9 +3604,9 @@ Use filename, if current buffer being edited shorten to just buffer name." (progn (forward-word -1) (looking-at verilog-disable-fork-re)))) - (progn ;; it is a disable fork; another false alarm + (progn ; it is a disable fork; another false alarm (goto-char (match-end 0))) - (progn ;; it is a simple fork (or has nothing to do with fork) + (progn ; it is a simple fork (or has nothing to do with fork) (goto-char here) (setq depth (1+ depth)))))))))) (if (verilog-re-search-forward reg nil 'move) @@ -3787,7 +3801,7 @@ Key bindings specific to `verilog-mode-map' are: (setq verilog-which-tool 1) (setq verilog-tool 'verilog-linter) (verilog-set-compile-command) - (when (boundp 'hack-local-variables-hook) ;; Also modify any file-local-variables + (when (boundp 'hack-local-variables-hook) ; Also modify any file-local-variables (add-hook 'hack-local-variables-hook 'verilog-modify-compile-command t)) ;; Setting up menus @@ -3813,7 +3827,7 @@ Key bindings specific to `verilog-mode-map' are: ;;------------------------------------------------------------ ;; now hook in 'verilog-highlight-include-files (eldo-mode.el&spice-mode.el) ;; all buffer local: - (unless noninteractive ;; Else can't see the result, and change hooks are slow + (unless noninteractive ; Else can't see the result, and change hooks are slow (when (featurep 'xemacs) (make-local-hook 'font-lock-mode-hook) (make-local-hook 'font-lock-after-fontify-buffer-hook); doesn't exist in Emacs @@ -3841,10 +3855,9 @@ Key bindings specific to `verilog-mode-map' are: ;; verilog-mode-hook call added by define-derived-mode ) - -;; -;; Electric functions +;;; Electric functions: ;; + (defun electric-verilog-terminate-line (&optional arg) "Terminate line and indent next line. With optional ARG, remove existing end of line comments." @@ -3866,36 +3879,36 @@ With optional ARG, remove existing end of line comments." (newline) (verilog-more-comment)) ((eolp) - ;; First, check if current line should be indented - (if (save-excursion - (delete-horizontal-space) - (beginning-of-line) - (skip-chars-forward " \t") - (if (looking-at verilog-auto-end-comment-lines-re) - (let ((indent-str (verilog-indent-line))) - ;; Maybe we should set some endcomments - (if verilog-auto-endcomments - (verilog-set-auto-endcomments indent-str arg)) - (end-of-line) - (delete-horizontal-space) - (if arg - () - (newline)) - nil) - (progn - (end-of-line) - (delete-horizontal-space) - 't))) - ;; see if we should line up assignments - (progn - (if (or (eq 'all verilog-auto-lineup) - (eq 'assignments verilog-auto-lineup)) - (verilog-pretty-expr t "\\(<\\|:\\)?=" )) - (newline)) - (forward-line 1)) - ;; Indent next line - (if verilog-auto-indent-on-newline - (verilog-indent-line))) + ;; First, check if current line should be indented + (if (save-excursion + (delete-horizontal-space) + (beginning-of-line) + (skip-chars-forward " \t") + (if (looking-at verilog-auto-end-comment-lines-re) + (let ((indent-str (verilog-indent-line))) + ;; Maybe we should set some endcomments + (if verilog-auto-endcomments + (verilog-set-auto-endcomments indent-str arg)) + (end-of-line) + (delete-horizontal-space) + (if arg + () + (newline)) + nil) + (progn + (end-of-line) + (delete-horizontal-space) + 't))) + ;; see if we should line up assignments + (progn + (if (or (eq 'all verilog-auto-lineup) + (eq 'assignments verilog-auto-lineup)) + (verilog-pretty-expr t "\\(<\\|:\\)?=" )) + (newline)) + (forward-line 1)) + ;; Indent next line + (if verilog-auto-indent-on-newline + (verilog-indent-line))) (t (newline))))) @@ -3944,8 +3957,8 @@ With optional ARG, remove existing end of line comments." (goto-char p) (verilog-backward-case-item lim) (verilog-indent-line))) -;; (let ((verilog-tab-always-indent nil)) -;; (verilog-indent-line)) + ;; (let ((verilog-tab-always-indent nil)) + ;; (verilog-indent-line)) )) ;;(defun electric-verilog-equal () @@ -3995,7 +4008,7 @@ With optional ARG, remove existing end of line comments." (t (indent-for-comment) (when (and (eolp) (= oldpnt (point))) - ; kill existing comment + ;; kill existing comment (beginning-of-line) (re-search-forward comment-start-skip oldpnt 'move) (goto-char (match-beginning 0)) @@ -4004,9 +4017,7 @@ With optional ARG, remove existing end of line comments." (t (progn (insert "\t"))))) - -;; -;; Interactive functions +;;; Interactive functions: ;; (defun verilog-indent-buffer () @@ -4213,6 +4224,7 @@ Uses `verilog-scan' cache." "Label matching begin ... end, fork ... join and case ... endcase statements." (interactive) (let ((cnt 0) + (case-fold-search nil) (oldpos (point)) (b (progn (verilog-beg-of-defun) @@ -4222,7 +4234,7 @@ Uses `verilog-scan' cache." (point-marker)))) (goto-char (marker-position b)) (if (> (- e b) 200) - (message "Relabeling module...")) + (message "Relabeling module...")) (while (and (> (marker-position e) (point)) (verilog-re-search-forward @@ -4240,7 +4252,7 @@ Uses `verilog-scan' cache." (if (or (> (- e b) 200) (> cnt 20)) - (message "%d lines auto commented" cnt)))) + (message "%d lines auto commented" cnt)))) (defun verilog-beg-of-statement () "Move backward to beginning of statement." @@ -4319,16 +4331,16 @@ Uses `verilog-scan' cache." (goto-char pt) (throw 'done t))))) (verilog-forward-syntactic-ws))) -; -; (while (and -; (not (looking-at verilog-complete-reg)) -; (not (bolp)) -; (not (= (preceding-char) ?\;))) -; (verilog-backward-token) -; (verilog-backward-syntactic-ws) -; (setq pt (point))) -; (goto-char pt) -; ;(verilog-forward-syntactic-ws) +;; +;; (while (and +;; (not (looking-at verilog-complete-reg)) +;; (not (bolp)) +;; (not (= (preceding-char) ?\;))) +;; (verilog-backward-token) +;; (verilog-backward-syntactic-ws) +;; (setq pt (point))) +;; (goto-char pt) +;; ;(verilog-forward-syntactic-ws) (defun verilog-end-of-statement () "Move forward to end of current statement." @@ -4347,30 +4359,30 @@ Uses `verilog-scan' cache." ;; Skip to end of statement ((condition-case nil - (setq pos - (catch 'found - (while t - (forward-sexp 1) - (verilog-skip-forward-comment-or-string) - (if (eolp) - (forward-line 1)) - (cond ((looking-at "[ \t]*;") - (skip-chars-forward "^;") - (forward-char 1) - (throw 'found (point))) - ((save-excursion - (forward-sexp -1) - (looking-at verilog-beg-block-re)) - (goto-char (match-beginning 0)) - (throw 'found nil)) - ((looking-at "[ \t]*)") - (throw 'found (point))) - ((eobp) - (throw 'found (point))) - ))) - - ) - (error nil)) + (setq pos + (catch 'found + (while t + (forward-sexp 1) + (verilog-skip-forward-comment-or-string) + (if (eolp) + (forward-line 1)) + (cond ((looking-at "[ \t]*;") + (skip-chars-forward "^;") + (forward-char 1) + (throw 'found (point))) + ((save-excursion + (forward-sexp -1) + (looking-at verilog-beg-block-re)) + (goto-char (match-beginning 0)) + (throw 'found nil)) + ((looking-at "[ \t]*)") + (throw 'found (point))) + ((eobp) + (throw 'found (point))) + ))) + + ) + (error nil)) (if (not pos) ;; Skip a whole block (catch 'found @@ -4464,6 +4476,13 @@ More specifically, after a generate and before an endgenerate." (setq nest (1+ nest))))))) (= nest 0) )) ; return nest +(defun verilog-in-deferred-immediate-final-p () + "Return true if inside an 'assert/assume/cover final' statement." + (interactive) + (and (looking-at "final") + (verilog-looking-back "\\<\\(?:assert\\|assume\\|cover\\)\\>\\s-+" nil)) + ) + (defun verilog-backward-case-item (lim) "Skip backward to nearest enclosing case item. Limit search to point LIM." @@ -4485,14 +4504,14 @@ Limit search to point LIM." (verilog-re-search-backward "\\(\\[\\)\\|\\(\\]\\)\\|\\(:\\)" lim1 'move)) (cond - ((match-end 1) ;; [ + ((match-end 1) ; [ (setq colon (1+ colon)) (if (>= colon 0) (error "%s: unbalanced [" (verilog-point-text)))) - ((match-end 2) ;; ] + ((match-end 2) ; ] (setq colon (1- colon))) - ((match-end 3) ;; : + ((match-end 3) ; : (setq colon (1+ colon))))) ;; Skip back to beginning of case item (skip-chars-backward "\t ") @@ -4527,9 +4546,7 @@ Limit search to point LIM." str) 'nil))) - -;; -;; Other functions +;;; Other functions: ;; (defun verilog-kill-existing-comment () @@ -4625,312 +4642,312 @@ primitive or interface named NAME." (search-backward "//" (point-at-bol) t))))) (let ((type (car indent-str))) (unless (eq type 'declaration) - (unless (looking-at (concat "\\(" verilog-end-block-ordered-re "\\)[ \t]*:")) ;; ignore named ends + (unless (looking-at (concat "\\(" verilog-end-block-ordered-re "\\)[ \t]*:")) ; ignore named ends (if (looking-at verilog-end-block-ordered-re) - (cond - (;- This is a case block; search back for the start of this case - (match-end 1) ;; of verilog-end-block-ordered-re - - (let ((err 't) - (str "UNMATCHED!!")) - (save-excursion - (verilog-leap-to-head) - (cond - ((looking-at "\\") - (setq str "randcase") - (setq err nil)) - ((looking-at "\\(\\(unique0?\\s-+\\|priority\\s-+\\)?case[xz]?\\)") - (goto-char (match-end 0)) - (setq str (concat (match-string 0) " " (verilog-get-expr))) - (setq err nil)) - )) - (end-of-line) - (if kill-existing-comment - (verilog-kill-existing-comment)) - (delete-horizontal-space) - (insert (concat " // " str )) - (if err (ding 't)))) - - (;- This is a begin..end block - (match-end 2) ;; of verilog-end-block-ordered-re - (let ((str " // UNMATCHED !!") - (err 't) - (here (point)) - there - cntx) - (save-excursion - (verilog-leap-to-head) - (setq there (point)) - (if (not (match-end 0)) - (progn - (goto-char here) - (end-of-line) - (if kill-existing-comment - (verilog-kill-existing-comment)) - (delete-horizontal-space) - (insert str) - (ding 't)) - (let ((lim - (save-excursion (verilog-beg-of-defun) (point))) - (here (point))) - (cond - (;-- handle named block differently - (looking-at verilog-named-block-re) - (search-forward ":") - (setq there (point)) - (setq str (verilog-get-expr)) - (setq err nil) - (setq str (concat " // block: " str ))) - - ((verilog-in-case-region-p) ;-- handle case item differently - (goto-char here) - (setq str (verilog-backward-case-item lim)) - (setq there (point)) - (setq err nil) - (setq str (concat " // case: " str ))) - - (;- try to find "reason" for this begin - (cond - (; - (eq here (progn - ;; (verilog-backward-token) - (verilog-beg-of-statement) - (point))) - (setq err nil) - (setq str "")) - ((looking-at verilog-endcomment-reason-re) - (setq there (match-end 0)) - (setq cntx (concat (match-string 0) " ")) - (cond - (;- begin - (match-end 1) - (setq err nil) - (save-excursion - (if (and (verilog-continued-line) - (looking-at "\\\\|\\\\|\\")) - (progn - (goto-char (match-end 0)) - (setq there (point)) - (setq str - (concat " // " (match-string 0) " " (verilog-get-expr)))) - (setq str "")))) - - (;- else - (match-end 2) - (let ((nest 0) - ( reg "\\(\\\\)\\|\\(\\\\)\\|\\(\\\\)\\|\\(assert\\)")) - (catch 'skip - (while (verilog-re-search-backward reg nil 'move) - (cond - ((match-end 1) ; begin - (setq nest (1- nest))) - ((match-end 2) ; end - (setq nest (1+ nest))) - ((match-end 3) - (if (= 0 nest) - (progn - (goto-char (match-end 0)) - (setq there (point)) - (setq err nil) - (setq str (verilog-get-expr)) - (setq str (concat " // else: !if" str )) - (throw 'skip 1)))) - ((match-end 4) - (if (= 0 nest) - (progn - (goto-char (match-end 0)) - (setq there (point)) - (setq err nil) - (setq str (verilog-get-expr)) - (setq str (concat " // else: !assert " str )) - (throw 'skip 1))))))))) - (;- end else - (match-end 3) - (goto-char there) - (let ((nest 0) - (reg "\\(\\\\)\\|\\(\\\\)\\|\\(\\\\)\\|\\(assert\\)")) - (catch 'skip - (while (verilog-re-search-backward reg nil 'move) - (cond - ((match-end 1) ; begin - (setq nest (1- nest))) - ((match-end 2) ; end - (setq nest (1+ nest))) - ((match-end 3) - (if (= 0 nest) - (progn - (goto-char (match-end 0)) - (setq there (point)) - (setq err nil) - (setq str (verilog-get-expr)) - (setq str (concat " // else: !if" str )) - (throw 'skip 1)))) - ((match-end 4) - (if (= 0 nest) - (progn - (goto-char (match-end 0)) - (setq there (point)) - (setq err nil) - (setq str (verilog-get-expr)) - (setq str (concat " // else: !assert " str )) - (throw 'skip 1))))))))) - - (; always, always_comb, always_latch w/o @... - (match-end 5) - (goto-char (match-end 0)) - (setq there (point)) - (setq err nil) - (setq str (concat " // " cntx ))) - - (;- task/function/initial et cetera - t - (match-end 0) - (goto-char (match-end 0)) - (setq there (point)) - (setq err nil) - (setq str (concat " // " cntx (verilog-get-expr)))) - - (;-- otherwise... - (setq str " // auto-endcomment confused ")))) - - ((and - (verilog-in-case-region-p) ;-- handle case item differently - (progn - (setq there (point)) - (goto-char here) - (setq str (verilog-backward-case-item lim)))) - (setq err nil) - (setq str (concat " // case: " str ))) - - ((verilog-in-fork-region-p) - (setq err nil) - (setq str " // fork branch" )) - - ((looking-at "\\") - ;; HERE - (forward-word 1) - (verilog-forward-syntactic-ws) - (setq err nil) - (setq str (verilog-get-expr)) - (setq str (concat " // " cntx str ))) - - )))) - (goto-char here) - (end-of-line) - (if kill-existing-comment - (verilog-kill-existing-comment)) - (delete-horizontal-space) - (if (or err - (> (count-lines here there) verilog-minimum-comment-distance)) - (insert str)) - (if err (ding 't)) - )))) - (;- this is endclass, which can be nested - (match-end 11) ;; of verilog-end-block-ordered-re - ;;(goto-char there) - (let ((nest 0) - (reg "\\<\\(class\\)\\|\\(endclass\\)\\|\\(package\\|primitive\\|\\(macro\\)?module\\)\\>") - string) - (save-excursion - (catch 'skip - (while (verilog-re-search-backward reg nil 'move) - (cond - ((match-end 3) ; endclass - (ding 't) - (setq string "unmatched endclass") - (throw 'skip 1)) - - ((match-end 2) ; endclass - (setq nest (1+ nest))) - - ((match-end 1) ; class - (setq nest (1- nest)) - (if (< nest 0) - (progn - (goto-char (match-end 0)) - (let (b e) - (setq b (progn - (skip-chars-forward "^ \t") - (verilog-forward-ws&directives) - (point)) - e (progn - (skip-chars-forward "a-zA-Z0-9_") - (point))) - (setq string (buffer-substring b e))) - (throw 'skip 1)))) - )))) - (end-of-line) - (if kill-existing-comment - (verilog-kill-existing-comment)) - (delete-horizontal-space) - (insert (concat " // " string )))) - - (;- this is end{function,generate,task,module,primitive,table,generate} - ;- which can not be nested. - t - (let (string reg (name-re nil)) - (end-of-line) - (if kill-existing-comment - (save-match-data - (verilog-kill-existing-comment))) - (delete-horizontal-space) - (backward-sexp) - (cond - ((match-end 5) ;; of verilog-end-block-ordered-re - (setq reg "\\(\\\\)\\|\\(\\<\\(endfunction\\|task\\|\\(macro\\)?module\\|primitive\\)\\>\\)") - (setq name-re "\\w+\\(?:\n\\|\\s-\\)*[(;]")) - ((match-end 6) ;; of verilog-end-block-ordered-re - (setq reg "\\(\\\\)\\|\\(\\<\\(endtask\\|function\\|\\(macro\\)?module\\|primitive\\)\\>\\)") - (setq name-re "\\w+\\(?:\n\\|\\s-\\)*[(;]")) - ((match-end 7) ;; of verilog-end-block-ordered-re - (setq reg "\\(\\<\\(macro\\)?module\\>\\)\\|\\")) - ((match-end 8) ;; of verilog-end-block-ordered-re - (setq reg "\\(\\\\)\\|\\(\\<\\(endprimitive\\|package\\|interface\\|\\(macro\\)?module\\)\\>\\)")) - ((match-end 9) ;; of verilog-end-block-ordered-re - (setq reg "\\(\\\\)\\|\\(\\<\\(endinterface\\|package\\|primitive\\|\\(macro\\)?module\\)\\>\\)")) - ((match-end 10) ;; of verilog-end-block-ordered-re - (setq reg "\\(\\\\)\\|\\(\\<\\(endpackage\\|primitive\\|interface\\|\\(macro\\)?module\\)\\>\\)")) - ((match-end 11) ;; of verilog-end-block-ordered-re - (setq reg "\\(\\\\)\\|\\(\\<\\(endclass\\|primitive\\|interface\\|\\(macro\\)?module\\)\\>\\)")) - ((match-end 12) ;; of verilog-end-block-ordered-re - (setq reg "\\(\\\\)\\|\\(\\<\\(endcovergroup\\|primitive\\|interface\\|\\(macro\\)?module\\)\\>\\)")) - ((match-end 13) ;; of verilog-end-block-ordered-re - (setq reg "\\(\\\\)\\|\\(\\<\\(endprogram\\|primitive\\|interface\\|\\(macro\\)?module\\)\\>\\)")) - ((match-end 14) ;; of verilog-end-block-ordered-re - (setq reg "\\(\\<\\(rand\\)?sequence\\>\\)\\|\\(\\<\\(endsequence\\|primitive\\|interface\\|\\(macro\\)?module\\)\\>\\)")) - ((match-end 15) ;; of verilog-end-block-ordered-re - (setq reg "\\(\\\\)\\|\\")) - ((match-end 16) ;; of verilog-end-block-ordered-re - (setq reg "\\(\\\\)\\|\\")) - - (t (error "Problem in verilog-set-auto-endcomments"))) - (let (b e) - (save-excursion - (verilog-re-search-backward reg nil 'move) - (cond - ((match-end 1) - (setq b (progn - (skip-chars-forward "^ \t") - (verilog-forward-ws&directives) - (if (looking-at "static\\|automatic") - (progn - (goto-char (match-end 0)) - (verilog-forward-ws&directives))) - (if (and name-re (verilog-re-search-forward name-re nil 'move)) - (progn - (goto-char (match-beginning 0)) - (verilog-forward-ws&directives))) - (point)) - e (progn - (skip-chars-forward "a-zA-Z0-9_") - (point))) - (setq string (buffer-substring b e))) - (t - (ding 't) - (setq string "unmatched end(function|task|module|primitive|interface|package|class|clocking)"))))) - (end-of-line) - (insert (concat " // " string ))) - )))))))))) + (cond + (;- This is a case block; search back for the start of this case + (match-end 1) ; of verilog-end-block-ordered-re + + (let ((err 't) + (str "UNMATCHED!!")) + (save-excursion + (verilog-leap-to-head) + (cond + ((looking-at "\\") + (setq str "randcase") + (setq err nil)) + ((looking-at "\\(\\(unique0?\\s-+\\|priority\\s-+\\)?case[xz]?\\)") + (goto-char (match-end 0)) + (setq str (concat (match-string 0) " " (verilog-get-expr))) + (setq err nil)) + )) + (end-of-line) + (if kill-existing-comment + (verilog-kill-existing-comment)) + (delete-horizontal-space) + (insert (concat " // " str )) + (if err (ding 't)))) + + (;- This is a begin..end block + (match-end 2) ; of verilog-end-block-ordered-re + (let ((str " // UNMATCHED !!") + (err 't) + (here (point)) + there + cntx) + (save-excursion + (verilog-leap-to-head) + (setq there (point)) + (if (not (match-end 0)) + (progn + (goto-char here) + (end-of-line) + (if kill-existing-comment + (verilog-kill-existing-comment)) + (delete-horizontal-space) + (insert str) + (ding 't)) + (let ((lim + (save-excursion (verilog-beg-of-defun) (point))) + (here (point))) + (cond + (;-- handle named block differently + (looking-at verilog-named-block-re) + (search-forward ":") + (setq there (point)) + (setq str (verilog-get-expr)) + (setq err nil) + (setq str (concat " // block: " str ))) + + ((verilog-in-case-region-p) ;-- handle case item differently + (goto-char here) + (setq str (verilog-backward-case-item lim)) + (setq there (point)) + (setq err nil) + (setq str (concat " // case: " str ))) + + (;- try to find "reason" for this begin + (cond + (; + (eq here (progn + ;; (verilog-backward-token) + (verilog-beg-of-statement) + (point))) + (setq err nil) + (setq str "")) + ((looking-at verilog-endcomment-reason-re) + (setq there (match-end 0)) + (setq cntx (concat (match-string 0) " ")) + (cond + (;- begin + (match-end 1) + (setq err nil) + (save-excursion + (if (and (verilog-continued-line) + (looking-at "\\\\|\\\\|\\")) + (progn + (goto-char (match-end 0)) + (setq there (point)) + (setq str + (concat " // " (match-string 0) " " (verilog-get-expr)))) + (setq str "")))) + + (;- else + (match-end 2) + (let ((nest 0) + ( reg "\\(\\\\)\\|\\(\\\\)\\|\\(\\\\)\\|\\(assert\\)")) + (catch 'skip + (while (verilog-re-search-backward reg nil 'move) + (cond + ((match-end 1) ; begin + (setq nest (1- nest))) + ((match-end 2) ; end + (setq nest (1+ nest))) + ((match-end 3) + (if (= 0 nest) + (progn + (goto-char (match-end 0)) + (setq there (point)) + (setq err nil) + (setq str (verilog-get-expr)) + (setq str (concat " // else: !if" str )) + (throw 'skip 1)))) + ((match-end 4) + (if (= 0 nest) + (progn + (goto-char (match-end 0)) + (setq there (point)) + (setq err nil) + (setq str (verilog-get-expr)) + (setq str (concat " // else: !assert " str )) + (throw 'skip 1))))))))) + (;- end else + (match-end 3) + (goto-char there) + (let ((nest 0) + (reg "\\(\\\\)\\|\\(\\\\)\\|\\(\\\\)\\|\\(assert\\)")) + (catch 'skip + (while (verilog-re-search-backward reg nil 'move) + (cond + ((match-end 1) ; begin + (setq nest (1- nest))) + ((match-end 2) ; end + (setq nest (1+ nest))) + ((match-end 3) + (if (= 0 nest) + (progn + (goto-char (match-end 0)) + (setq there (point)) + (setq err nil) + (setq str (verilog-get-expr)) + (setq str (concat " // else: !if" str )) + (throw 'skip 1)))) + ((match-end 4) + (if (= 0 nest) + (progn + (goto-char (match-end 0)) + (setq there (point)) + (setq err nil) + (setq str (verilog-get-expr)) + (setq str (concat " // else: !assert " str )) + (throw 'skip 1))))))))) + + (; always, always_comb, always_latch w/o @... + (match-end 5) + (goto-char (match-end 0)) + (setq there (point)) + (setq err nil) + (setq str (concat " // " cntx ))) + + (;- task/function/initial et cetera + t + (match-end 0) + (goto-char (match-end 0)) + (setq there (point)) + (setq err nil) + (setq str (concat " // " cntx (verilog-get-expr)))) + + (;-- otherwise... + (setq str " // auto-endcomment confused ")))) + + ((and + (verilog-in-case-region-p) ;-- handle case item differently + (progn + (setq there (point)) + (goto-char here) + (setq str (verilog-backward-case-item lim)))) + (setq err nil) + (setq str (concat " // case: " str ))) + + ((verilog-in-fork-region-p) + (setq err nil) + (setq str " // fork branch" )) + + ((looking-at "\\") + ;; HERE + (forward-word 1) + (verilog-forward-syntactic-ws) + (setq err nil) + (setq str (verilog-get-expr)) + (setq str (concat " // " cntx str ))) + + )))) + (goto-char here) + (end-of-line) + (if kill-existing-comment + (verilog-kill-existing-comment)) + (delete-horizontal-space) + (if (or err + (> (count-lines here there) verilog-minimum-comment-distance)) + (insert str)) + (if err (ding 't)) + )))) + (;- this is endclass, which can be nested + (match-end 11) ; of verilog-end-block-ordered-re + ;;(goto-char there) + (let ((nest 0) + (reg "\\<\\(class\\)\\|\\(endclass\\)\\|\\(package\\|primitive\\|\\(macro\\)?module\\)\\>") + string) + (save-excursion + (catch 'skip + (while (verilog-re-search-backward reg nil 'move) + (cond + ((match-end 3) ; endclass + (ding 't) + (setq string "unmatched endclass") + (throw 'skip 1)) + + ((match-end 2) ; endclass + (setq nest (1+ nest))) + + ((match-end 1) ; class + (setq nest (1- nest)) + (if (< nest 0) + (progn + (goto-char (match-end 0)) + (let (b e) + (setq b (progn + (skip-chars-forward "^ \t") + (verilog-forward-ws&directives) + (point)) + e (progn + (skip-chars-forward "a-zA-Z0-9_") + (point))) + (setq string (buffer-substring b e))) + (throw 'skip 1)))) + )))) + (end-of-line) + (if kill-existing-comment + (verilog-kill-existing-comment)) + (delete-horizontal-space) + (insert (concat " // " string )))) + + (; - this is end{function,generate,task,module,primitive,table,generate} + ;; - which can not be nested. + t + (let (string reg (name-re nil)) + (end-of-line) + (if kill-existing-comment + (save-match-data + (verilog-kill-existing-comment))) + (delete-horizontal-space) + (backward-sexp) + (cond + ((match-end 5) ; of verilog-end-block-ordered-re + (setq reg "\\(\\\\)\\|\\(\\<\\(endfunction\\|task\\|\\(macro\\)?module\\|primitive\\)\\>\\)") + (setq name-re "\\w+\\(?:\n\\|\\s-\\)*[(;]")) + ((match-end 6) ; of verilog-end-block-ordered-re + (setq reg "\\(\\\\)\\|\\(\\<\\(endtask\\|function\\|\\(macro\\)?module\\|primitive\\)\\>\\)") + (setq name-re "\\w+\\(?:\n\\|\\s-\\)*[(;]")) + ((match-end 7) ; of verilog-end-block-ordered-re + (setq reg "\\(\\<\\(macro\\)?module\\>\\)\\|\\")) + ((match-end 8) ; of verilog-end-block-ordered-re + (setq reg "\\(\\\\)\\|\\(\\<\\(endprimitive\\|package\\|interface\\|\\(macro\\)?module\\)\\>\\)")) + ((match-end 9) ; of verilog-end-block-ordered-re + (setq reg "\\(\\\\)\\|\\(\\<\\(endinterface\\|package\\|primitive\\|\\(macro\\)?module\\)\\>\\)")) + ((match-end 10) ; of verilog-end-block-ordered-re + (setq reg "\\(\\\\)\\|\\(\\<\\(endpackage\\|primitive\\|interface\\|\\(macro\\)?module\\)\\>\\)")) + ((match-end 11) ; of verilog-end-block-ordered-re + (setq reg "\\(\\\\)\\|\\(\\<\\(endclass\\|primitive\\|interface\\|\\(macro\\)?module\\)\\>\\)")) + ((match-end 12) ; of verilog-end-block-ordered-re + (setq reg "\\(\\\\)\\|\\(\\<\\(endcovergroup\\|primitive\\|interface\\|\\(macro\\)?module\\)\\>\\)")) + ((match-end 13) ; of verilog-end-block-ordered-re + (setq reg "\\(\\\\)\\|\\(\\<\\(endprogram\\|primitive\\|interface\\|\\(macro\\)?module\\)\\>\\)")) + ((match-end 14) ; of verilog-end-block-ordered-re + (setq reg "\\(\\<\\(rand\\)?sequence\\>\\)\\|\\(\\<\\(endsequence\\|primitive\\|interface\\|\\(macro\\)?module\\)\\>\\)")) + ((match-end 15) ; of verilog-end-block-ordered-re + (setq reg "\\(\\\\)\\|\\")) + ((match-end 16) ; of verilog-end-block-ordered-re + (setq reg "\\(\\\\)\\|\\")) + + (t (error "Problem in verilog-set-auto-endcomments"))) + (let (b e) + (save-excursion + (verilog-re-search-backward reg nil 'move) + (cond + ((match-end 1) + (setq b (progn + (skip-chars-forward "^ \t") + (verilog-forward-ws&directives) + (if (looking-at "static\\|automatic") + (progn + (goto-char (match-end 0)) + (verilog-forward-ws&directives))) + (if (and name-re (verilog-re-search-forward name-re nil 'move)) + (progn + (goto-char (match-beginning 0)) + (verilog-forward-ws&directives))) + (point)) + e (progn + (skip-chars-forward "a-zA-Z0-9_") + (point))) + (setq string (buffer-substring b e))) + (t + (ding 't) + (setq string "unmatched end(function|task|module|primitive|interface|package|class|clocking)"))))) + (end-of-line) + (insert (concat " // " string ))) + )))))))))) (defun verilog-get-expr() "Grab expression at point, e.g., case ( a | b & (c ^d))." @@ -5059,7 +5076,7 @@ Useful for creating tri's and other expanded fields." (let ((bpt (- (point) 2))) (end-of-line) (delete-region bpt (point)))))) - ;; + ;; (goto-char (point-min)) (while (re-search-forward "/\\*" nil t) (if (verilog-within-string) @@ -5073,7 +5090,7 @@ Useful for creating tri's and other expanded fields." (interactive) (goto-char (point-min)) (while (re-search-forward "\\([^;]\\)[ \t]*\n[ \t]*" nil t) - (replace-match "\\1 " nil nil))) + (replace-match "\\1 " nil nil))) (defun verilog-linter-name () "Return name of linter, either surelint or verilint." @@ -5085,7 +5102,7 @@ Useful for creating tri's and other expanded fields." ((equal compile-word1 "verilint") `verilint) ((equal lint-word1 "surelint") `surelint) ((equal lint-word1 "verilint") `verilint) - (t `surelint)))) ;; back compatibility + (t `surelint)))) ; back compatibility (defun verilog-lint-off () "Convert a Verilog linter warning line into a disable statement. @@ -5227,9 +5244,7 @@ FILENAME to find directory to run in, or defaults to `buffer-file-name'." ;; So avoid bytecomp's interactive-only by going through intern. (when fontlocked (funcall (intern "font-lock-fontify-buffer")))))))) - -;; -;; Batch +;;; Batch: ;; (defun verilog-warn (string &rest args) @@ -5251,7 +5266,7 @@ This lets programs calling batch mode to easily extract error messages." (progn ,@body) (error (error "%%Error: %s%s" (error-message-string err) - (if (featurep 'xemacs) "\n" "")))))) ;; XEmacs forgets to add a newline + (if (featurep 'xemacs) "\n" "")))))) ; XEmacs forgets to add a newline (defun verilog-batch-execute-func (funref &optional no-save) "Internal processing of a batch command. @@ -5291,7 +5306,7 @@ Save the result unless optional NO-SAVE is t." (set-buffer buf) (funcall funref) (when (and (not no-save) - (buffer-modified-p)) ;; Avoid "no changes to be saved" + (buffer-modified-p)) ; Avoid "no changes to be saved" (save-buffer))))) orig-buffer-list)))) @@ -5302,7 +5317,7 @@ with \\[verilog-auto] on all command-line files, and saves the buffers. For proper results, multiple filenames need to be passed on the command line in bottom-up order." (unless noninteractive - (error "Use verilog-batch-auto only with --batch")) ;; Otherwise we'd mess up buffer modes + (error "Use verilog-batch-auto only with --batch")) ; Otherwise we'd mess up buffer modes (verilog-batch-execute-func `verilog-auto)) (defun verilog-batch-delete-auto () @@ -5310,7 +5325,7 @@ line in bottom-up order." This sets up the appropriate Verilog mode environment, deletes automatics with \\[verilog-delete-auto] on all command-line files, and saves the buffers." (unless noninteractive - (error "Use verilog-batch-delete-auto only with --batch")) ;; Otherwise we'd mess up buffer modes + (error "Use verilog-batch-delete-auto only with --batch")) ; Otherwise we'd mess up buffer modes (verilog-batch-execute-func `verilog-delete-auto)) (defun verilog-batch-delete-trailing-whitespace () @@ -5319,7 +5334,7 @@ This sets up the appropriate Verilog mode environment, removes whitespace with \\[verilog-delete-trailing-whitespace] on all command-line files, and saves the buffers." (unless noninteractive - (error "Use verilog-batch-delete-trailing-whitespace only with --batch")) ;; Otherwise we'd mess up buffer modes + (error "Use verilog-batch-delete-trailing-whitespace only with --batch")) ; Otherwise we'd mess up buffer modes (verilog-batch-execute-func `verilog-delete-trailing-whitespace)) (defun verilog-batch-diff-auto () @@ -5329,7 +5344,7 @@ with \\[verilog-diff-auto] on all command-line files, and reports an error if any differences are observed. This is appropriate for adding to regressions to insure automatics are always properly maintained." (unless noninteractive - (error "Use verilog-batch-diff-auto only with --batch")) ;; Otherwise we'd mess up buffer modes + (error "Use verilog-batch-diff-auto only with --batch")) ; Otherwise we'd mess up buffer modes (verilog-batch-execute-func `verilog-diff-auto t)) (defun verilog-batch-inject-auto () @@ -5339,7 +5354,7 @@ with \\[verilog-inject-auto] on all command-line files, and saves the buffers. For proper results, multiple filenames need to be passed on the command line in bottom-up order." (unless noninteractive - (error "Use verilog-batch-inject-auto only with --batch")) ;; Otherwise we'd mess up buffer modes + (error "Use verilog-batch-inject-auto only with --batch")) ; Otherwise we'd mess up buffer modes (verilog-batch-execute-func `verilog-inject-auto)) (defun verilog-batch-indent () @@ -5347,12 +5362,10 @@ line in bottom-up order." This sets up the appropriate Verilog mode environment, calls \\[verilog-indent-buffer] on all command-line files, and saves the buffers." (unless noninteractive - (error "Use verilog-batch-indent only with --batch")) ;; Otherwise we'd mess up buffer modes + (error "Use verilog-batch-indent only with --batch")) ; Otherwise we'd mess up buffer modes (verilog-batch-execute-func `verilog-indent-buffer)) - -;; -;; Indentation +;;; Indentation: ;; (defconst verilog-indent-alist '((block . (+ ind verilog-indent-level)) @@ -5391,6 +5404,7 @@ type of the current line, return that lines' indent level and its type. Return a list of two elements: (INDENT-TYPE INDENT-LEVEL)." (save-excursion (let* ((starting_position (point)) + (case-fold-search nil) (par 0) (begin (looking-at "[ \t]*begin\\>")) (lim (save-excursion (verilog-re-search-backward "\\(\\\\)\\|\\(\\\\)" nil t))) @@ -5412,132 +5426,132 @@ Return a list of two elements: (INDENT-TYPE INDENT-LEVEL)." (not (or (looking-at "[ \t]*`[ou]vm_") (looking-at "[ \t]*`vmm_"))))) (throw 'nesting 'directive)) - ;; indent structs as if there were module level - (setq structres (verilog-in-struct-nested-p)) - (cond ((not structres) nil) - ;;((and structres (equal (char-after) ?\})) (throw 'nesting 'struct-close)) - ((> structres 0) (throw 'nesting 'nested-struct)) - ((= structres 0) (throw 'nesting 'block)) - (t nil)) - - ;; if we are in a parenthesized list, and the user likes to indent these, return. - ;; unless we are in the newfangled coverpoint or constraint blocks - (if (and - verilog-indent-lists - (verilog-in-paren) - (not (verilog-in-coverage-p)) - ) - (progn (setq par 1) - (throw 'nesting 'block))) - - ;; See if we are continuing a previous line - (while t - ;; trap out if we crawl off the top of the buffer - (if (bobp) (throw 'nesting 'cpp)) - - (if (and (verilog-continued-line-1 lim) - (or (not (verilog-in-coverage-p)) - (looking-at verilog-in-constraint-re) )) ;; may still get hosed if concat in constraint - (let ((sp (point))) - (if (and - (not (looking-at verilog-complete-reg)) - (verilog-continued-line-1 lim)) - (progn (goto-char sp) - (throw 'nesting 'cexp)) - - (goto-char sp)) - (if (and (verilog-in-coverage-p) - (looking-at verilog-in-constraint-re)) - (progn - (beginning-of-line) - (skip-chars-forward " \t") - (throw 'nesting 'constraint))) - (if (and begin - (not verilog-indent-begin-after-if) - (looking-at verilog-no-indent-begin-re)) - (progn - (beginning-of-line) - (skip-chars-forward " \t") - (throw 'nesting 'statement)) - (progn - (throw 'nesting 'cexp)))) - ;; not a continued line - (goto-char starting_position)) - - (if (looking-at "\\") - ;; search back for governing if, striding across begin..end pairs - ;; appropriately - (let ((elsec 1)) - (while (verilog-re-search-backward verilog-ends-re nil 'move) - (cond - ((match-end 1) ; else, we're in deep - (setq elsec (1+ elsec))) - ((match-end 2) ; if - (setq elsec (1- elsec)) - (if (= 0 elsec) - (if verilog-align-ifelse - (throw 'nesting 'statement) - (progn ;; back up to first word on this line - (beginning-of-line) - (verilog-forward-syntactic-ws) - (throw 'nesting 'statement))))) - ((match-end 3) ; assert block - (setq elsec (1- elsec)) - (verilog-beg-of-statement) ;; doesn't get to beginning - (if (looking-at verilog-property-re) - (throw 'nesting 'statement) ; We don't need an endproperty for these - (throw 'nesting 'block) ;We still need an endproperty - )) - (t ; endblock - ; try to leap back to matching outward block by striding across - ; indent level changing tokens then immediately - ; previous line governs indentation. - (let (( reg) (nest 1)) - ;; verilog-ends => else|if|end|join(_any|_none|)|endcase|endclass|endtable|endspecify|endfunction|endtask|endgenerate|endgroup - (cond - ((match-end 4) ; end - ;; Search back for matching begin - (setq reg "\\(\\\\)\\|\\(\\\\)" )) - ((match-end 5) ; endcase - ;; Search back for matching case - (setq reg "\\(\\\\|\\[^:]\\)\\|\\(\\\\)" )) - ((match-end 6) ; endfunction - ;; Search back for matching function - (setq reg "\\(\\\\)\\|\\(\\\\)" )) - ((match-end 7) ; endtask - ;; Search back for matching task - (setq reg "\\(\\\\)\\|\\(\\\\)" )) - ((match-end 8) ; endspecify - ;; Search back for matching specify - (setq reg "\\(\\\\)\\|\\(\\\\)" )) - ((match-end 9) ; endtable - ;; Search back for matching table - (setq reg "\\(\\\\)\\|\\(\\\\)" )) - ((match-end 10) ; endgenerate - ;; Search back for matching generate - (setq reg "\\(\\\\)\\|\\(\\\\)" )) - ((match-end 11) ; joins - ;; Search back for matching fork - (setq reg "\\(\\\\)\\|\\(\\\\)" )) - ((match-end 12) ; class - ;; Search back for matching class - (setq reg "\\(\\\\)\\|\\(\\\\)" )) - ((match-end 13) ; covergroup - ;; Search back for matching covergroup - (setq reg "\\(\\\\)\\|\\(\\\\)" ))) - (catch 'skip - (while (verilog-re-search-backward reg nil 'move) - (cond - ((match-end 1) ; begin - (setq nest (1- nest)) - (if (= 0 nest) - (throw 'skip 1))) - ((match-end 2) ; end - (setq nest (1+ nest))))) - ))))))) - (throw 'nesting (verilog-calc-1))) - );; catch nesting - );; type + ;; indent structs as if there were module level + (setq structres (verilog-in-struct-nested-p)) + (cond ((not structres) nil) + ;;((and structres (equal (char-after) ?\})) (throw 'nesting 'struct-close)) + ((> structres 0) (throw 'nesting 'nested-struct)) + ((= structres 0) (throw 'nesting 'block)) + (t nil)) + + ;; if we are in a parenthesized list, and the user likes to indent these, return. + ;; unless we are in the newfangled coverpoint or constraint blocks + (if (and + verilog-indent-lists + (verilog-in-paren) + (not (verilog-in-coverage-p)) + ) + (progn (setq par 1) + (throw 'nesting 'block))) + + ;; See if we are continuing a previous line + (while t + ;; trap out if we crawl off the top of the buffer + (if (bobp) (throw 'nesting 'cpp)) + + (if (and (verilog-continued-line-1 lim) + (or (not (verilog-in-coverage-p)) + (looking-at verilog-in-constraint-re) )) ; may still get hosed if concat in constraint + (let ((sp (point))) + (if (and + (not (looking-at verilog-complete-reg)) + (verilog-continued-line-1 lim)) + (progn (goto-char sp) + (throw 'nesting 'cexp)) + + (goto-char sp)) + (if (and (verilog-in-coverage-p) + (looking-at verilog-in-constraint-re)) + (progn + (beginning-of-line) + (skip-chars-forward " \t") + (throw 'nesting 'constraint))) + (if (and begin + (not verilog-indent-begin-after-if) + (looking-at verilog-no-indent-begin-re)) + (progn + (beginning-of-line) + (skip-chars-forward " \t") + (throw 'nesting 'statement)) + (progn + (throw 'nesting 'cexp)))) + ;; not a continued line + (goto-char starting_position)) + + (if (looking-at "\\") + ;; search back for governing if, striding across begin..end pairs + ;; appropriately + (let ((elsec 1)) + (while (verilog-re-search-backward verilog-ends-re nil 'move) + (cond + ((match-end 1) ; else, we're in deep + (setq elsec (1+ elsec))) + ((match-end 2) ; if + (setq elsec (1- elsec)) + (if (= 0 elsec) + (if verilog-align-ifelse + (throw 'nesting 'statement) + (progn ; back up to first word on this line + (beginning-of-line) + (verilog-forward-syntactic-ws) + (throw 'nesting 'statement))))) + ((match-end 3) ; assert block + (setq elsec (1- elsec)) + (verilog-beg-of-statement) ; doesn't get to beginning + (if (looking-at verilog-property-re) + (throw 'nesting 'statement) ; We don't need an endproperty for these + (throw 'nesting 'block) ; We still need an endproperty + )) + (t ; endblock + ;; try to leap back to matching outward block by striding across + ;; indent level changing tokens then immediately + ;; previous line governs indentation. + (let (( reg) (nest 1)) + ;; verilog-ends => else|if|end|join(_any|_none|)|endcase|endclass|endtable|endspecify|endfunction|endtask|endgenerate|endgroup + (cond + ((match-end 4) ; end + ;; Search back for matching begin + (setq reg "\\(\\\\)\\|\\(\\\\)" )) + ((match-end 5) ; endcase + ;; Search back for matching case + (setq reg "\\(\\\\|\\[^:]\\)\\|\\(\\\\)" )) + ((match-end 6) ; endfunction + ;; Search back for matching function + (setq reg "\\(\\\\)\\|\\(\\\\)" )) + ((match-end 7) ; endtask + ;; Search back for matching task + (setq reg "\\(\\\\)\\|\\(\\\\)" )) + ((match-end 8) ; endspecify + ;; Search back for matching specify + (setq reg "\\(\\\\)\\|\\(\\\\)" )) + ((match-end 9) ; endtable + ;; Search back for matching table + (setq reg "\\(\\\\)\\|\\(\\\\)" )) + ((match-end 10) ; endgenerate + ;; Search back for matching generate + (setq reg "\\(\\\\)\\|\\(\\\\)" )) + ((match-end 11) ; joins + ;; Search back for matching fork + (setq reg "\\(\\\\)\\|\\(\\\\)" )) + ((match-end 12) ; class + ;; Search back for matching class + (setq reg "\\(\\\\)\\|\\(\\\\)" )) + ((match-end 13) ; covergroup + ;; Search back for matching covergroup + (setq reg "\\(\\\\)\\|\\(\\\\)" ))) + (catch 'skip + (while (verilog-re-search-backward reg nil 'move) + (cond + ((match-end 1) ; begin + (setq nest (1- nest)) + (if (= 0 nest) + (throw 'skip 1))) + ((match-end 2) ; end + (setq nest (1+ nest))))) + ))))))) + (throw 'nesting (verilog-calc-1))) + ) ; catch nesting + ) ; type ) ;; Return type of block and indent level. (if (not type) @@ -5545,18 +5559,18 @@ Return a list of two elements: (INDENT-TYPE INDENT-LEVEL)." (if (> par 0) ; Unclosed Parenthesis (list 'cparenexp par) (cond - ((eq type 'case) - (list type (verilog-case-indent-level))) - ((eq type 'statement) - (list type (current-column))) - ((eq type 'defun) - (list type 0)) - ((eq type 'constraint) - (list 'block (current-column))) - ((eq type 'nested-struct) - (list 'block structres)) - (t - (list type (verilog-current-indent-level)))))))) + ((eq type 'case) + (list type (verilog-case-indent-level))) + ((eq type 'statement) + (list type (current-column))) + ((eq type 'defun) + (list type 0)) + ((eq type 'constraint) + (list 'block (current-column))) + ((eq type 'nested-struct) + (list 'block structres)) + (t + (list type (verilog-current-indent-level)))))))) (defun verilog-wai () "Show matching nesting block for debugging." @@ -5570,18 +5584,18 @@ Return a list of two elements: (INDENT-TYPE INDENT-LEVEL)." (if (and verilog-indent-lists (not(or (verilog-in-coverage-p) - (verilog-in-struct-p))) + (verilog-in-struct-p))) (verilog-in-paren)) (setq depth 1) (cond - ((eq type 'case) - (setq depth (verilog-case-indent-level))) - ((eq type 'statement) - (setq depth (current-column))) - ((eq type 'defun) - (setq depth 0)) - (t - (setq depth (verilog-current-indent-level))))) + ((eq type 'case) + (setq depth (verilog-case-indent-level))) + ((eq type 'statement) + (setq depth (current-column))) + ((eq type 'defun) + (setq depth 0)) + (t + (setq depth (verilog-current-indent-level))))) (message "You are at nesting %s depth %d" type depth)))) (defun verilog-calc-1 () @@ -5589,108 +5603,115 @@ Return a list of two elements: (INDENT-TYPE INDENT-LEVEL)." (let ((re (concat "\\({\\|}\\|" verilog-indent-re "\\)")) (inconstraint (verilog-in-coverage-p))) (while (verilog-re-search-backward re nil 'move) - (catch 'continue - (cond - ((equal (char-after) ?\{) + (catch 'continue + (cond + ((equal (char-after) ?\{) ;; block type returned based on outer constraint { or inner - (if (verilog-at-constraint-p) + (if (verilog-at-constraint-p) (cond (inconstraint (beginning-of-line nil) (skip-chars-forward " \t") (throw 'nesting 'constraint)) (t (throw 'nesting 'statement))))) - ((equal (char-after) ?\}) - (let (par-pos + ((equal (char-after) ?\}) + (let (par-pos (there (verilog-at-close-constraint-p))) - (if there ;; we are at the } that closes a constraint. Find the { that opens it - (progn - (if (> (verilog-in-paren-count) 0) + (if there ; we are at the } that closes a constraint. Find the { that opens it + (progn + (if (> (verilog-in-paren-count) 0) (forward-char 1)) (setq par-pos (verilog-parenthesis-depth)) (cond (par-pos - (goto-char par-pos) - (forward-char 1)) - (t - (backward-char 1))))))) - - ((looking-at verilog-beg-block-re-ordered) - (cond - ((match-end 2) ; *sigh* could be "unique case" or "priority casex" - (let ((here (point))) - (verilog-beg-of-statement) - (if (looking-at verilog-extended-case-re) - (throw 'nesting 'case) - (goto-char here))) - (throw 'nesting 'case)) - - ((match-end 4) ; *sigh* could be "disable fork" - (let ((here (point))) - (verilog-beg-of-statement) - (if (looking-at verilog-disable-fork-re) - t ; this is a normal statement - (progn ; or is fork, starts a new block - (goto-char here) - (throw 'nesting 'block))))) - - ((match-end 27) ; *sigh* might be a clocking declaration - (let ((here (point))) - (if (verilog-in-paren) - t ; this is a normal statement - (progn ; or is fork, starts a new block - (goto-char here) - (throw 'nesting 'block))))) - - ;; need to consider typedef struct here... - ((looking-at "\\") - ; *sigh* These words have an optional prefix: - ; extern {virtual|protected}? function a(); - ; typedef class foo; - ; and we don't want to confuse this with - ; function a(); - ; property - ; ... - ; endfunction - (verilog-beg-of-statement) - (if (looking-at verilog-beg-block-re-ordered) - (throw 'nesting 'block) - (throw 'nesting 'defun))) - - ;; - ((looking-at "\\") - ; *sigh* - ; {assert|assume|cover} property (); are complete - ; and could also be labeled: - foo: assert property - ; but - ; property ID () ... needs end_property - (verilog-beg-of-statement) - (if (looking-at verilog-property-re) - (throw 'continue 'statement) ; We don't need an endproperty for these - (throw 'nesting 'block) ;We still need an endproperty - )) - - (t (throw 'nesting 'block)))) - - ((looking-at verilog-end-block-re) - (verilog-leap-to-head) - (if (verilog-in-case-region-p) - (progn - (verilog-leap-to-case-head) - (if (looking-at verilog-extended-case-re) - (throw 'nesting 'case))))) - - ((looking-at verilog-defun-level-re) - (if (looking-at verilog-defun-level-generate-only-re) - (if (verilog-in-generate-region-p) - (throw 'continue 'foo) ; always block in a generate - keep looking - (throw 'nesting 'defun)) - (throw 'nesting 'defun))) - - ((looking-at verilog-cpp-level-re) - (throw 'nesting 'cpp)) - - ((bobp) - (throw 'nesting 'cpp))))) + (goto-char par-pos) + (forward-char 1)) + (t + (backward-char 1))))))) + + ((looking-at verilog-beg-block-re-ordered) + (cond + ((match-end 2) ; *sigh* could be "unique case" or "priority casex" + (let ((here (point))) + (verilog-beg-of-statement) + (if (looking-at verilog-extended-case-re) + (throw 'nesting 'case) + (goto-char here))) + (throw 'nesting 'case)) + + ((match-end 4) ; *sigh* could be "disable fork" + (let ((here (point))) + (verilog-beg-of-statement) + (if (looking-at verilog-disable-fork-re) + t ; this is a normal statement + (progn ; or is fork, starts a new block + (goto-char here) + (throw 'nesting 'block))))) + + ((match-end 27) ; *sigh* might be a clocking declaration + (let ((here (point))) + (if (verilog-in-paren) + t ; this is a normal statement + (progn ; or is fork, starts a new block + (goto-char here) + (throw 'nesting 'block))))) + + ;; need to consider typedef struct here... + ((looking-at "\\") + ;; *sigh* These words have an optional prefix: + ;; extern {virtual|protected}? function a(); + ;; typedef class foo; + ;; and we don't want to confuse this with + ;; function a(); + ;; property + ;; ... + ;; endfunction + (verilog-beg-of-statement) + (cond + ((looking-at verilog-dpi-import-export-re) + (throw 'continue 'foo)) + ((looking-at "\\\\s-+\\\\s-+\\(?:\\<\\(local\\|protected\\|static\\)\\>\\s-+\\)?\\<\\(function\\|task\\)\\>\\s-+") + (throw 'nesting 'statement)) + ((looking-at verilog-beg-block-re-ordered) + (throw 'nesting 'block)) + (t + (throw 'nesting 'defun)))) + + ;; + ((looking-at "\\") + ;; *sigh* + ;; {assert|assume|cover} property (); are complete + ;; and could also be labeled: - foo: assert property + ;; but + ;; property ID () ... needs end_property + (verilog-beg-of-statement) + (if (looking-at verilog-property-re) + (throw 'continue 'statement) ; We don't need an endproperty for these + (throw 'nesting 'block) ;We still need an endproperty + )) + + (t (throw 'nesting 'block)))) + + ((looking-at verilog-end-block-re) + (verilog-leap-to-head) + (if (verilog-in-case-region-p) + (progn + (verilog-leap-to-case-head) + (if (looking-at verilog-extended-case-re) + (throw 'nesting 'case))))) + + ((looking-at verilog-defun-level-re) + (if (looking-at verilog-defun-level-generate-only-re) + (if (or (verilog-in-generate-region-p) + (verilog-in-deferred-immediate-final-p)) + (throw 'continue 'foo) ; always block in a generate - keep looking + (throw 'nesting 'defun)) + (throw 'nesting 'defun))) + + ((looking-at verilog-cpp-level-re) + (throw 'nesting 'cpp)) + + ((bobp) + (throw 'nesting 'cpp))))) (throw 'nesting 'cpp)))) @@ -5698,8 +5719,8 @@ Return a list of two elements: (INDENT-TYPE INDENT-LEVEL)." "Return indentation level for directive. For speed, the searcher looks at the last directive, not the indent of the appropriate enclosing block." - (let ((base -1) ;; Indent of the line that determines our indentation - (ind 0)) ;; Relative offset caused by other directives (like `endif on same line as `else) + (let ((base -1) ; Indent of the line that determines our indentation + (ind 0)) ; Relative offset caused by other directives (like `endif on same line as `else) ;; Start at current location, scan back for another directive (save-excursion @@ -5708,9 +5729,9 @@ of the appropriate enclosing block." (verilog-re-search-backward verilog-directive-re nil t)) (cond ((save-excursion (skip-chars-backward " \t") (bolp)) (setq base (current-indentation)))) - (cond ((and (looking-at verilog-directive-end) (< base 0)) ;; Only matters when not at BOL + (cond ((and (looking-at verilog-directive-end) (< base 0)) ; Only matters when not at BOL (setq ind (- ind verilog-indent-level-directive))) - ((and (looking-at verilog-directive-middle) (>= base 0)) ;; Only matters when at BOL + ((and (looking-at verilog-directive-middle) (>= base 0)) ; Only matters when at BOL (setq ind (+ ind verilog-indent-level-directive))) ((looking-at verilog-directive-begin) (setq ind (+ ind verilog-indent-level-directive))))) @@ -5723,7 +5744,7 @@ of the appropriate enclosing block." (cond ((or (looking-at verilog-directive-middle) (looking-at verilog-directive-end)) (setq ind (max 0 (- ind verilog-indent-level-directive)))))) - ind)) + ind)) (defun verilog-leap-to-case-head () (let ((nest 1)) @@ -5784,7 +5805,7 @@ Jump from end to matching begin, from endcase to matching case, and so on." ;; 8: Search back for matching function (setq reg "\\(\\\\)\\|\\(\\(\\(\\\\s-+\\)\\|\\(\\\\s-+\\)\\)+\\\\)") (setq nesting 'no)) - ;;(setq reg "\\(\\\\)\\|\\(\\\\)" )) + ;;(setq reg "\\(\\\\)\\|\\(\\\\)" )) ((looking-at "\\") ;; 8: Search back for matching generate (setq reg "\\(\\\\)\\|\\(\\\\)" )) @@ -5870,7 +5891,7 @@ Set point to where line starts." (save-excursion (skip-chars-backward " \t") (not (bolp)))) - (setq continued (verilog-backward-token))))) + (setq continued (verilog-backward-token))))) (setq continued nil)) continued)) @@ -5884,14 +5905,14 @@ Set point to where line starts." (;-- Anything ending in a ; is complete (= (preceding-char) ?\;) nil) - (; If a "}" is prefixed by a ";", then this is a complete statement - ; i.e.: constraint foo { a = b; } + (; If a "}" is prefixed by a ";", then this is a complete statement + ;; i.e.: constraint foo { a = b; } (= (preceding-char) ?\}) (progn (backward-char) (not(verilog-at-close-constraint-p)))) (;-- constraint foo { a = b } - ; is a complete statement. *sigh* + ;; is a complete statement. *sigh* (= (preceding-char) ?\{) (progn (backward-char) @@ -5909,10 +5930,10 @@ Set point to where line starts." t) (;-- Could be 'case (foo)' or 'always @(bar)' which is complete - ; also could be simply '@(foo)' - ; or foo u1 #(a=8) - ; (b, ... which ISN'T complete - ;;;; Do we need this??? + ;; also could be simply '@(foo)' + ;; or foo u1 #(a=8) + ;; (b, ... which ISN'T complete + ;; Do we need this??? (= (preceding-char) ?\)) (progn (backward-char) @@ -5936,16 +5957,16 @@ Set point to where line starts." t) ((looking-at verilog-ovm-end-re) t) - ;; JBA find VMM macros - ((looking-at verilog-vmm-statement-re) - nil ) - ((looking-at verilog-vmm-begin-re) - t) - ((looking-at verilog-vmm-end-re) - nil) - ;; JBA trying to catch macro lines with no ; at end - ((looking-at "\\<`") - nil) + ;; JBA find VMM macros + ((looking-at verilog-vmm-statement-re) + nil ) + ((looking-at verilog-vmm-begin-re) + t) + ((looking-at verilog-vmm-end-re) + nil) + ;; JBA trying to catch macro lines with no ; at end + ((looking-at "\\<`") + nil) (t (goto-char back) (cond @@ -6003,16 +6024,16 @@ Set point to where line starts." (defun verilog-backward-syntactic-ws-quick () "As with `verilog-backward-syntactic-ws' but use `verilog-scan' cache." (while (cond ((bobp) - nil) ; Done - ((> (skip-syntax-backward " ") 0) - t) - ((eq (preceding-char) ?\n) ;; \n's terminate // so aren't space syntax - (forward-char -1) - t) - ((or (verilog-inside-comment-or-string-p (1- (point))) - (verilog-inside-comment-or-string-p (point))) - (re-search-backward "[/\"]" nil t) ;; Only way a comment or quote can begin - t)))) + nil) ; Done + ((< (skip-syntax-backward " ") 0) + t) + ((eq (preceding-char) ?\n) ; \n's terminate // so aren't space syntax + (forward-char -1) + t) + ((or (verilog-inside-comment-or-string-p (1- (point))) + (verilog-inside-comment-or-string-p (point))) + (re-search-backward "[/\"]" nil t) ; Only way a comment or quote can begin + t)))) (defun verilog-forward-syntactic-ws () (verilog-skip-forward-comment-p) @@ -6029,10 +6050,10 @@ Optional BOUND limits search." (progn (let ((state (save-excursion (verilog-syntax-ppss)))) (cond - ((nth 7 state) ;; in // comment + ((nth 7 state) ; in // comment (verilog-re-search-backward "//" nil 'move) (skip-chars-backward "/")) - ((nth 4 state) ;; in /* */ comment + ((nth 4 state) ; in /* */ comment (verilog-re-search-backward "/\*" nil 'move)))) (narrow-to-region bound (point)) (while (/= here (point)) @@ -6041,6 +6062,9 @@ Optional BOUND limits search." (setq p (save-excursion (beginning-of-line) + ;; for as long as we're right after a continued line, keep moving up + (while (and (verilog-looking-back "\\\\[\n\r\f]" nil) + (forward-line -1))) (cond ((and verilog-highlight-translate-off (verilog-within-translate-off)) @@ -6062,19 +6086,19 @@ Optional BOUND limits search." (progn (let ((state (save-excursion (verilog-syntax-ppss)))) (cond - ((nth 7 state) ;; in // comment + ((nth 7 state) ; in // comment (end-of-line) (forward-char 1) (skip-chars-forward " \t\n\f") ) - ((nth 4 state) ;; in /* */ comment + ((nth 4 state) ; in /* */ comment (verilog-re-search-forward "\*\/\\s-*" nil 'move)))) (narrow-to-region (point) bound) (while (/= here (point)) (setq here (point) jump nil) (forward-comment (buffer-size)) - (and (looking-at "\\s-*(\\*.*\\*)\\s-*") ;; Attribute + (and (looking-at "\\s-*(\\*.*\\*)\\s-*") ; Attribute (goto-char (match-end 0))) (save-excursion (beginning-of-line) @@ -6084,38 +6108,38 @@ Optional BOUND limits search." (beginning-of-line 2)))))))) (defun verilog-in-comment-p () - "Return true if in a star or // comment." - (let ((state (save-excursion (verilog-syntax-ppss)))) - (or (nth 4 state) (nth 7 state)))) + "Return true if in a star or // comment." + (let ((state (save-excursion (verilog-syntax-ppss)))) + (or (nth 4 state) (nth 7 state)))) (defun verilog-in-star-comment-p () - "Return true if in a star comment." - (let ((state (save-excursion (verilog-syntax-ppss)))) - (and - (nth 4 state) ; t if in a comment of style a // or b /**/ - (not - (nth 7 state) ; t if in a comment of style b /**/ - )))) + "Return true if in a star comment." + (let ((state (save-excursion (verilog-syntax-ppss)))) + (and + (nth 4 state) ; t if in a comment of style a // or b /**/ + (not + (nth 7 state) ; t if in a comment of style b /**/ + )))) (defun verilog-in-slash-comment-p () - "Return true if in a slash comment." - (let ((state (save-excursion (verilog-syntax-ppss)))) - (nth 7 state))) + "Return true if in a slash comment." + (let ((state (save-excursion (verilog-syntax-ppss)))) + (nth 7 state))) (defun verilog-in-comment-or-string-p () - "Return true if in a string or comment." - (let ((state (save-excursion (verilog-syntax-ppss)))) - (or (nth 3 state) (nth 4 state) (nth 7 state)))) ; Inside string or comment) + "Return true if in a string or comment." + (let ((state (save-excursion (verilog-syntax-ppss)))) + (or (nth 3 state) (nth 4 state) (nth 7 state)))) ; Inside string or comment) (defun verilog-in-attribute-p () - "Return true if point is in an attribute (* [] attribute *)." - (save-match-data - (save-excursion - (verilog-re-search-backward "\\((\\*\\)\\|\\(\\*)\\)" nil 'move) - (cond - ((match-end 1) - (progn (goto-char (match-end 1)) - (not (looking-at "\\s-*)"))) + "Return true if point is in an attribute (* [] attribute *)." + (save-match-data + (save-excursion + (verilog-re-search-backward "\\((\\*\\)\\|\\(\\*)\\)" nil 'move) + (cond + ((match-end 1) + (progn (goto-char (match-end 1)) + (not (looking-at "\\s-*)"))) nil) ((match-end 2) (progn (goto-char (match-beginning 2)) @@ -6124,91 +6148,93 @@ Optional BOUND limits search." (t nil))))) (defun verilog-in-parameter-p () - "Return true if point is in a parameter assignment #( p1=1, p2=5)." - (save-match-data - (save-excursion - (verilog-re-search-backward "\\(#(\\)\\|\\()\\)" nil 'move) - (numberp (match-beginning 1))))) + "Return true if point is in a parameter assignment #( p1=1, p2=5)." + (save-match-data + (save-excursion + (verilog-re-search-backward "\\(#(\\)\\|\\()\\)" nil 'move) + (numberp (match-beginning 1))))) (defun verilog-in-escaped-name-p () - "Return true if in an escaped name." - (save-excursion - (backward-char) - (skip-chars-backward "^ \t\n\f") - (if (equal (char-after (point) ) ?\\ ) - t - nil))) + "Return true if in an escaped name." + (save-excursion + (backward-char) + (skip-chars-backward "^ \t\n\f") + (if (equal (char-after (point) ) ?\\ ) + t + nil))) + (defun verilog-in-directive-p () - "Return true if in a directive." - (save-excursion - (beginning-of-line) - (looking-at verilog-directive-re-1))) + "Return true if in a directive." + (save-excursion + (beginning-of-line) + (looking-at verilog-directive-re-1))) (defun verilog-in-parenthesis-p () - "Return true if in a ( ) expression (but not { } or [ ])." - (save-match-data - (save-excursion - (verilog-re-search-backward "\\((\\)\\|\\()\\)" nil 'move) - (numberp (match-beginning 1))))) + "Return true if in a ( ) expression (but not { } or [ ])." + (save-match-data + (save-excursion + (verilog-re-search-backward "\\((\\)\\|\\()\\)" nil 'move) + (numberp (match-beginning 1))))) (defun verilog-in-paren () - "Return true if in a parenthetical expression. + "Return true if in a parenthetical expression. May cache result using `verilog-syntax-ppss'." - (let ((state (save-excursion (verilog-syntax-ppss)))) - (> (nth 0 state) 0 ))) + (let ((state (save-excursion (verilog-syntax-ppss)))) + (> (nth 0 state) 0 ))) (defun verilog-in-paren-count () - "Return paren depth, floor to 0. + "Return paren depth, floor to 0. May cache result using `verilog-syntax-ppss'." - (let ((state (save-excursion (verilog-syntax-ppss)))) - (if (> (nth 0 state) 0) - (nth 0 state) - 0 ))) + (let ((state (save-excursion (verilog-syntax-ppss)))) + (if (> (nth 0 state) 0) + (nth 0 state) + 0 ))) (defun verilog-in-paren-quick () - "Return true if in a parenthetical expression. + "Return true if in a parenthetical expression. Always starts from `point-min', to allow inserts with hooks disabled." - ;; The -quick refers to its use alongside the other -quick functions, - ;; not that it's likely to be faster than verilog-in-paren. - (let ((state (save-excursion (parse-partial-sexp (point-min) (point))))) - (> (nth 0 state) 0 ))) + ;; The -quick refers to its use alongside the other -quick functions, + ;; not that it's likely to be faster than verilog-in-paren. + (let ((state (save-excursion (parse-partial-sexp (point-min) (point))))) + (> (nth 0 state) 0 ))) (defun verilog-in-struct-p () - "Return true if in a struct declaration." - (interactive) - (save-excursion - (if (verilog-in-paren) - (progn - (verilog-backward-up-list 1) - (verilog-at-struct-p) - ) - nil))) + "Return true if in a struct declaration." + (interactive) + (save-excursion + (if (verilog-in-paren) + (progn + (verilog-backward-up-list 1) + (verilog-at-struct-p) + ) + nil))) (defun verilog-in-struct-nested-p () - "Return nil for not in struct. + "Return nil for not in struct. Return 0 for in non-nested struct. Return >0 for nested struct." - (interactive) - (let (col) - (save-excursion - (if (verilog-in-paren) - (progn - (verilog-backward-up-list 1) - (setq col (verilog-at-struct-mv-p)) - (if col - (if (verilog-in-struct-p) (current-column) 0))) - nil)))) + (interactive) + (let (col) + (save-excursion + (if (verilog-in-paren) + (progn + (verilog-backward-up-list 1) + (setq col (verilog-at-struct-mv-p)) + (if col + (if (verilog-in-struct-p) (current-column) 0))) + nil)))) (defun verilog-in-coverage-p () - "Return true if in a constraint or coverpoint expression." - (interactive) - (save-excursion - (if (verilog-in-paren) - (progn - (verilog-backward-up-list 1) - (verilog-at-constraint-p) - ) - nil))) + "Return true if in a constraint or coverpoint expression." + (interactive) + (save-excursion + (if (verilog-in-paren) + (progn + (verilog-backward-up-list 1) + (verilog-at-constraint-p) + ) + nil))) + (defun verilog-at-close-constraint-p () "If at the } that closes a constraint or covergroup, return true." (if (and @@ -6218,8 +6244,8 @@ Return >0 for nested struct." (save-excursion (verilog-backward-ws&directives) (if (or (equal (char-before) ?\;) - (equal (char-before) ?\}) ;; can end with inner constraint { } block or ; - (equal (char-before) ?\{)) ;; empty constraint block + (equal (char-before) ?\}) ; can end with inner constraint { } block or ; + (equal (char-before) ?\{)) ; empty constraint block (point) nil)))) @@ -6227,17 +6253,17 @@ Return >0 for nested struct." "If at the { of a constraint or coverpoint definition, return true, moving point to constraint." (if (save-excursion (let ((p (point))) - (and - (equal (char-after) ?\{) - (forward-list) - (progn (backward-char 1) - (verilog-backward-ws&directives) - (and - (or (equal (char-before) ?\{) ;; empty case - (equal (char-before) ?\;) - (equal (char-before) ?\})) - ;; skip what looks like bus repetition operator {#{ - (not (string-match "^{\\s-*[0-9]+\\s-*{" (buffer-substring p (point))))))))) + (and + (equal (char-after) ?\{) + (forward-list) + (progn (backward-char 1) + (verilog-backward-ws&directives) + (and + (or (equal (char-before) ?\{) ; empty case + (equal (char-before) ?\;) + (equal (char-before) ?\})) + ;; skip what looks like bus repetition operator {#{ + (not (string-match "^{\\s-*[0-9]+\\s-*{" (buffer-substring p (point))))))))) (progn (let ( (pt (point)) (pass 0)) (verilog-backward-ws&directives) @@ -6246,7 +6272,7 @@ Return >0 for nested struct." (progn (setq pass 1) (if (looking-at "\\") (progn (verilog-backward-ws&directives) - (beginning-of-line) ;; 1 + (beginning-of-line) ; 1 (verilog-forward-ws&directives) 1 ) (verilog-beg-of-statement) @@ -6294,76 +6320,78 @@ Return >0 for nested struct." nil)) (defun verilog-parenthesis-depth () - "Return non zero if in parenthetical-expression." - (save-excursion (nth 1 (verilog-syntax-ppss)))) + "Return non zero if in parenthetical-expression." + (save-excursion (nth 1 (verilog-syntax-ppss)))) (defun verilog-skip-forward-comment-or-string () - "Return true if in a string or comment." - (let ((state (save-excursion (verilog-syntax-ppss)))) - (cond - ((nth 3 state) ;Inside string - (search-forward "\"") - t) - ((nth 7 state) ;Inside // comment - (forward-line 1) - t) - ((nth 4 state) ;Inside any comment (hence /**/) - (search-forward "*/")) - (t - nil)))) + "Return true if in a string or comment." + (let ((state (save-excursion (verilog-syntax-ppss)))) + (cond + ((nth 3 state) ;Inside string + (search-forward "\"") + t) + ((nth 7 state) ;Inside // comment + (forward-line 1) + t) + ((nth 4 state) ;Inside any comment (hence /**/) + (search-forward "*/")) + (t + nil)))) (defun verilog-skip-backward-comment-or-string () - "Return true if in a string or comment." - (let ((state (save-excursion (verilog-syntax-ppss)))) - (cond - ((nth 3 state) ;Inside string - (search-backward "\"") - t) - ((nth 7 state) ;Inside // comment - (search-backward "//") - (skip-chars-backward "/") - t) - ((nth 4 state) ;Inside /* */ comment - (search-backward "/*") - t) - (t - nil)))) + "Return true if in a string or comment." + (let ((state (save-excursion (verilog-syntax-ppss)))) + (cond + ((nth 3 state) ;Inside string + (search-backward "\"") + t) + ((nth 7 state) ;Inside // comment + (search-backward "//") + (skip-chars-backward "/") + t) + ((nth 4 state) ;Inside /* */ comment + (search-backward "/*") + t) + (t + nil)))) (defun verilog-skip-backward-comments () - "Return true if a comment was skipped." - (let ((more t)) - (while more - (setq more - (let ((state (save-excursion (verilog-syntax-ppss)))) - (cond - ((nth 7 state) ;Inside // comment - (search-backward "//") - (skip-chars-backward "/") - (skip-chars-backward " \t\n\f") - t) - ((nth 4 state) ;Inside /* */ comment - (search-backward "/*") - (skip-chars-backward " \t\n\f") - t) - ((and (not (bobp)) - (= (char-before) ?\/) - (= (char-before (1- (point))) ?\*)) - (goto-char (- (point) 2)) - t) ;; Let nth 4 state handle the rest - ((and (not (bobp)) - (verilog-looking-back "\\*)" nil) - (not (verilog-looking-back "(\\s-*\\*)" nil))) - (goto-char (- (point) 2)) - (if (search-backward "(*" nil t) - (progn - (skip-chars-backward " \t\n\f") - t) - (progn - (goto-char (+ (point) 2)) - nil))) - (t - (/= (skip-chars-backward " \t\n\f") 0)))))))) + "Return true if a comment was skipped." + (let ((more t)) + (while more + (setq more + (let ((state (save-excursion (verilog-syntax-ppss)))) + (cond + ((nth 7 state) ;Inside // comment + (search-backward "//") + (skip-chars-backward "/") + (skip-chars-backward " \t\n\f") + t) + ((nth 4 state) ;Inside /* */ comment + (search-backward "/*") + (skip-chars-backward " \t\n\f") + t) + ((and (not (bobp)) + (= (char-before) ?\/) + (= (char-before (1- (point))) ?\*)) + (goto-char (- (point) 2)) + t) ; Let nth 4 state handle the rest + ((and (not (bobp)) + ;;(verilog-looking-back "\\*)" nil) ;; super slow, use two char-before instead + (= (char-before) ?\)) + (= (char-before (1- (point))) ?\*) + (not (verilog-looking-back "(\\s-*\\*)" nil))) ;; slow but unlikely to be called + (goto-char (- (point) 2)) + (if (search-backward "(*" nil t) + (progn + (skip-chars-backward " \t\n\f") + t) + (progn + (goto-char (+ (point) 2)) + nil))) + (t + (/= (skip-chars-backward " \t\n\f") 0)))))))) (defun verilog-skip-forward-comment-p () "If in comment, move to end and return true." @@ -6397,7 +6425,7 @@ Return >0 for nested struct." (progn (goto-char h) nil)))) - ((and (looking-at "(\\*") ;; attribute start, but not an event (*) or (* ) + ((and (looking-at "(\\*") ; attribute start, but not an event (*) or (* ) (not (looking-at "(\\*\\s-*)"))) (progn (setq h (point)) @@ -6463,7 +6491,7 @@ Only look at a few lines to determine indent level." (verilog-beg-of-statement-1) (setq fst (point)) (if (looking-at verilog-declaration-re) - (progn ;; we have multiple words + (progn ; we have multiple words (goto-char (match-end 0)) (skip-chars-forward " \t") (cond @@ -6497,7 +6525,11 @@ Only look at a few lines to determine indent level." (let ((val)) (verilog-beg-of-statement-1) (if (and (< (point) here) - (verilog-re-search-forward "=[ \\t]*" here 'move)) + (verilog-re-search-forward "=[ \\t]*" here 'move) + ;; not at a |=>, #=#, or [=n] operator + (not (string-match "\\[=.\\|#=#\\||=>" + (or (buffer-substring (- (point) 2) (1+ (point))) + "")))) ; don't let buffer over/under-run spoil the party (setq val (current-column)) (setq val (eval (cdr (assoc type verilog-indent-alist))))) (goto-char here) @@ -6509,11 +6541,11 @@ Only look at a few lines to determine indent level." (val (save-excursion (verilog-backward-up-list 1) (forward-char 1) - (if verilog-indent-lists - (skip-chars-forward " \t") - (verilog-forward-syntactic-ws)) - (setq here (point)) - (current-column))) + (if verilog-indent-lists + (skip-chars-forward " \t") + (verilog-forward-syntactic-ws)) + (setq here (point)) + (current-column))) (decl (save-excursion (goto-char here) @@ -6553,7 +6585,11 @@ Only look at a few lines to determine indent level." (and (or (eq type 'defun) (eq type 'block)) - (looking-at verilog-declaration-re)) + (looking-at verilog-declaration-re) + ;; Do not consider "virtual function", "virtual task", "virtual class" + ;; as declarations + (not (looking-at (concat verilog-declaration-re + "\\s-+\\(function\\|task\\|class\\)\\b")))) (verilog-indent-declaration ind)) (;-- form feeds - ignored as bug in indent-line-to in < 24.5 @@ -6607,7 +6643,7 @@ Do not count named blocks or case-statements." (re-search-backward "/\\*" nil t) (1+(current-column)))) (comment-column - comment-column ) + comment-column ) (t (save-excursion (re-search-backward "//" nil t) @@ -6681,11 +6717,11 @@ Be verbose about progress unless optional QUIET set." ) (save-excursion (if (progn -; (verilog-beg-of-statement-1) - (beginning-of-line) - (verilog-forward-syntactic-ws) - (and (not (verilog-in-directive-p)) ;; could have `define input foo - (looking-at verilog-declaration-re))) + ;; (verilog-beg-of-statement-1) + (beginning-of-line) + (verilog-forward-syntactic-ws) + (and (not (verilog-in-directive-p)) ; could have `define input foo + (looking-at verilog-declaration-re))) (progn (if (verilog-parenthesis-depth) ;; in an argument list or parameter block @@ -6693,7 +6729,7 @@ Be verbose about progress unless optional QUIET set." start (progn (goto-char e) (verilog-backward-up-list 1) - (forward-line) ;; ignore ( input foo, + (forward-line) ; ignore ( input foo, (verilog-re-search-forward verilog-declaration-re el 'move) (goto-char (match-beginning 0)) (skip-chars-backward " \t") @@ -6752,11 +6788,11 @@ Be verbose about progress unless optional QUIET set." (cond ((save-excursion (skip-chars-backward " \t") (bolp)) - (verilog-forward-ws&directives) - (indent-line-to base-ind) - (verilog-forward-ws&directives) - (if (< (point) e) - (verilog-re-search-forward "[ \t\n\f]" e 'move))) + (verilog-forward-ws&directives) + (indent-line-to base-ind) + (verilog-forward-ws&directives) + (if (< (point) e) + (verilog-re-search-forward "[ \t\n\f]" e 'move))) (t (just-one-space) (verilog-re-search-forward "[ \t\n\f]" e 'move))) @@ -6771,7 +6807,7 @@ Be verbose about progress unless optional QUIET set." (> r 0)) (setq e (point)) (unless quiet (message "%d" r)) - ;;(verilog-do-indent (verilog-calculate-indent))) + ;; (verilog-do-indent (verilog-calculate-indent))) (verilog-forward-ws&directives) (cond ((or (and verilog-indent-declaration-macros @@ -6885,7 +6921,7 @@ Be verbose about progress unless optional QUIET set." (cond ((looking-at verilog-assignment-operation-re) (goto-char (match-beginning 2)) - (if (not (or (verilog-in-parenthesis-p) ;; leave attributes and comparisons alone + (if (not (or (verilog-in-parenthesis-p) ; leave attributes and comparisons alone (verilog-in-coverage-p))) (if (eq (char-after) ?=) (indent-to (1+ ind)) ; line up the = of the <= with surrounding = @@ -7018,7 +7054,7 @@ Region is defined by B and EDPOS." (while (progn (setq e (marker-position edpos)) (< (point) e)) (if (and (verilog-re-search-forward myre e 'move) - (not (verilog-in-attribute-p))) ;; skip attribute exprs + (not (verilog-in-attribute-p))) ; skip attribute exprs (progn (goto-char (match-beginning 2)) (verilog-backward-syntactic-ws) @@ -7053,9 +7089,8 @@ Region is defined by B and EDPOS." (insert (format "%s %d" type val)))) -;; -;; -;; Completion + +;;; Completion: ;; (defvar verilog-str nil) (defvar verilog-all nil) @@ -7190,10 +7225,10 @@ TYPE is 'module, 'tf for task or function, or t if unknown." (if (string= verilog-str "") (setq verilog-str "[a-zA-Z_]")) (let ((verilog-str (concat (cond - ((eq type 'module) "\\<\\(module\\)\\s +") - ((eq type 'tf) "\\<\\(task\\|function\\)\\s +") - (t "\\<\\(task\\|function\\|module\\)\\s +")) - "\\<\\(" verilog-str "[a-zA-Z0-9_.]*\\)\\>")) + ((eq type 'module) "\\<\\(module\\)\\s +") + ((eq type 'tf) "\\<\\(task\\|function\\)\\s +") + (t "\\<\\(task\\|function\\|module\\)\\s +")) + "\\<\\(" verilog-str "[a-zA-Z0-9_.]*\\)\\>")) match) (if (not (looking-at verilog-defun-re)) @@ -7551,7 +7586,7 @@ If search fails, other files are checked based on (goto-char (match-end 0)) (if (> nlines 0) (forward-line (1+ nlines)) - (forward-line 1)) + (forward-line 1)) (point))) (tag (format "%3d" linenum)) (empty (make-string (length tag) ?\ )) @@ -7583,6 +7618,7 @@ If search fails, other files are checked based on ;; Highlight helper functions (defconst verilog-directive-regexp "\\(translate\\|coverage\\|lint\\)_") + (defun verilog-within-translate-off () "Return point if within translate-off region, else nil." (and (save-excursion @@ -7595,15 +7631,15 @@ If search fails, other files are checked based on (defun verilog-start-translate-off (limit) "Return point before translate-off directive if before LIMIT, else nil." (when (re-search-forward - (concat "//\\s-*.*\\s-*" verilog-directive-regexp "off\\>") - limit t) + (concat "//\\s-*.*\\s-*" verilog-directive-regexp "off\\>") + limit t) (match-beginning 0))) (defun verilog-back-to-start-translate-off (limit) "Return point before translate-off directive if before LIMIT, else nil." (when (re-search-backward - (concat "//\\s-*.*\\s-*" verilog-directive-regexp "off\\>") - limit t) + (concat "//\\s-*.*\\s-*" verilog-directive-regexp "off\\>") + limit t) (match-beginning 0))) (defun verilog-end-translate-off (limit) @@ -7649,7 +7685,7 @@ Bound search by LIMIT. Adapted from See also `verilog-sk-header' for an alternative format." (interactive) (let ((start (point))) - (insert "\ + (insert "\ //----------------------------------------------------------------------------- // Title : // Project : <project> @@ -7721,8 +7757,7 @@ See also `verilog-sk-header' for an alternative format." (insert (format-time-string "%Y"))) -;; -;; Signal list parsing +;;; Signal list parsing: ;; ;; Elements of a signal list @@ -7731,11 +7766,11 @@ See also `verilog-sk-header' for an alternative format." (list name bits comment mem enum signed type multidim modport)) (defsubst verilog-sig-name (sig) (car sig)) -(defsubst verilog-sig-bits (sig) ;; First element of packed array (pre signal-name) +(defsubst verilog-sig-bits (sig) ; First element of packed array (pre signal-name) (nth 1 sig)) (defsubst verilog-sig-comment (sig) (nth 2 sig)) -(defsubst verilog-sig-memory (sig) ;; Unpacked array (post signal-name) +(defsubst verilog-sig-memory (sig) ; Unpacked array (post signal-name) (nth 3 sig)) (defsubst verilog-sig-enum (sig) (nth 4 sig)) @@ -7745,7 +7780,7 @@ See also `verilog-sk-header' for an alternative format." (nth 6 sig)) (defsubst verilog-sig-type-set (sig type) (setcar (nthcdr 6 sig) type)) -(defsubst verilog-sig-multidim (sig) ;; Second and additional elements of packed array +(defsubst verilog-sig-multidim (sig) ; Second and additional elements of packed array (nth 7 sig)) (defsubst verilog-sig-multidim-string (sig) (if (verilog-sig-multidim sig) @@ -7777,11 +7812,11 @@ See also `verilog-sk-header' for an alternative format." (defsubst verilog-modport-name (sig) (car sig)) (defsubst verilog-modport-clockings (sig) - (nth 1 sig)) ;; Returns list of names + (nth 1 sig)) ; Returns list of names (defsubst verilog-modport-clockings-add (sig val) (setcar (nthcdr 1 sig) (cons val (nth 1 sig)))) (defsubst verilog-modport-decls (sig) - (nth 2 sig)) ;; Returns verilog-decls-* structure + (nth 2 sig)) ; Returns verilog-decls-* structure (defsubst verilog-modport-decls-set (sig val) (setcar (nthcdr 2 sig) val)) @@ -7793,7 +7828,7 @@ See also `verilog-sk-header' for an alternative format." (aref modi 1)) (defsubst verilog-modi-get-point (modi) (aref modi 2)) -(defsubst verilog-modi-get-type (modi) ;; "module" or "interface" +(defsubst verilog-modi-get-type (modi) ; "module" or "interface" (aref modi 3)) (defsubst verilog-modi-get-decls (modi) (verilog-modi-cache-results modi 'verilog-read-decls)) @@ -7819,8 +7854,8 @@ See also `verilog-sk-header' for an alternative format." (aref decls 2)) (defsubst verilog-decls-get-vars (decls) (aref decls 3)) -(defsubst verilog-decls-get-modports (decls) ;; Also for clocking blocks; contains another verilog-decls struct - (aref decls 4)) ;; Returns verilog-modport* structure +(defsubst verilog-decls-get-modports (decls) ; Also for clocking blocks; contains another verilog-decls struct + (aref decls 4)) ; Returns verilog-modport* structure (defsubst verilog-decls-get-assigns (decls) (aref decls 5)) (defsubst verilog-decls-get-consts (decls) @@ -7985,7 +8020,8 @@ Signals must be in standard (base vector) form." (defun verilog-signals-combine-bus (in-list) "Return a list of signals in IN-LIST, with buses combined. Duplicate signals are also removed. For example A[2] and A[1] become A[2:1]." - (let (combo buswarn + (let (combo + buswarn out-list sig highbit lowbit ; Temp information about current signal sv-name sv-highbit sv-lowbit ; Details about signal we are forming @@ -8037,7 +8073,7 @@ Duplicate signals are also removed. For example A[2] and A[1] become A[2:1]." ;; Combine with this signal (when (and sv-busstring (not (equal sv-busstring (verilog-sig-bits sig)))) - (when nil ;; Debugging + (when nil ; Debugging (message (concat "Warning, can't merge into single bus " sv-name bus ", the AUTOs may be wrong"))) @@ -8157,17 +8193,17 @@ Tieoff value uses `verilog-active-low-regexp' and (defun verilog-read-inst-backward-name () "Internal. Move point back to beginning of inst-name." - (verilog-backward-open-paren) - (let (done) - (while (not done) - (verilog-re-search-backward-quick "\\()\\|\\b[a-zA-Z0-9`_\$]\\|\\]\\)" nil nil) ; ] isn't word boundary - (cond ((looking-at ")") - (verilog-backward-open-paren)) - (t (setq done t))))) - (while (looking-at "\\]") - (verilog-backward-open-bracket) - (verilog-re-search-backward-quick "\\(\\b[a-zA-Z0-9`_\$]\\|\\]\\)" nil nil)) - (skip-chars-backward "a-zA-Z0-9`_$")) + (verilog-backward-open-paren) + (let (done) + (while (not done) + (verilog-re-search-backward-quick "\\()\\|\\b[a-zA-Z0-9`_\$]\\|\\]\\)" nil nil) ; ] isn't word boundary + (cond ((looking-at ")") + (verilog-backward-open-paren)) + (t (setq done t))))) + (while (looking-at "\\]") + (verilog-backward-open-bracket) + (verilog-re-search-backward-quick "\\(\\b[a-zA-Z0-9`_\$]\\|\\]\\)" nil nil)) + (skip-chars-backward "a-zA-Z0-9`_$")) (defun verilog-read-inst-module-matcher () "Set match data 0 with module_name when point is inside instantiation." @@ -8296,12 +8332,12 @@ Return an array of [outputs inouts inputs wire reg assign const]." (or (search-forward "*)") (error "%s: Unmatched (* *), at char %d" (verilog-point-text) (point)))) ((eq ?\" (following-char)) - (or (re-search-forward "[^\\]\"" nil t) ;; don't forward-char first, since we look for a non backslash first + (or (re-search-forward "[^\\]\"" nil t) ; don't forward-char first, since we look for a non backslash first (error "%s: Unmatched quotes, at char %d" (verilog-point-text) (point)))) ((eq ?\; (following-char)) - (cond (in-ign-to-semi ;; Such as inside a "import ...;" in a module header + (cond (in-ign-to-semi ; Such as inside a "import ...;" in a module header (setq in-ign-to-semi nil)) - ((and in-modport (not (eq in-modport t))) ;; end of a modport declaration + ((and in-modport (not (eq in-modport t))) ; end of a modport declaration (verilog-modport-decls-set in-modport (verilog-decls-new sigs-out sigs-inout sigs-in @@ -8341,11 +8377,11 @@ Return an array of [outputs inouts inputs wire reg assign const]." (if (verilog-sig-memory newsig) (concat (verilog-sig-memory newsig) (match-string 1)) (match-string 1)))) - (vec ;; Multidimensional + (vec ; Multidimensional (setq multidim (cons vec multidim)) (setq vec (verilog-string-replace-matches "\\s-+" "" nil nil (match-string 1)))) - (t ;; Bit width + (t ; Bit width (setq vec (verilog-string-replace-matches "\\s-+" "" nil nil (match-string 1)))))) ;; Normal or escaped identifier -- note we remember the \ if escaped @@ -8353,13 +8389,13 @@ Return an array of [outputs inouts inputs wire reg assign const]." (goto-char (match-end 0)) (setq keywd (match-string 1)) (when (string-match "^\\\\" (match-string 1)) - (setq keywd (concat keywd " "))) ;; Escaped ID needs space at end + (setq keywd (concat keywd " "))) ; Escaped ID needs space at end ;; Add any :: package names to same identifier (while (looking-at "\\s-*::\\s-*\\([a-zA-Z0-9`_$]+\\|\\\\[^ \t\n\f]+\\)") (goto-char (match-end 0)) (setq keywd (concat keywd "::" (match-string 1))) (when (string-match "^\\\\" (match-string 1)) - (setq keywd (concat keywd " ")))) ;; Escaped ID needs space at end + (setq keywd (concat keywd " ")))) ; Escaped ID needs space at end (cond ((equal keywd "input") (setq vec nil enum nil rvalue nil newsig nil signed nil typedefed nil multidim nil ptype nil modport nil @@ -8419,7 +8455,7 @@ Return an array of [outputs inouts inputs wire reg assign const]." ((equal keywd "clocking") (setq in-clocking t)) ((equal keywd "import") - (if v2kargs-ok ;; import in module header, not a modport import + (if v2kargs-ok ; import in module header, not a modport import (setq in-ign-to-semi t rvalue t))) ((equal keywd "type") (setq ptype t)) @@ -8552,7 +8588,7 @@ Return an array of [outputs inouts inputs wire reg assign const]." (if vec (setq vec (verilog-symbol-detick-denumber vec))) (if multidim (setq multidim (mapcar `verilog-symbol-detick-denumber multidim))) (unless (or (not sig) - (equal sig "")) ;; Ignore .foo(1'b1) assignments + (equal sig "")) ; Ignore .foo(1'b1) assignments (cond ((or (setq portdata (assoc port (verilog-decls-get-inouts submoddecls))) (equal "inout" verilog-read-sub-decls-gate-ios)) (setq sigs-inout @@ -8650,7 +8686,7 @@ Return an array of [outputs inouts inputs wire reg assign const]." ;; Remove leading reduction operators, etc (setq expr (verilog-string-replace-matches "^\\s-*[---+~!|&]+\\s-*" "" nil nil expr)) ;;(message "vrsde-ptop: '%s'" expr) - (cond ;; Find \signal. Final space is part of escaped signal name + (cond ; Find \signal. Final space is part of escaped signal name ((string-match "^\\s-*\\(\\\\[^ \t\n\f]+\\s-\\)" expr) ;;(message "vrsde-s: '%s'" (match-string 1 expr)) (setq sig (match-string 1 expr) @@ -8684,7 +8720,7 @@ Inserts the list of signals found, using submodi to look up each port." (goto-char (match-end 0))) ;; .\escaped ( ((looking-at "\\s-*\\.\\s-*\\(\\\\[^ \t\n\f]*\\)\\s-*(\\s-*") - (setq port (concat (match-string 1) " ")) ;; escaped id's need trailing space + (setq port (concat (match-string 1) " ")) ; escaped id's need trailing space (goto-char (match-end 0))) ;; .name ((looking-at "\\s-*\\.\\s-*\\([a-zA-Z0-9`_$]*\\)\\s-*[,)/]") @@ -8700,10 +8736,10 @@ Inserts the list of signals found, using submodi to look up each port." (setq port nil)) ;; random ((looking-at "\\s-*\\.[^(]*(") - (setq port nil) ;; skip this line + (setq port nil) ; skip this line (goto-char (match-end 0))) (t - (setq port nil done t))) ;; Unknown, ignore rest of line + (setq port nil done t))) ; Unknown, ignore rest of line ;; Get signal name. Point is at the first-non-space after ( ;; We intentionally ignore (non-escaped) signals with .s in them ;; this prevents AUTOWIRE etc from noticing hierarchical sigs. @@ -8819,19 +8855,19 @@ Outputs comments above subcell signals, for example: ;; However I want it to be runnable even on user's manually added signals (let ((verilog-read-sub-decls-in-interfaced t)) (while (re-search-forward "\\s *(?\\s *// Interfaced" end-inst-point t) - (verilog-read-sub-decls-line submoddecls comment))) ;; Modifies sigs-ifd + (verilog-read-sub-decls-line submoddecls comment))) ; Modifies sigs-ifd (goto-char st-point) (while (re-search-forward "\\s *(?\\s *// Interfaces" end-inst-point t) - (verilog-read-sub-decls-line submoddecls comment)) ;; Modifies sigs-out + (verilog-read-sub-decls-line submoddecls comment)) ; Modifies sigs-out (goto-char st-point) (while (re-search-forward "\\s *(?\\s *// Outputs" end-inst-point t) - (verilog-read-sub-decls-line submoddecls comment)) ;; Modifies sigs-out + (verilog-read-sub-decls-line submoddecls comment)) ; Modifies sigs-out (goto-char st-point) (while (re-search-forward "\\s *(?\\s *// Inouts" end-inst-point t) - (verilog-read-sub-decls-line submoddecls comment)) ;; Modifies sigs-inout + (verilog-read-sub-decls-line submoddecls comment)) ; Modifies sigs-inout (goto-char st-point) (while (re-search-forward "\\s *(?\\s *// Inputs" end-inst-point t) - (verilog-read-sub-decls-line submoddecls comment)) ;; Modifies sigs-in + (verilog-read-sub-decls-line submoddecls comment)) ; Modifies sigs-in ))))))) ;; Combine duplicate bits ;;(setq rr (vector sigs-out sigs-inout sigs-in)) @@ -8846,7 +8882,7 @@ Outputs comments above subcell signals, for example: "Return an array of [ pins ] for the current instantiation at point. For example if declare A A (.B(SIG)) then B will be included in the list." (save-excursion - (let ((end-mod-point (point)) ;; presume at /*AUTOINST*/ point + (let ((end-mod-point (point)) ; presume at /*AUTOINST*/ point pins pin) (verilog-backward-open-paren) (while (re-search-forward "\\.\\([^(,) \t\n\f]*\\)\\s-*" end-mod-point t) @@ -8860,7 +8896,7 @@ For example if declare A A (.B(SIG)) then B will be included in the list." (defun verilog-read-arg-pins () "Return an array of [ pins ] for the current argument declaration at point." (save-excursion - (let ((end-mod-point (point)) ;; presume at /*AUTOARG*/ point + (let ((end-mod-point (point)) ; presume at /*AUTOARG*/ point pins pin) (verilog-backward-open-paren) (while (re-search-forward "\\([a-zA-Z0-9$_.%`]+\\)" end-mod-point t) @@ -8881,7 +8917,7 @@ For example if declare A A (.B(SIG)) then B will be included in the list." (search-forward "(" end-mod-point) (setq tpl-end-pt (save-excursion (backward-char 1) - (verilog-forward-sexp-cmt 1) ;; Moves to paren that closes argdecl's + (verilog-forward-sexp-cmt 1) ; Moves to paren that closes argdecl's (backward-char 1) (point))) (while (re-search-forward "\\s-*\\([\"a-zA-Z0-9$_.%`]+\\)\\s-*,*" tpl-end-pt t) @@ -8907,18 +8943,18 @@ Must call `verilog-read-auto-lisp-present' before this function." (while (re-search-forward "\\<AUTO_LISP(" end t) (backward-char) (let* ((beg-pt (prog1 (point) - (verilog-forward-sexp-cmt 1))) ;; Closing paren + (verilog-forward-sexp-cmt 1))) ; Closing paren (end-pt (point)) (verilog-in-hooks t)) (eval-region beg-pt end-pt nil)))))) (defun verilog-read-always-signals-recurse - (exit-keywd rvalue temp-next) + (exit-keywd rvalue temp-next) "Recursive routine for parentheses/bracket matching. EXIT-KEYWD is expression to stop at, nil if top level. RVALUE is true if at right hand side of equal. IGNORE-NEXT is true to ignore next token, fake from inside case statement." - (let* ((semi-rvalue (equal "endcase" exit-keywd)) ;; true if after a ; we are looking for rvalue + (let* ((semi-rvalue (equal "endcase" exit-keywd)) ; true if after a ; we are looking for rvalue keywd last-keywd sig-tolk sig-last-tolk gotend got-sig got-list end-else-check ignore-next) ;;(if dbg (setq dbg (concat dbg (format "Recursion %S %S %S\n" exit-keywd rvalue temp-next)))) @@ -8971,16 +9007,16 @@ IGNORE-NEXT is true to ignore next token, fake from inside case statement." (if (looking-at "'[sS]?[hdxboHDXBO]?[ \t]*[0-9a-fA-F_xzXZ?]+") (goto-char (match-end 0)) (forward-char 1))) - ((equal keywd ":") ;; Case statement, begin/end label, x?y:z - (cond ((equal "endcase" exit-keywd) ;; case x: y=z; statement next + ((equal keywd ":") ; Case statement, begin/end label, x?y:z + (cond ((equal "endcase" exit-keywd) ; case x: y=z; statement next (setq ignore-next nil rvalue nil)) - ((equal "?" exit-keywd) ;; x?y:z rvalue - ) ;; NOP - ((equal "]" exit-keywd) ;; [x:y] rvalue - ) ;; NOP - (got-sig ;; label: statement + ((equal "?" exit-keywd) ; x?y:z rvalue + ) ; NOP + ((equal "]" exit-keywd) ; [x:y] rvalue + ) ; NOP + (got-sig ; label: statement (setq ignore-next nil rvalue semi-rvalue got-sig nil)) - ((not rvalue) ;; begin label + ((not rvalue) ; begin label (setq ignore-next t rvalue nil))) (forward-char 1)) ((equal keywd "=") @@ -9004,7 +9040,7 @@ IGNORE-NEXT is true to ignore next token, fake from inside case statement." (verilog-read-always-signals-recurse "]" t nil)) ((equal keywd "(") (forward-char 1) - (cond (sig-last-tolk ;; Function call; zap last signal + (cond (sig-last-tolk ; Function call; zap last signal (setq got-sig nil))) (cond ((equal last-keywd "for") ;; temp-next: Variables on LHS are lvalues, but generally we want @@ -9023,13 +9059,13 @@ IGNORE-NEXT is true to ignore next token, fake from inside case statement." (skip-syntax-forward "w_") (verilog-read-always-signals-recurse "endcase" t nil) (setq ignore-next nil rvalue semi-rvalue) - (if (not exit-keywd) (setq gotend t))) ;; top level begin/end - ((string-match "^[$`a-zA-Z_]" keywd) ;; not exactly word constituent + (if (not exit-keywd) (setq gotend t))) ; top level begin/end + ((string-match "^[$`a-zA-Z_]" keywd) ; not exactly word constituent (cond ((member keywd '("`ifdef" "`ifndef" "`elsif")) (setq ignore-next t)) ((or ignore-next (member keywd verilog-keywords) - (string-match "^\\$" keywd)) ;; PLI task + (string-match "^\\$" keywd)) ; PLI task (setq ignore-next nil)) (t (setq keywd (verilog-symbol-detick-denumber keywd)) @@ -9062,7 +9098,7 @@ IGNORE-NEXT is true to ignore next token, fake from inside case statement." (defun verilog-read-always-signals () "Parse always block at point and return list of (outputs inout inputs)." (save-excursion - (let* (;;(dbg "") + (let* (;(dbg "") sigs-out-d sigs-out-i sigs-out-unk sigs-temp sigs-in) (verilog-read-always-signals-recurse nil nil nil) (setq sigs-out-i (append sigs-out-i sigs-out-unk) @@ -9126,7 +9162,7 @@ Returns REGEXP and list of ( (signal_name connection_name)... )." (setq lineno (1+ lineno)))))) (setq tpl-end-pt (save-excursion (backward-char 1) - (verilog-forward-sexp-cmt 1) ;; Moves to paren that closes argdecl's + (verilog-forward-sexp-cmt 1) ; Moves to paren that closes argdecl's (backward-char 1) (point))) ;; @@ -9207,13 +9243,19 @@ If found returns `verilog-read-auto-template-inside' structure." (defvar verilog-auto-template-hits nil "Successful lookups with `verilog-read-auto-template-hit'.") (make-variable-buffer-local 'verilog-auto-template-hits) +(defun verilog-read-auto-template-init () + "Initialize `verilog-read-auto-template'." + (when (eval-when-compile (fboundp 'make-hash-table)) ; else feature not allowed + (when verilog-auto-template-warn-unused + (setq verilog-auto-template-hits + (make-hash-table :test 'equal :rehash-size 4.0))))) + (defun verilog-read-auto-template-hit (tpl-ass) "Record that TPL-ASS template from `verilog-read-auto-template' was used." - (when (eval-when-compile (fboundp 'make-hash-table)) ;; else feature not allowed + (when (eval-when-compile (fboundp 'make-hash-table)) ; else feature not allowed (when verilog-auto-template-warn-unused (unless verilog-auto-template-hits - (setq verilog-auto-template-hits - (make-hash-table :test 'equal :rehash-size 4.0))) + (verilog-read-auto-template-init)) (puthash (vector (nth 2 tpl-ass) (nth 3 tpl-ass)) t verilog-auto-template-hits)))) @@ -9372,10 +9414,10 @@ Some macros and such are also found and included. For dinotrace.el." ((looking-at "/\\*") (search-forward "*/")) ((looking-at "(\\*") - (or (looking-at "(\\*\\s-*)") ; It's a "always @ (*)" + (or (looking-at "(\\*\\s-*)") ; It's an "always @ (*)" (search-forward "*)"))) ((eq ?\" (following-char)) - (re-search-forward "[^\\]\"")) ;; don't forward-char first, since we look for a non backslash first + (re-search-forward "[^\\]\"")) ; don't forward-char first, since we look for a non backslash first ((looking-at "\\s-*\\([a-zA-Z0-9$_.%`]+\\)") (goto-char (match-end 0)) (setq keywd (match-string-no-properties 1)) @@ -9423,19 +9465,19 @@ Some macros and such are also found and included. For dinotrace.el." (match-string 1 arg)) (setq arg (match-string 2 arg)))) ;; - ((or (string-match "^-D\\([^+=]*\\)[+=]\\(.*\\)" arg) ;; -Ddefine=val - (string-match "^-D\\([^+=]*\\)\\(\\)" arg) ;; -Ddefine - (string-match "^\\+define\\([^+=]*\\)[+=]\\(.*\\)" arg) ;; +define+val - (string-match "^\\+define\\([^+=]*\\)\\(\\)" arg)) ;; +define+define + ((or (string-match "^-D\\([^+=]*\\)[+=]\\(.*\\)" arg) ; -Ddefine=val + (string-match "^-D\\([^+=]*\\)\\(\\)" arg) ; -Ddefine + (string-match "^\\+define\\([^+=]*\\)[+=]\\(.*\\)" arg) ; +define+val + (string-match "^\\+define\\([^+=]*\\)\\(\\)" arg)) ; +define+define (verilog-set-define (match-string 1 arg) (match-string 2 arg))) ;; - ((or (string-match "^\\+incdir\\+\\(.*\\)" arg) ;; +incdir+dir - (string-match "^-I\\(.*\\)" arg)) ;; -Idir + ((or (string-match "^\\+incdir\\+\\(.*\\)" arg) ; +incdir+dir + (string-match "^-I\\(.*\\)" arg)) ; -Idir (verilog-add-list-unique `verilog-library-directories (match-string 1 (substitute-in-file-name arg)))) ;; Ignore ((equal "+librescan" arg)) - ((string-match "^-U\\(.*\\)" arg)) ;; -Udefine + ((string-match "^-U\\(.*\\)" arg)) ; -Udefine ;; Second parameters ((equal next-param "-f") (setq next-param nil) @@ -9513,8 +9555,7 @@ Used for __FLAGS__ in `verilog-expand-command'." ;;(verilog-current-flags) -;; -;; Cached directory support +;;; Cached directory support: ;; (defvar verilog-dir-cache-preserving nil @@ -9541,12 +9582,12 @@ seen by the `verilog-dir-files' and related functions." Relative paths depend on the `default-directory'. Results are cached if inside `verilog-preserve-dir-cache'." (unless verilog-dir-cache-preserving - (setq verilog-dir-cache-list nil)) ;; Cache disabled + (setq verilog-dir-cache-list nil)) ; Cache disabled ;; We don't use expand-file-name on the dirname to make key, as it's slow (let* ((cache-key (list dirname default-directory)) (fass (assoc cache-key verilog-dir-cache-list)) exp-dirname data) - (cond (fass ;; Return data from cache hit + (cond (fass ; Return data from cache hit (nth 1 fass)) (t (setq exp-dirname (expand-file-name dirname) @@ -9576,8 +9617,7 @@ Like `file-exists-p' but results are cached if inside ;;(verilog-dir-file-exists-p "../verilog-mode/verilog-mode.el") -;; -;; Module name lookup +;;; Module name lookup: ;; (defun verilog-module-inside-filename-p (module filename) @@ -9676,9 +9716,9 @@ Or, just the existing dirnames themselves if there are no wildcards." (while dirnames (setq dirname (substitute-in-file-name (car dirnames)) dirnames (cdr dirnames)) - (cond ((string-match (concat "^\\(\\|[/\\]*[^*?]*[/\\]\\)" ;; root - "\\([^/\\]*[*?][^/\\]*\\)" ;; filename with *? - "\\(.*\\)") ;; rest + (cond ((string-match (concat "^\\(\\|[/\\]*[^*?]*[/\\]\\)" ; root + "\\([^/\\]*[*?][^/\\]*\\)" ; filename with *? + "\\(.*\\)") ; rest dirname) (setq root (match-string 1 dirname) filename (match-string 2 dirname) @@ -9719,7 +9759,7 @@ variables to build the path. With optional CHECK-EXT also check (let* ((cache-key (list filename current check-ext)) (fass (assoc cache-key verilog-dir-cache-lib-filenames)) chkdirs chkdir chkexts fn outlist) - (cond (fass ;; Return data from cache hit + (cond (fass ; Return data from cache hit (nth 1 fass)) (t ;; Note this expand can't be easily cached, as we need to @@ -9881,7 +9921,7 @@ Return modi if successful, else print message unless IGNORE-ERROR is true." (set-buffer (if (bufferp (verilog-modi-file-or-buffer modi)) (verilog-modi-file-or-buffer modi) (find-file-noselect (verilog-modi-file-or-buffer modi)))) - (or (equal major-mode `verilog-mode) ;; Put into Verilog mode to get syntax + (or (equal major-mode `verilog-mode) ; Put into Verilog mode to get syntax (verilog-mode)) (goto-char (verilog-modi-get-point modi))) @@ -9897,7 +9937,7 @@ Return modi if successful, else print message unless IGNORE-ERROR is true." "Run on MODI the given FUNCTION. Locate the module in a file. Cache the output of function so next call may have faster access." (let (fass) - (save-excursion ;; Cache is buffer-local so can't avoid this. + (save-excursion ; Cache is buffer-local so can't avoid this. (verilog-modi-goto modi) (if (and (setq fass (assoc (list modi function) verilog-modi-cache-list)) @@ -10093,8 +10133,7 @@ if non-nil." (verilog-modi-cache-add modi 'verilog-read-decls 7 sig-list)) -;; -;; Auto creation utilities +;;; Auto creation utilities: ;; (defun verilog-auto-re-search-do (search-for func) @@ -10164,7 +10203,7 @@ When MODI is non-null, also add to modi-cache, for tracking." (when (member direction '("input" "output" "inout")) (concat direction " ")) (or (verilog-sig-type sig) - verilog-auto-wire-type))) + verilog-auto-wire-type))) ((and verilog-auto-declare-nettype (member direction '("input" "output" "inout"))) (concat direction " " verilog-auto-declare-nettype)) @@ -10206,10 +10245,10 @@ Presumes that any newlines end a list element." ;; Also want "`ifdef X input foo `endif" to just leave things to the human to deal with (save-excursion (verilog-backward-syntactic-ws-quick) - (when (and (not (save-excursion ;; Not beginning (, or existing , + (when (and (not (save-excursion ; Not beginning (, or existing , (backward-char 1) (looking-at "[(,]"))) - (not (save-excursion ;; Not `endif, or user define + (not (save-excursion ; Not `endif, or user define (backward-char 1) (skip-chars-backward "[a-zA-Z0-9_`]") (looking-at "`")))) @@ -10250,7 +10289,7 @@ This repairs those mis-inserted by an AUTOARG." ((string-match "^\\(.*\\)\\s *:\\s *\\(.*\\)\\s *$" range-exp) (concat "(1+(" (match-string 1 range-exp) ")" (if (equal "0" (match-string 2 range-exp)) - "" ;; Don't bother with -(0) + "" ; Don't bother with -(0) (concat "-(" (match-string 2 range-exp) ")")) ")")) (t nil))))) @@ -10260,7 +10299,7 @@ This repairs those mis-inserted by an AUTOARG." "Return a simplified range expression with constants eliminated from EXPR." ;; Note this is always called with brackets; ie [z] or [z:z] (if (not (string-match "[---+*()]" expr)) - expr ;; short-circuit + expr ; short-circuit (let ((out expr) (last-pass "")) (while (not (equal last-pass out)) @@ -10315,23 +10354,23 @@ This repairs those mis-inserted by an AUTOARG." out (replace-match (concat (if (and (equal pre "-") (< val 0)) - "" ;; Not "--20" but just "-20" + "" ; Not "--20" but just "-20" pre) (int-to-string val) post) nil nil out)) ))) out))) -;;(verilog-simplify-range-expression "[1:3]") ;; 1 -;;(verilog-simplify-range-expression "[(1):3]") ;; 1 -;;(verilog-simplify-range-expression "[(((16)+1)+1+(1+1))]") ;;20 -;;(verilog-simplify-range-expression "[(2*3+6*7)]") ;; 48 -;;(verilog-simplify-range-expression "[(FOO*4-1*2)]") ;; FOO*4-2 -;;(verilog-simplify-range-expression "[(FOO*4+1-1)]") ;; FOO*4+0 -;;(verilog-simplify-range-expression "[(func(BAR))]") ;; func(BAR) -;;(verilog-simplify-range-expression "[FOO-1+1-1+1]") ;; FOO-0 -;;(verilog-simplify-range-expression "[$clog2(2)]") ;; 1 -;;(verilog-simplify-range-expression "[$clog2(7)]") ;; 3 +;;(verilog-simplify-range-expression "[1:3]") ; 1 +;;(verilog-simplify-range-expression "[(1):3]") ; 1 +;;(verilog-simplify-range-expression "[(((16)+1)+1+(1+1))]") ; 20 +;;(verilog-simplify-range-expression "[(2*3+6*7)]") ; 48 +;;(verilog-simplify-range-expression "[(FOO*4-1*2)]") ; FOO*4-2 +;;(verilog-simplify-range-expression "[(FOO*4+1-1)]") ; FOO*4+0 +;;(verilog-simplify-range-expression "[(func(BAR))]") ; func(BAR) +;;(verilog-simplify-range-expression "[FOO-1+1-1+1]") ; FOO-0 +;;(verilog-simplify-range-expression "[$clog2(2)]") ; 1 +;;(verilog-simplify-range-expression "[$clog2(7)]") ; 3 (defun verilog-clog2 (value) "Compute $clog2 - ceiling log2 of VALUE." @@ -10344,8 +10383,7 @@ This repairs those mis-inserted by an AUTOARG." (when verilog-typedef-regexp (verilog-string-match-fold verilog-typedef-regexp variable-name))) -;; -;; Auto deletion +;;; Auto deletion: ;; (defun verilog-delete-autos-lined () @@ -10411,7 +10449,7 @@ Deletion stops at the matching end parenthesis, outside comments." (delete-region (point) (save-excursion (verilog-backward-open-paren) - (verilog-forward-sexp-ign-cmt 1) ;; Moves to paren that closes argdecl's + (verilog-forward-sexp-ign-cmt 1) ; Moves to paren that closes argdecl's (backward-char 1) (point)))) @@ -10477,7 +10515,7 @@ called before and after this function, respectively." (interactive) (save-excursion (if (buffer-file-name) - (find-file-noselect (buffer-file-name))) ;; To check we have latest version + (find-file-noselect (buffer-file-name))) ; To check we have latest version (verilog-save-no-change-functions (verilog-save-scan-cache ;; Allow user to customize @@ -10512,8 +10550,7 @@ called before and after this function, respectively." ;; Final customize (verilog-run-hooks 'verilog-delete-auto-hook))))) -;; -;; Auto inject +;;; Auto inject: ;; (defun verilog-inject-auto () @@ -10589,7 +10626,7 @@ Typing \\[verilog-inject-auto] will make this into: got-sigs) (backward-char 1) (verilog-forward-sexp-ign-cmt 1) - (backward-char 1) ;; End ) + (backward-char 1) ; End ) (when (not (verilog-re-search-backward-quick "/\\*\\(AUTOSENSE\\|AS\\)\\*/" start-pt t)) (setq pre-sigs (verilog-signals-from-signame (verilog-read-signals start-pt (point))) @@ -10605,23 +10642,23 @@ Typing \\[verilog-inject-auto] will make this into: (goto-char (point-min)) ;; It's hard to distinguish modules; we'll instead search for pins. (while (verilog-re-search-forward-quick "\\.\\s *[a-zA-Z0-9`_\$]+\\s *(\\s *[a-zA-Z0-9`_\$]+\\s *)" nil t) - (verilog-backward-open-paren) ;; Inst start + (verilog-backward-open-paren) ; Inst start (cond - ((= (preceding-char) ?\#) ;; #(...) parameter section, not pin. Skip. + ((= (preceding-char) ?\#) ; #(...) parameter section, not pin. Skip. (forward-char 1) - (verilog-forward-close-paren)) ;; Parameters done + (verilog-forward-close-paren)) ; Parameters done (t (forward-char 1) (let ((indent-pt (+ (current-column))) (end-pt (save-excursion (verilog-forward-close-paren) (point)))) (cond ((verilog-re-search-forward-quick "\\(/\\*AUTOINST\\*/\\|\\.\\*\\)" end-pt t) - (goto-char end-pt)) ;; Already there, continue search with next instance + (goto-char end-pt)) ; Already there, continue search with next instance (t ;; Delete identical interconnect - (let ((case-fold-search nil)) ;; So we don't convert upper-to-lower, etc + (let ((case-fold-search nil)) ; So we don't convert upper-to-lower, etc (while (verilog-re-search-forward-quick "\\.\\s *\\([a-zA-Z0-9`_\$]+\\)*\\s *(\\s *\\1\\s *)\\s *" end-pt t) (delete-region (match-beginning 0) (match-end 0)) - (setq end-pt (- end-pt (- (match-end 0) (match-beginning 0)))) ;; Keep it correct + (setq end-pt (- end-pt (- (match-end 0) (match-beginning 0)))) ; Keep it correct (while (or (looking-at "[ \t\n\f,]+") (looking-at "//[^\n]*")) (delete-region (match-beginning 0) (match-end 0)) @@ -10633,9 +10670,9 @@ Typing \\[verilog-inject-auto] will make this into: (delete-region (match-beginning 0) (match-end 0))) (verilog-insert "\n") (verilog-insert-indent "/*AUTOINST*/"))))))))) - + ;; -;; Auto diff +;; Auto diff: ;; (defun verilog-diff-buffers-p (b1 b2 &optional whitespace) @@ -10643,7 +10680,7 @@ Typing \\[verilog-inject-auto] will make this into: Else, return point in B1 that first mismatches. If optional WHITESPACE true, ignore whitespace." (save-excursion - (let* ((case-fold-search nil) ;; compare-buffer-substrings cares + (let* ((case-fold-search nil) ; compare-buffer-substrings cares (p1 (with-current-buffer b1 (goto-char (point-min)))) (p2 (with-current-buffer b2 (goto-char (point-min)))) (maxp1 (with-current-buffer b1 (point-max))) @@ -10684,25 +10721,25 @@ Ignores WHITESPACE if t, and writes output to stdout if SHOW." (if (not (file-exists-p f1)) (message "Buffer %s has no associated file on disc" (buffer-name b2)) (with-temp-buffer "*Verilog-Diff*" - (let ((outbuf (current-buffer)) - (f2 (make-temp-file "vm-diff-auto-"))) - (unwind-protect - (progn - (with-current-buffer b2 - (save-restriction - (widen) - (write-region (point-min) (point-max) f2 nil 'nomessage))) - (call-process diff-command nil outbuf t - diff-switches ;; User may want -u in diff-switches - (if whitespace "-b" "") - f1 f2) - ;; Print out results. Alternatively we could have call-processed - ;; ourself, but this way we can reuse diff switches - (when show - (with-current-buffer outbuf (message "%s" (buffer-string)))))) - (sit-for 0) - (when (file-exists-p f2) - (delete-file f2)))))) + (let ((outbuf (current-buffer)) + (f2 (make-temp-file "vm-diff-auto-"))) + (unwind-protect + (progn + (with-current-buffer b2 + (save-restriction + (widen) + (write-region (point-min) (point-max) f2 nil 'nomessage))) + (call-process diff-command nil outbuf t + diff-switches ; User may want -u in diff-switches + (if whitespace "-b" "") + f1 f2) + ;; Print out results. Alternatively we could have call-processed + ;; ourself, but this way we can reuse diff switches + (when show + (with-current-buffer outbuf (message "%s" (buffer-string)))))) + (sit-for 0) + (when (file-exists-p f2) + (delete-file f2)))))) (defun verilog-diff-report (b1 b2 diffpt) "Report differences detected with `verilog-diff-auto'. @@ -10735,7 +10772,7 @@ or `diff' in batch mode." (save-excursion (when (get-buffer newname) (kill-buffer newname)) - (setq b2 (let (buffer-file-name) ;; Else clone is upset + (setq b2 (let (buffer-file-name) ; Else clone is upset (clone-buffer newname))) (with-current-buffer b2 ;; auto requires the filename, but can't have same filename in two @@ -10753,13 +10790,12 @@ or `diff' in batch mode." (setq diffpt (verilog-diff-buffers-p b1 b2 t)) (cond ((not diffpt) (unless noninteractive (message "AUTO expansion identical")) - (kill-buffer newname)) ;; Nice to cleanup after oneself + (kill-buffer newname)) ; Nice to cleanup after oneself (t (funcall verilog-diff-function b1 b2 diffpt))) ;; Return result of compare diffpt))) - ;; ;; Auto save ;; @@ -10785,7 +10821,7 @@ or `diff' in batch mode." (set (make-local-variable 'verilog-auto-update-tick) (buffer-chars-modified-tick)))) (when (not verilog-auto-star-save) (verilog-delete-auto-star-implicit)) - nil) ;; Always return nil -- we don't write the file ourselves + nil) ; Always return nil -- we don't write the file ourselves (defun verilog-auto-read-locals () "Return file local variable segment at bottom of file." @@ -10807,8 +10843,7 @@ If FORCE, always reread it." (hack-local-variables) t))) -;; -;; Auto creation +;;; Auto creation: ;; (defun verilog-auto-arg-ports (sigs message indent-pt) @@ -10944,19 +10979,19 @@ See the example in `verilog-auto-inout-modport'." (modport-re (nth 1 params)) (inst-name (nth 2 params)) (regexp (nth 3 params)) - direction-re submodi) ;; direction argument not supported until requested + direction-re submodi) ; direction argument not supported until requested ;; Lookup position, etc of co-module ;; Note this may raise an error (when (setq submodi (verilog-modi-lookup submod t)) (let* ((indent-pt (current-indentation)) (submoddecls (verilog-modi-get-decls submodi)) (submodportdecls (verilog-modi-modport-lookup submodi modport-re)) - (sig-list-i (verilog-signals-in ;; Decls doesn't have data types, must resolve + (sig-list-i (verilog-signals-in ; Decls doesn't have data types, must resolve (verilog-decls-get-vars submoddecls) (verilog-signals-not-in (verilog-decls-get-inputs submodportdecls) (verilog-decls-get-ports submoddecls)))) - (sig-list-o (verilog-signals-in ;; Decls doesn't have data types, must resolve + (sig-list-o (verilog-signals-in ; Decls doesn't have data types, must resolve (verilog-decls-get-vars submoddecls) (verilog-signals-not-in (verilog-decls-get-outputs submodportdecls) @@ -11140,10 +11175,10 @@ If PAR-VALUES replace final strings with these parameter values." ;; There maybe an ifdef or something similar before us. What a mess. Thus ;; to avoid trouble we only insert on preceding ) or *. ;; Insert first port on new line - (insert "\n") ;; Must insert before search, so point will move forward if insert comma + (insert "\n") ; Must insert before search, so point will move forward if insert comma (save-excursion (verilog-re-search-backward-quick "[^ \t\n\f]" nil nil) - (when (looking-at ")\\|\\*") ;; Generally don't insert, unless we are fairly sure + (when (looking-at ")\\|\\*") ; Generally don't insert, unless we are fairly sure (forward-char 1) (insert ",")))) @@ -11575,11 +11610,11 @@ For more information see the \\[verilog-faq] and forums at URL (re-search-backward "," pt t) (delete-char 1) (insert ");") - (search-forward "\n") ;; Added by inst-port + (search-forward "\n") ; Added by inst-port (delete-char -1) - (if (search-forward ")" nil t) ;; From user, moved up a line + (if (search-forward ")" nil t) ; From user, moved up a line (delete-char -1)) - (if (search-forward ";" nil t) ;; Don't error if user had syntax error and forgot it + (if (search-forward ";" nil t) ; Don't error if user had syntax error and forgot it (delete-char -1))))))))) (defun verilog-auto-inst-param () @@ -11677,9 +11712,9 @@ Templates: (re-search-backward "," pt t) (delete-char 1) (insert ")") - (search-forward "\n") ;; Added by inst-port + (search-forward "\n") ; Added by inst-port (delete-char -1) - (if (search-forward ")" nil t) ;; From user, moved up a line + (if (search-forward ")" nil t) ; From user, moved up a line (delete-char -1))))))))) (defun verilog-auto-reg () @@ -11721,7 +11756,7 @@ Typing \\[verilog-auto] will make this into: (modsubdecls (verilog-modi-get-sub-decls modi)) (sig-list (verilog-signals-not-in (verilog-decls-get-outputs moddecls) - (append (verilog-signals-with ;; ignore typed signals + (append (verilog-signals-with ; ignore typed signals 'verilog-sig-type (verilog-decls-get-outputs moddecls)) (verilog-decls-get-vars moddecls) @@ -12594,7 +12629,7 @@ driver/monitor using AUTOINST in the testbench." (submod (nth 0 params)) (modport-re (nth 1 params)) (regexp (nth 2 params)) - direction-re submodi) ;; direction argument not supported until requested + direction-re submodi) ; direction argument not supported until requested ;; Lookup position, etc of co-module ;; Note this may raise an error (when (setq submodi (verilog-modi-lookup submod t)) @@ -12604,19 +12639,19 @@ driver/monitor using AUTOINST in the testbench." (moddecls (verilog-modi-get-decls modi)) (submoddecls (verilog-modi-get-decls submodi)) (submodportdecls (verilog-modi-modport-lookup submodi modport-re)) - (sig-list-i (verilog-signals-in ;; Decls doesn't have data types, must resolve + (sig-list-i (verilog-signals-in ; Decls doesn't have data types, must resolve (verilog-decls-get-vars submoddecls) (verilog-signals-not-in (verilog-decls-get-inputs submodportdecls) (append (verilog-decls-get-ports submoddecls) (verilog-decls-get-ports moddecls))))) - (sig-list-o (verilog-signals-in ;; Decls doesn't have data types, must resolve + (sig-list-o (verilog-signals-in ; Decls doesn't have data types, must resolve (verilog-decls-get-vars submoddecls) (verilog-signals-not-in (verilog-decls-get-outputs submodportdecls) (append (verilog-decls-get-ports submoddecls) (verilog-decls-get-ports moddecls))))) - (sig-list-io (verilog-signals-in ;; Decls doesn't have data types, must resolve + (sig-list-io (verilog-signals-in ; Decls doesn't have data types, must resolve (verilog-decls-get-vars submoddecls) (verilog-signals-not-in (verilog-decls-get-inouts submodportdecls) @@ -12694,10 +12729,10 @@ text: (let* ((indent-pt (current-indentation)) (cmd-end-pt (save-excursion (search-backward ")") (forward-char) - (point))) ;; Closing paren + (point))) ; Closing paren (cmd-beg-pt (save-excursion (goto-char cmd-end-pt) - (backward-sexp 1) ;; Inside comment - (point))) ;; Beginning paren + (backward-sexp 1) ; Inside comment + (point))) ; Beginning paren (cmd (buffer-substring-no-properties cmd-beg-pt cmd-end-pt))) (verilog-forward-or-insert-line) ;; Some commands don't move point (like insert-file) so we always @@ -12707,7 +12742,7 @@ text: (forward-line -1) (eval (read cmd)) (forward-line -1) - (setq verilog-scan-cache-tick nil) ;; Clear cache; inserted unknown text + (setq verilog-scan-cache-tick nil) ; Clear cache; inserted unknown text (verilog-delete-empty-auto-pair)))) (defun verilog-auto-insert-last () @@ -12817,7 +12852,7 @@ operator. (This was added to the language in part due to AUTOSENSE!) (let ((tlen (length sig-list))) (setq sig-list (verilog-signals-not-in sig-list sig-memories)) (if (not (eq tlen (length sig-list))) (verilog-insert " /*memory or*/ ")))) - (if (and presense-sigs ;; Add a "or" if not "(.... or /*AUTOSENSE*/" + (if (and presense-sigs ; Add a "or" if not "(.... or /*AUTOSENSE*/" (save-excursion (goto-char (point)) (verilog-re-search-backward-quick "[a-zA-Z0-9$_.%`]+" start-pt t) (verilog-re-search-backward-quick "\\s-" start-pt t) @@ -12940,7 +12975,7 @@ Typing \\[verilog-auto] will make this into: (insert "\n"); (verilog-insert-indent "// Beginning of autoreset for uninitialized flops\n"); (while sig-list - (let ((sig (or (assoc (verilog-sig-name (car sig-list)) all-list) ;; As sig-list has no widths + (let ((sig (or (assoc (verilog-sig-name (car sig-list)) all-list) ; As sig-list has no widths (car sig-list)))) (indent-to indent-pt) (insert (verilog-sig-name sig) @@ -13092,7 +13127,7 @@ defines the regular expression will be undefed." (setq def (match-string-no-properties 2)) (when (and (or (not regexp) (string-match regexp def)) - (not (member def defs))) ;; delete-dups not in 21.1 + (not (member def defs))) ; delete-dups not in 21.1 (setq defs (cons def defs)))) (t (setq defs (delete (match-string-no-properties 2) defs)))))) @@ -13288,7 +13323,7 @@ Typing \\[verilog-auto] will make this into: ;; (one-hot (or (string-match "onehot" (or one-hot-flag "")) - (and ;; width(enum) != width(sig) + (and ; width(enum) != width(sig) (or (not (verilog-sig-bits (car enum-sigs))) (not (equal (verilog-sig-width (car enum-sigs)) (verilog-sig-width undecode-sig)))) @@ -13387,21 +13422,20 @@ Enable with `verilog-auto-template-warn-unused'." (while tlines (setq tpl-ass (car tlines) tlines (cdr tlines)) - ;;; - (unless (or (not (eval-when-compile (fboundp 'make-hash-table))) ;; Not supported, no warning + ;; + (unless (or (not (eval-when-compile (fboundp 'make-hash-table))) ; Not supported, no warning (not verilog-auto-template-hits) (gethash (vector (nth 2 tpl-ass) (nth 3 tpl-ass)) verilog-auto-template-hits)) (verilog-warn-error "%s:%d: AUTO_TEMPLATE line unused: \".%s (%s)\"" name1 - (+ (elt tpl-ass 3) ;; Template line number + (+ (elt tpl-ass 3) ; Template line number (count-lines (point-min) (point))) (elt tpl-ass 0) (elt tpl-ass 1)) ))))))) -;; -;; Auto top level +;;; Auto top level: ;; (defun verilog-auto (&optional inject) ; Use verilog-inject-auto instead of passing an arg @@ -13501,7 +13535,7 @@ Wilson Snyder (wsnyder@wsnyder.org)." ;; we'll misremember we have generated IOs, confusing AUTOOUTPUT (setq verilog-modi-cache-list nil) ;; Local state - (setq verilog-auto-template-hits nil) + (verilog-read-auto-template-init) ;; If we're not in verilog-mode, change syntax table so parsing works right (unless (eq major-mode `verilog-mode) (verilog-mode)) ;; Allow user to customize @@ -13595,10 +13629,9 @@ Wilson Snyder (wsnyder@wsnyder.org)." ;; Currently handled in verilog-save-font-mods )))) - -;; -;; Skeleton based code insertion +;;; Skeletons: ;; + (defvar verilog-template-map (let ((map (make-sparse-keymap))) (define-key map "a" 'verilog-sk-always) @@ -13645,7 +13678,7 @@ Wilson Snyder (wsnyder@wsnyder.org)." ;; Note \C-c and letter are reserved for users (define-key verilog-mode-map "\C-c\C-t" verilog-template-map) -;;; ---- statement skeletons ------------------------------------------ +;; ---- statement skeletons ------------------------------------------ (define-skeleton verilog-sk-prompt-condition "Prompt for the loop condition." @@ -13727,9 +13760,9 @@ See also `verilog-header' for an alternative format." > _ \n > (- verilog-indent-level-behavioral) "endmodule" (progn (electric-verilog-terminate-line) nil)) -;;; ------------------------------------------------------------------------ -;;; Define a default OVM class, with macros and new() -;;; ------------------------------------------------------------------------ +;; ------------------------------------------------------------------------ +;; Define a default OVM class, with macros and new() +;; ------------------------------------------------------------------------ (define-skeleton verilog-sk-ovm-class "Insert a class definition" @@ -13919,12 +13952,12 @@ and the case items." (interactive "*") (let* ((sig-re "[a-zA-Z0-9_]*") (v1 (buffer-substring - (save-excursion - (skip-chars-backward sig-re) - (point)) - (save-excursion - (skip-chars-forward sig-re) - (point))))) + (save-excursion + (skip-chars-backward sig-re) + (point)) + (save-excursion + (skip-chars-forward sig-re) + (point))))) (if (not (member v1 verilog-keywords)) (save-excursion (setq verilog-sk-signal v1) @@ -14004,7 +14037,7 @@ and the case items." resume: > (- verilog-case-indent) "endcase" (progn (electric-verilog-terminate-line) nil) > (- verilog-indent-level-behavioral) "end" (progn (electric-verilog-terminate-line) nil)) - +;;; Mouse Events: ;; ;; Include file loading with mouse/return event ;; @@ -14039,7 +14072,7 @@ Clicking on the middle-mouse button loads them in a buffer (as in dired)." (when (or verilog-highlight-includes verilog-highlight-modules) (save-excursion - (save-match-data ;; A query-replace may call this function - do not disturb + (save-match-data ; A query-replace may call this function - do not disturb (verilog-save-buffer-state (verilog-save-scan-cache (let (end-point) @@ -14078,7 +14111,7 @@ Clicking on the middle-mouse button loads them in a buffer (as in dired)." (save-excursion (goto-char (match-beginning 0)) (unless (verilog-inside-comment-or-string-p) - (verilog-read-inst-module-matcher) ;; sets match 0 + (verilog-read-inst-module-matcher) ; sets match 0 (let* ((ov (make-overlay (match-beginning 0) (match-end 0)))) (overlay-put ov 'start-closed 't) (overlay-put ov 'end-closed 't) @@ -14110,7 +14143,7 @@ Clicking on the middle-mouse button loads them in a buffer (as in dired)." "Load file under button 2 click's EVENT. Files are checked based on `verilog-library-flags'." (interactive "@e") - (save-excursion ;; implement a Verilog specific ffap-at-mouse + (save-excursion ; implement a Verilog specific ffap-at-mouse (mouse-set-point event) (verilog-load-file-at-point t))) @@ -14122,7 +14155,7 @@ Files are checked based on `verilog-library-flags'." If WARN, throw warning if not found. Files are checked based on `verilog-library-flags'." (interactive) - (save-excursion ;; implement a Verilog specific ffap + (save-excursion ; implement a Verilog specific ffap (let ((overlays (overlays-in (point) (point))) hit) (while (and overlays (not hit)) @@ -14147,8 +14180,8 @@ Files are checked based on `verilog-library-flags'." "File '%s' isn't readable, use shift-mouse2 to paste in this field" (match-string 1)))))))) -;; -;; Bug reporting + +;;; Bug reporting: ;; (defun verilog-faq () @@ -14284,6 +14317,7 @@ but instead, [[Fill in here]] happens!. ;; Local Variables: ;; checkdoc-permit-comma-termination-flag:t ;; checkdoc-force-docstrings-flag:nil +;; indent-tabs-mode:nil ;; End: ;;; verilog-mode.el ends here commit 87c4e2a686ff8b166974ca21d46faf5e802fb1b6 Author: Glenn Morris <rgm@gnu.org> Date: Sun Aug 16 06:24:11 2015 -0400 ; Auto-commit of ChangeLog files. diff --git a/ChangeLog.2 b/ChangeLog.2 index b4de90e..422dd0b 100644 --- a/ChangeLog.2 +++ b/ChangeLog.2 @@ -1,3 +1,155 @@ +2015-08-15 Paul Eggert <eggert@cs.ucla.edu> + + substitute-command-keys a few more doc strings + * lisp/allout.el (outlineify-sticky): + * lisp/files.el (hack-one-local-variable--obsolete): + * lisp/help-fns.el (help-fns--obsolete, describe-variable): + Use substitute-command-keys on some doc strings so that + they don't use hard-coded key bindings or quoting styles. + + Fix quoting in Fformat calls + * src/image.c (xbm_read_bitmap_data, xbm_load_image, xbm_load) + (xpm_load, xpm_load_image, pbm_load, png_load_body) + (jpeg_load_body, tiff_load, gif_load, imagemagick_load_image) + (imagemagick_load, svg_load, svg_load_image, gs_load) + (x_kill_gs_process): + * src/lread.c (load_warn_old_style_backquotes): + * src/xfaces.c (load_pixmap): + * src/xselect.c (x_clipboard_manager_error_1): + Quote diagnostics according to user preference when calling + Fformat or its derivatives. + +2015-08-15 Glenn Morris <rgm@gnu.org> + + * admin/admin.el (set-version, set-copyright): Remove deleted files. + +2015-08-15 Stephen Leake <stephen_leake@stephe-leake.org> + + Allow describe-function helpers to access buffer-local values. + This will be used by cedet/mode-local.el `describe-mode-local-override' + on `help-fns-describe-function-functions' in upstream CEDET. + * lisp/help-fns.el (describe-function-orig-buffer): New, let-bound in + `describe-function'. + (describe-function): Bind it, save it on the help xref stack. + + Handle pulse-background being nil + * lisp/cedet/pulse.el (pulse-lighten-highlight): Inherit + pulse-background, handle it being nil. + +2015-08-15 Paul Eggert <eggert@cs.ucla.edu> + + Fix "\`" confusion in Lisp strings + * admin/authors.el (authors-canonical-author-name): + Fix typo by using "\\`" not "\`" in string RE. + * lisp/obsolete/complete.el (PC-complete-as-file-name): + * lisp/obsolete/vi.el (vi-backward-blank-delimited-word): + * lisp/progmodes/verilog-mode.el (verilog-mode-map): + Use plain "`", not the equivalent-but-confusing "\`", in strings. + * lisp/textmodes/texinfmt.el: Fix comment likewise. + +2015-08-15 Dani Moncayo <dmoncayo@gmail.com> + + Remove 'nt/zipdist.bat' (no longer used) + * nt/zipdist.bat: Remove - no longer used. + +2015-08-15 Michael Albinus <michael.albinus@gmx.de> + + * lisp/net/tramp-sh.el (tramp-remote-selinux-p): Use "selinuxenabled" + rather than "getenforce". + (tramp-sh-handle-set-file-selinux-context): Do not + cache SELinux context if not all context components are given. + +2015-08-15 Eli Zaretskii <eliz@gnu.org> + + Add doc strings to 2 help-mode.el functions + * lisp/help-mode.el (help-mode-setup, help-mode-finish): Add doc + strings. (Bug#21263) + + Remove files used by the old MS-Windows specific build procedure + * nt/configure.bat: Remove everything except the blurb about the + new build procedure. + * make-dist: Remove references to makefile.w32-in in various + directories, and to files in nt/ that were deleted. + * etc/NEWS: Mention the fact that the files were dropped. + +2015-08-15 Paul Eggert <eggert@cs.ucla.edu> + + * doc/emacs/mule.texi (Charsets): Give fuller title for ISO-IR. + (Bug#21248) + +2015-08-14 Paul Eggert <eggert@cs.ucla.edu> + + Default to inotify instead of gfile + * configure.ac (with_file_notification): Fix typo that + prevented suppression of file notification if HAVE_NS. + (NOTIFY_OBJ): Prefer inotify to gfile if both exist and + with_file_notification is 'yes' (Bug#21241). + * etc/NEWS: Mention this. + + Fix broken URLs for ISO-IR + * doc/emacs/mule.texi (Charsets): + * lisp/international/mule-conf.el: + Fix broken URL (Bug#21248). + + Low-level diagnostics now use ‘text-quoting-style’ + * src/doprnt.c (doprnt): + Format ` and ' as per ‘text-quoting-style’. + * src/xdisp.c (vmessage, message): Mention that the format should + not contain ` or '. + + Prefer ‘format’ to ‘substitute-command-keys’ + * src/character.h (uLSQM, uRSQM): Move here ... + * src/doc.c (uLSQM, uRSQM): ... from here. + * src/doc.c (Fsubstitute_command_keys): + * src/syntax.c (Finternal_describe_syntax_value): + * lisp/cedet/mode-local.el (mode-local-print-binding) + (mode-local-describe-bindings-2): + * lisp/cedet/srecode/srt-mode.el (srecode-macro-help): + * lisp/cus-theme.el (describe-theme-1): + * lisp/descr-text.el (describe-text-properties-1, describe-char): + * lisp/emacs-lisp/cl-extra.el (cl--describe-class): + * lisp/emacs-lisp/cl-generic.el (cl--generic-describe): + * lisp/emacs-lisp/eieio-opt.el (eieio-help-constructor): + * lisp/emacs-lisp/package.el (describe-package-1): + * lisp/faces.el (describe-face): + * lisp/help-fns.el (help-fns--key-bindings) + (help-fns--compiler-macro, help-fns--parent-mode) + (help-fns--obsolete, help-fns--interactive-only) + (describe-function-1, describe-variable): + * lisp/help.el (describe-mode): + Prefer ‘format’ to ‘substitute-command-keys’ when either will do + to implement quoting style. This generally makes the code simpler. + + Extend ‘format’ to translate curved quotes + This is a followup to the recent doc string change, and deals with + diagnostics and the like. This patch is more conservative than + the doc string change, in that the behavior of ‘format’ changes + only if its first arg contains curved quotes and the user prefers + straight or grave quotes. (Come to think of it, perhaps we should + be similarly conservative with doc strings too, but that can wait.) + The upside of this conservatism is that existing usage is almost + surely unaffected. The downside is that we'll eventually have to + change Emacs's format strings to use curved quotes in places where + the user might want curved quotes, but that's a simple and + mechanical translation that I'm willing to do later. (Bug#21222) + * doc/lispref/help.texi (Keys in Documentation): + Move description of text-quoting-style from here ... + * doc/lispref/strings.texi (Formatting Strings): + ... to here, and describe new behavior of ‘format’. + * etc/NEWS: Describe new behavior. + * lisp/calc/calc-help.el (calc-describe-thing): + * lisp/emacs-lisp/derived.el (derived-mode-make-docstring): + * lisp/info.el (Info-find-index-name): + Use ‘concat’ rather than ‘format’ to avoid misinterpretation + of recently-added curved quotes. + * src/doc.c (uLSQM0, uLSQM1, uLSQM2, uRSQM0, uRSQM1, uRSQM2): + Move from here ... + * src/lisp.h: ... to here. + * src/doc.c (text_quoting_style): New function. + (Fsubstitute_command_keys): Use it. + * src/editfns.c (Fformat): Implement new behavior. + * src/lisp.h (enum text_quoting_style): New enum. + 2015-08-14 Stefan Monnier <monnier@iro.umontreal.ca> * src/keyboard.c: Use false/true instead of 0/1 for booleans @@ -9279,7 +9431,7 @@ This file records repository revisions from commit 9d56a21e6a696ad19ac65c4b405aeca44785884a (exclusive) to -commit e1e33f201698229ae30a29c7008c3f6a3635d71f (inclusive). +commit f7ee23e587b01f179284b5554c67d579a2def676 (inclusive). See ChangeLog.1 for earlier changes. ;; Local Variables: