GNU bug report logs - #30735
25.3; slow comment c++-mode

Previous Next

Packages: cc-mode, emacs;

Reported by: ngeiswei <at> googlemail.com

Date: Tue, 6 Mar 2018 19:27:01 UTC

Severity: normal

Found in version 25.3

Done: Alan Mackenzie <acm <at> muc.de>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Noam Postavsky <npostavs <at> gmail.com>
To: Nil Geisweiller <ngeiswei <at> googlemail.com>
Cc: Alan Mackenzie <acm <at> muc.de>, 30735 <at> debbugs.gnu.org
Subject: bug#30735: 25.3; slow comment c++-mode
Date: Tue, 13 Mar 2018 11:39:16 -0400
On Sun, Mar 11, 2018 at 4:15 PM, Nil Geisweiller
<ngeiswei <at> googlemail.com> wrote:

> Unfortunately, I couldn't apply the patch completely because I couldn't get
> my hand on the source code of 25.3.1, only 25.3.

25.3 is the same as 25.3.1, the ".1" just refers to the build number
(i.e., how many times you've built that version of Emacs).

That said, it seems that the patch is against emacs-26 or master, not
25.3. In particular, the first hunk:

@@ -4677,10 +4677,10 @@
           (t 'c)))            ; Assuming the range is valid.
     range))

-(defsubst c-determine-limit-get-base (start try-size)
+(defsubst c-determine-limit-get-base (start try-size &optional abs-limit)
   ;; Get a "safe place" approximately TRY-SIZE characters before START.
-  ;; This doesn't preserve point.
-  (let* ((pos (max (- start try-size) (point-min)))
+  ;; This defsubst doesn't preserve point.
+  (let* ((pos (max (- start try-size) (point-min) (or abs-limit 0)))
      (base (c-state-semi-safe-place pos))
      (s (save-restriction
           (widen)

In 25.3, the end context would look like this:

     (base (c-state-semi-safe-place pos))
     (s (parse-partial-sexp base pos)))
    (if (or (nth 4 s) (nth 3 s))    ; comment or string




This bug report was last modified 7 years and 49 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.