diff options
| author | Vibhav Pant | 2017-02-13 17:07:36 +0530 |
|---|---|---|
| committer | Vibhav Pant | 2017-02-13 17:07:36 +0530 |
| commit | cb410433e069b5bb450193353c3fea8593a643a9 (patch) | |
| tree | d2f4269781b4841e5a0c27ec57a5a4fbcec386c0 /lisp/progmodes | |
| parent | e742450427007cdde242c11380dfe32a950fab61 (diff) | |
| parent | 4b18ef7ba3dd8aae4f3c3bf931365ef7da883baf (diff) | |
| download | emacs-feature/byte-switch.tar.gz emacs-feature/byte-switch.zip | |
Merge branch 'master' into feature/byte-switchfeature/byte-switch
Diffstat (limited to 'lisp/progmodes')
| -rw-r--r-- | lisp/progmodes/js.el | 43 | ||||
| -rw-r--r-- | lisp/progmodes/vhdl-mode.el | 3 |
2 files changed, 26 insertions, 20 deletions
diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el index e42e01481b6..b42b2bca822 100644 --- a/lisp/progmodes/js.el +++ b/lisp/progmodes/js.el | |||
| @@ -1687,29 +1687,36 @@ This performs fontification according to `js--class-styles'." | |||
| 1687 | js--font-lock-keywords-3) | 1687 | js--font-lock-keywords-3) |
| 1688 | "Font lock keywords for `js-mode'. See `font-lock-keywords'.") | 1688 | "Font lock keywords for `js-mode'. See `font-lock-keywords'.") |
| 1689 | 1689 | ||
| 1690 | (defconst js--syntax-propertize-regexp-syntax-table | 1690 | (defconst js--syntax-propertize-regexp-regexp |
| 1691 | (let ((st (make-char-table 'syntax-table (string-to-syntax ".")))) | 1691 | (rx |
| 1692 | (modify-syntax-entry ?\[ "(]" st) | 1692 | ;; Start of regexp. |
| 1693 | (modify-syntax-entry ?\] ")[" st) | 1693 | "/" |
| 1694 | (modify-syntax-entry ?\\ "\\" st) | 1694 | (0+ (or |
| 1695 | st)) | 1695 | ;; Match characters outside of a character class. |
| 1696 | (not (any ?\[ ?/ ?\\)) | ||
| 1697 | ;; Match backslash quoted characters. | ||
| 1698 | (and "\\" not-newline) | ||
| 1699 | ;; Match character class. | ||
| 1700 | (and | ||
| 1701 | "[" | ||
| 1702 | (0+ (or | ||
| 1703 | (not (any ?\] ?\\)) | ||
| 1704 | (and "\\" not-newline))) | ||
| 1705 | "]"))) | ||
| 1706 | (group "/")) | ||
| 1707 | "Regular expression matching a JavaScript regexp literal.") | ||
| 1696 | 1708 | ||
| 1697 | (defun js-syntax-propertize-regexp (end) | 1709 | (defun js-syntax-propertize-regexp (end) |
| 1698 | (let ((ppss (syntax-ppss))) | 1710 | (let ((ppss (syntax-ppss))) |
| 1699 | (when (eq (nth 3 ppss) ?/) | 1711 | (when (eq (nth 3 ppss) ?/) |
| 1700 | ;; A /.../ regexp. | 1712 | ;; A /.../ regexp. |
| 1701 | (while | 1713 | (goto-char (nth 8 ppss)) |
| 1702 | (when (re-search-forward "\\(?:\\=\\|[^\\]\\)\\(?:\\\\\\\\\\)*/" | 1714 | (when (and (looking-at js--syntax-propertize-regexp-regexp) |
| 1703 | end 'move) | 1715 | ;; Don't touch text after END. |
| 1704 | (if (nth 1 (with-syntax-table | 1716 | (<= (match-end 1) end)) |
| 1705 | js--syntax-propertize-regexp-syntax-table | 1717 | (put-text-property (match-beginning 1) (match-end 1) |
| 1706 | (let ((parse-sexp-lookup-properties nil)) | 1718 | 'syntax-table (string-to-syntax "\"/")) |
| 1707 | (parse-partial-sexp (nth 8 ppss) (point))))) | 1719 | (goto-char (match-end 0)))))) |
| 1708 | ;; A / within a character class is not the end of a regexp. | ||
| 1709 | t | ||
| 1710 | (put-text-property (1- (point)) (point) | ||
| 1711 | 'syntax-table (string-to-syntax "\"/")) | ||
| 1712 | nil)))))) | ||
| 1713 | 1720 | ||
| 1714 | (defun js-syntax-propertize (start end) | 1721 | (defun js-syntax-propertize (start end) |
| 1715 | ;; JavaScript allows immediate regular expression objects, written /.../. | 1722 | ;; JavaScript allows immediate regular expression objects, written /.../. |
diff --git a/lisp/progmodes/vhdl-mode.el b/lisp/progmodes/vhdl-mode.el index 6c76d7e4ad2..06ffd54d2df 100644 --- a/lisp/progmodes/vhdl-mode.el +++ b/lisp/progmodes/vhdl-mode.el | |||
| @@ -1010,7 +1010,7 @@ if the header needs to be version controlled. | |||
| 1010 | The following keywords for template generation are supported: | 1010 | The following keywords for template generation are supported: |
| 1011 | <filename> : replaced by the name of the buffer | 1011 | <filename> : replaced by the name of the buffer |
| 1012 | <author> : replaced by the user name and email address | 1012 | <author> : replaced by the user name and email address |
| 1013 | (`user-full-name',`mail-host-address', `user-mail-address') | 1013 | (`user-full-name', `user-mail-address') |
| 1014 | <authorfull> : replaced by the user full name (`user-full-name') | 1014 | <authorfull> : replaced by the user full name (`user-full-name') |
| 1015 | <login> : replaced by user login name (`user-login-name') | 1015 | <login> : replaced by user login name (`user-login-name') |
| 1016 | <company> : replaced by contents of option `vhdl-company-name' | 1016 | <company> : replaced by contents of option `vhdl-company-name' |
| @@ -1967,7 +1967,6 @@ are treated as single words otherwise." | |||
| 1967 | (unless (featurep 'xemacs) | 1967 | (unless (featurep 'xemacs) |
| 1968 | (custom-add-to-group 'vhdl-related 'transient-mark-mode 'custom-variable)) | 1968 | (custom-add-to-group 'vhdl-related 'transient-mark-mode 'custom-variable)) |
| 1969 | (custom-add-to-group 'vhdl-related 'user-full-name 'custom-variable) | 1969 | (custom-add-to-group 'vhdl-related 'user-full-name 'custom-variable) |
| 1970 | (custom-add-to-group 'vhdl-related 'mail-host-address 'custom-variable) | ||
| 1971 | (custom-add-to-group 'vhdl-related 'user-mail-address 'custom-variable) | 1970 | (custom-add-to-group 'vhdl-related 'user-mail-address 'custom-variable) |
| 1972 | 1971 | ||
| 1973 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 1972 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |