[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r114133: rul-generic-mode-syntax-table fix for recen
From: |
Glenn Morris |
Subject: |
[Emacs-diffs] trunk r114133: rul-generic-mode-syntax-table fix for recent cc-mode changes |
Date: |
Wed, 04 Sep 2013 23:55:12 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 114133
revision-id: address@hidden
parent: address@hidden
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Wed 2013-09-04 19:55:08 -0400
message:
rul-generic-mode-syntax-table fix for recent cc-mode changes
* lisp/generic-x.el [rul-generic-mode]: Require cc-mode.
(c++-mode-syntax-table): Declare.
(rul-generic-mode-syntax-table): Init in the defvar.
modified:
lisp/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1432
lisp/generic-x.el
genericx.el-20091113204419-o5vbwnq5f7feedwu-1268
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2013-09-04 20:56:54 +0000
+++ b/lisp/ChangeLog 2013-09-04 23:55:08 +0000
@@ -1,3 +1,9 @@
+2013-09-04 Glenn Morris <address@hidden>
+
+ * generic-x.el [rul-generic-mode]: Require cc-mode.
+ (c++-mode-syntax-table): Declare.
+ (rul-generic-mode-syntax-table): Init in the defvar.
+
2013-09-04 Stefan Monnier <address@hidden>
* autorevert.el (auto-revert-notify-handler): Explicitly ignore
=== modified file 'lisp/generic-x.el'
--- a/lisp/generic-x.el 2013-08-07 22:42:44 +0000
+++ b/lisp/generic-x.el 2013-09-04 23:55:08 +0000
@@ -1283,18 +1283,22 @@
"WIN32SMINOR")
"Function argument constants used in InstallShield 3 and 5."))
-(defvar rul-generic-mode-syntax-table nil
+;; c++-mode-syntax-table used to be autoloaded, with an initial nil value.
+;; This file did not load cc-mode, and therefore rul-generic-mode-syntax-table
+;; would have different values according to whether or not cc-mode
+;; happened to be loaded before this file was.
+(require 'cc-mode)
+(defvar c++-mode-syntax-table)
+
+(defvar rul-generic-mode-syntax-table
+ (let ((table (make-syntax-table c++-mode-syntax-table)))
+ (modify-syntax-entry ?\r "> b" table)
+ (modify-syntax-entry ?\n "> b" table)
+ (modify-syntax-entry ?/ ". 124b" table)
+ (modify-syntax-entry ?* ". 23" table)
+ table)
"Syntax table to use in `rul-generic-mode' buffers.")
-(setq rul-generic-mode-syntax-table
- (make-syntax-table c++-mode-syntax-table))
-
-(modify-syntax-entry ?\r "> b" rul-generic-mode-syntax-table)
-(modify-syntax-entry ?\n "> b" rul-generic-mode-syntax-table)
-
-(modify-syntax-entry ?/ ". 124b" rul-generic-mode-syntax-table)
-(modify-syntax-entry ?* ". 23" rul-generic-mode-syntax-table)
-
;; here manually instead
(defun generic-rul-mode-setup-function ()
(make-local-variable 'parse-sexp-ignore-comments)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r114133: rul-generic-mode-syntax-table fix for recent cc-mode changes,
Glenn Morris <=