unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Simen Heggestøyl" <simenheg@gmail.com>
To: Dmitry Gutov <dgutov@yandex.ru>
Cc: 27392@debbugs.gnu.org
Subject: bug#27392: 26.0.50; [css-mode] Completion fails after "grid" is typed out
Date: Fri, 16 Jun 2017 20:23:29 +0200	[thread overview]
Message-ID: <1497637409.28243.1@smtp.gmail.com> (raw)
In-Reply-To: <b83c9d8e-9f04-c6b3-b51d-7009760acae9@yandex.ru>

[-- Attachment #1: Type: text/plain, Size: 180 bytes --]

It seems to be because 'css--complete-property-value' is a bit too 
eager.

Can you try with the following patch? If it's sufficent I'll install it
with some test cases.

-- Simen

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-WIP-Make-css-complete-property-value-less-eager.patch --]
[-- Type: text/x-patch, Size: 984 bytes --]

From baf93870893be37e4f214963bdb31659d7514af7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Simen=20Heggest=C3=B8yl?= <simenheg@gmail.com>
Date: Fri, 16 Jun 2017 20:19:56 +0200
Subject: [PATCH] WIP: Make css--complete-property-value less eager

---
 lisp/textmodes/css-mode.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/textmodes/css-mode.el b/lisp/textmodes/css-mode.el
index 0beaaaa32f..3c3c38afc9 100644
--- a/lisp/textmodes/css-mode.el
+++ b/lisp/textmodes/css-mode.el
@@ -1292,7 +1292,8 @@ css--complete-property-value
            (let ((property-end (point)))
              (skip-chars-backward "-[:alnum:]")
              (let ((property (buffer-substring (point) property-end)))
-               (car (member property css-property-ids)))))))
+               (and (eq (char-after property-end) ?:)
+                    (car (member property css-property-ids))))))))
     (when property
       (let ((end (point)))
         (save-excursion
-- 
2.11.0


  reply	other threads:[~2017-06-16 18:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-16 10:01 bug#27392: 26.0.50; [css-mode] Completion fails after "grid" is typed out Dmitry Gutov
2017-06-16 18:23 ` Simen Heggestøyl [this message]
2017-06-16 20:33   ` Dmitry Gutov
2017-06-17  8:40     ` Simen Heggestøyl

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=1497637409.28243.1@smtp.gmail.com \
    --to=simenheg@gmail.com \
    --cc=27392@debbugs.gnu.org \
    --cc=dgutov@yandex.ru \
    /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).