bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#5570: Emacs 23.1.91.1 C++ mode "ESC C-q" and TAB indenting issue.


From: Alan Mackenzie
Subject: bug#5570: Emacs 23.1.91.1 C++ mode "ESC C-q" and TAB indenting issue.
Date: Fri, 19 Feb 2010 20:34:37 +0000
User-agent: Mutt/1.5.9i

Hi, Bob,

I think I've got the problem nailed.  And I now think you were right
when you suggested it's related to the other indentation problems.

Would you please apply this patch to cc-mode.el, and tell me if the
problem's been fixed.

Thanks!


*** orig/cc-mode.el     2010-02-18 16:29:49.000000000 +0000
--- cc-mode.el  2010-02-19 20:15:14.630249504 +0000
***************
*** 635,641 ****
      (save-excursion
        (if c-get-state-before-change-functions
          (mapc (lambda (fn)
!                 (funcall fn beg end))
                c-get-state-before-change-functions))
        (if c-before-font-lock-function
          (funcall c-before-font-lock-function (point-min) (point-max)
--- 635,641 ----
      (save-excursion
        (if c-get-state-before-change-functions
          (mapc (lambda (fn)
!                 (funcall fn (point-min) (point-max)))
                c-get-state-before-change-functions))
        (if c-before-font-lock-function
          (funcall c-before-font-lock-function (point-min) (point-max)
***************
*** 1031,1036 ****
--- 1031,1044 ----
          (when (> beg end)
            (setq beg end)))
  
+       ;; C-y is capable of spuriously converting category properties
+       ;; c-</>-as-paren-syntax into hard syntax-table properties.  Remove
+       ;; these when it happens.
+       (c-clear-char-property-with-value beg end 'syntax-table
+                                         c-<-as-paren-syntax)
+       (c-clear-char-property-with-value beg end 'syntax-table
+                                         c->-as-paren-syntax)
+ 
        (c-trim-found-types beg end old-len) ; maybe we don't need all of these.
        (c-invalidate-sws-region-after beg end)
        (c-invalidate-state-cache beg)

On Thu, Feb 18, 2010 at 07:53:34AM -0800, Bob wrote:
> Alan,
> 
> That's good news! Please let me know when you get it fixed and I'd like to
> try it out.
> 
> BTW, the indenting and paren matching is a world better than 21.2, esp. with
> regard to template '<' and '>' characters. Good job!
> 
> Bob

-- 
Alan Mackenzie (Nuremberg, Germany).






reply via email to

[Prev in Thread] Current Thread [Next in Thread]