]> code.delx.au - gnu-emacs/blobdiff - lisp/progmodes/prog-mode.el
Merge from emacs-24
[gnu-emacs] / lisp / progmodes / prog-mode.el
index 5037020f94e403bc9c5753741bde3cff5d204f92..1cfe1568813c4becc3f588d18928a586cb38d95d 100644 (file)
@@ -73,11 +73,13 @@ Regexp match data 0 points to the chars."
   ;; Check that the chars should really be composed into a symbol.
   (let* ((start (match-beginning 0))
         (end (match-end 0))
-        (syntaxes (if (eq (char-syntax (char-after start)) ?w)
+        (syntaxes-beg (if (memq (char-syntax (char-after start)) '(?w ?_))
+                           '(?w ?_) '(?. ?\\)))
+        (syntaxes-end (if (memq (char-syntax (char-before end)) '(?w ?_))
                       '(?w ?_) '(?. ?\\)))
         match)
-    (if (or (memq (char-syntax (or (char-before start) ?\s)) syntaxes)
-           (memq (char-syntax (or (char-after end) ?\s)) syntaxes)
+    (if (or (memq (char-syntax (or (char-before start) ?\s)) syntaxes-beg)
+           (memq (char-syntax (or (char-after end) ?\s)) syntaxes-end)
             ;; syntax-ppss could modify the match data (bug#14595)
             (progn (setq match (match-string 0)) (nth 8 (syntax-ppss))))
        ;; No composition for you.  Let's actually remove any composition