From: Stefan Monnier <monnier@IRO.UMontreal.CA>
To: Ted Zlatanov <tzz@lifelogs.com>
Cc: emacs-devel@gnu.org
Subject: Re: [Emacs-diffs] trunk r115545: Cleanup cfengine3-mode so complete-symbol works again.
Date: Mon, 16 Dec 2013 21:25:14 -0500 [thread overview]
Message-ID: <jwvhaa8nrk6.fsf-monnier+emacsdiffs@gnu.org> (raw)
In-Reply-To: <E1VsaP2-0000uL-EZ@vcs.savannah.gnu.org> (Teodor Zlatanov's message of "Mon, 16 Dec 2013 15:48:16 +0000")
> (defun cfengine3-completion-function ()
> "Return completions for function name around or before point."
> (cfengine3-make-syntax-cache)
> - (let* ((bounds (cfengine3--current-word t))
> + (let* ((bounds (save-excursion
> + (let ((p (point)))
> + (skip-syntax-backward "w_" (point-at-bol))
> + (list (point) p))))
> (syntax (cfengine3-make-syntax-cache))
> (flist (assq 'functions syntax)))
BTW, it would be better for cfengine3-completion-function not to call
cfengine3-make-syntax-cache which can cause all kinds of processing
to happen. Instead it should return a completion-table-dynamic or
something like that, such that cfengine3-make-syntax-cache is only
called if/when the completion-table is actually used.
Stefan
next parent reply other threads:[~2013-12-17 2:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <E1VsaP2-0000uL-EZ@vcs.savannah.gnu.org>
2013-12-17 2:25 ` Stefan Monnier [this message]
2013-12-17 10:33 ` [Emacs-diffs] trunk r115545: Cleanup cfengine3-mode so complete-symbol works again Ted Zlatanov
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwvhaa8nrk6.fsf-monnier+emacsdiffs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=emacs-devel@gnu.org \
--cc=tzz@lifelogs.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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).