all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Noam Postavsky <npostavs@gmail.com>
To: Nil Geisweiller <ngeiswei@googlemail.com>
Cc: Alan Mackenzie <acm@muc.de>, 30735@debbugs.gnu.org
Subject: bug#30735: 25.3; slow comment c++-mode
Date: Tue, 13 Mar 2018 11:39:16 -0400	[thread overview]
Message-ID: <CAM-tV-8bOzqPVacT2bmCBhj+8gDjh+J5R01LhiN0-wTkr3DceQ@mail.gmail.com> (raw)
In-Reply-To: <1520364356.10274.1.camel@googlemail.com>

On Sun, Mar 11, 2018 at 4:15 PM, Nil Geisweiller
<ngeiswei@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





  parent reply	other threads:[~2018-03-13 15:39 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-06 19:25 bug#30735: 25.3; slow comment c++-mode ngeiswei
2018-03-06 20:01 ` bug#30735: (no subject) Nil Geisweiller
2018-04-04 16:31   ` Alan Mackenzie
2018-03-07 20:23 ` Nil Geisweiller
     [not found] ` <mailman.10200.1520364428.27995.bug-gnu-emacs@gnu.org>
2018-03-11 13:01   ` bug#30735: 25.3; slow comment c++-mode Alan Mackenzie
2018-03-11 20:15 ` bug#30735: (no subject) Nil Geisweiller
2018-03-13 15:39 ` Noam Postavsky [this message]
2018-03-14 19:51 ` Nil Geisweiller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAM-tV-8bOzqPVacT2bmCBhj+8gDjh+J5R01LhiN0-wTkr3DceQ@mail.gmail.com \
    --to=npostavs@gmail.com \
    --cc=30735@debbugs.gnu.org \
    --cc=acm@muc.de \
    --cc=ngeiswei@googlemail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.