home *** CD-ROM | disk | FTP | other *** search
- x-gateway: rodan.UU.NET from bug-lucid-emacs to alt.lucid-emacs.bug; Thu, 28 Jan 1993 21:47:37 EST
- Date: Fri, 29 Jan 1993 13:46:45 EST
- From: rwhitby%research.canon.oz.au@lucid.com (Rod Whitby)
- Message-ID: <9301290246.AA12074@bing.research.canon.oz.au>
- Subject: Patch to font_lock.c
- Newsgroups: alt.lucid-emacs.bug
- Path: sparky!uunet!wendy-fate.uu.net!bug-lucid-emacs
- Sender: bug-lucid-emacs-request@lucid.com
- Lines: 66
-
- When calling find_context_start with a zero end parameter, point may
- be moved by the call to end_of_defun. This means that point is not
- preserved across the call to buffer-syntactic-context.
-
- Here is a patch to font_lock.c so point is preserved when calling
- buffer-syntactic-context.
-
- *** lemacs-19.4/src/font_lock.c~ Wed Jan 20 20:42:39 1993
- --- lemacs-19.4/src/font_lock.c Fri Jan 29 13:03:19 1993
- ***************
- *** 107,112 ****
- --- 107,113 ----
- static void
- find_context_start (int pt, int end)
- {
- + int npt;
- int do_bod = (pt > context_cache.end_point ||
- current_buffer != context_cache.buffer);
-
- ***************
- *** 117,124 ****
- {
- /* We must start searching at the beginning of defun.
- */
- ! pt = beginning_of_defun (pt);
- ! context_cache.start_point = pt;
- context_cache.buffer = current_buffer;
- context_cache.context = context_none;
- context_cache.ccontext = ccontext_none;
- --- 118,125 ----
- {
- /* We must start searching at the beginning of defun.
- */
- ! npt = beginning_of_defun (pt);
- ! context_cache.start_point = npt;
- context_cache.buffer = current_buffer;
- context_cache.context = context_none;
- context_cache.ccontext = ccontext_none;
- ***************
- *** 127,136 ****
- #endif
- context_cache.scontext = '\000';
- context_cache.depth = 0;
- ! context_cache.backslash_p = ((pt > 1) && (CHAR_AT (pt - 1) == '\\'));
- if (end)
- {
- ! if (end < pt) abort ();
- context_cache.end_point = end;
- }
- else
- --- 128,137 ----
- #endif
- context_cache.scontext = '\000';
- context_cache.depth = 0;
- ! context_cache.backslash_p = ((npt > 1) && (CHAR_AT (npt - 1) == '\\'));
- if (end)
- {
- ! if (end < npt) abort ();
- context_cache.end_point = end;
- }
- else
-
- --------------------------------------------- _--_|\ |
- Rod Whitby (rwhitby@research.canon.oz.au) / \ |
- Canon Information Systems Research Australia \_.--._/ |
- 1 Thomas Holt Drive, North Ryde, N.S.W., 2113. v |
-