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: Chong Yidong
Subject: bug#5570: Emacs 23.1.91.1 C++ mode "ESC C-q" and TAB indenting issue.
Date: Sun, 21 Feb 2010 17:06:17 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.92 (gnu/linux)

Paul Pogonyshev <pogonyshev@gmx.net> writes:

> Chong Yidong wrote:
>> Paul Pogonyshev <pogonyshev@gmx.net> writes:
>> 
>> >> Any chance you might try the head versions in the bzr repository?
>> >
>> > OK, but a bit later.  I guess it is of little help, but currently I
>> > use revision 98816 (just chose one at random) and cc-mode works fine.
>> 
>> It would be nice if you could test the patch Alan posted at
>> 
>>   http://debbugs.gnu.org/cgi/bugreport.cgi?bug=5570#40
>> 
>> since "Bob" has not responded to the request to test it.
>
> It doesn't apply to trunk and I'd prefer not to guess how to merge.
> Can you rediff it?

Here, try this:

*** lisp/progmodes/cc-mode.el   2010-02-06 13:01:43 +0000
--- lisp/progmodes/cc-mode.el   2010-02-21 22:05:23 +0000
***************
*** 642,652 ****
      (widen)
      (save-excursion
        (if c-get-state-before-change-functions
!         (let ((beg (point-min))
!               (end (point-max)))
!           (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)
                   (- (point-max) (point-min))))))
--- 642,650 ----
      (widen)
      (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)
                   (- (point-max) (point-min))))))
***************
*** 1042,1047 ****
--- 1040,1053 ----
          (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)






reply via email to

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