]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/textmodes/css-mode.el (css-smie-rules): Toplevel's a list.
authorStefan Monnier <monnier@iro.umontreal.ca>
Fri, 4 Oct 2013 21:45:37 +0000 (17:45 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Fri, 4 Oct 2013 21:45:37 +0000 (17:45 -0400)
* test/automated/completion-tests.el:
* test/indent/css-mode.css: New files.

Fixes: debbugs:15467
lisp/ChangeLog
lisp/textmodes/css-mode.el
test/ChangeLog
test/automated/completion-tests.el [new file with mode: 0644]
test/indent/css-mode.css [new file with mode: 0644]

index 253f90278cd909e5dfc8ccb82d89d31180f0b76f..2f996cba2247a8f0e3db4dd951817f678940ab74 100644 (file)
@@ -1,3 +1,7 @@
+2013-10-04  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * textmodes/css-mode.el (css-smie-rules): Toplevel's a list (bug#15467).
+
 2013-10-04  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * subr.el (read-passwd): Hide chars even when called within a context
index 9c32604b4f41e5b98a1255813ce4a5cd2bb32dc0..0f4daa9a35cbd4a1b99bf474b62b5bbbe54b3dd1 100644 (file)
   (pcase (cons kind token)
     (`(:elem . basic) css-indent-offset)
     (`(:elem . arg) 0)
+    (`(:list-intro . "") t)             ;"" stands for BOB (bug#15467).
     (`(:before . "{") (if (smie-rule-hanging-p)
                          (smie-rule-parent 0)))))
 
index 00a49eea936e451a1ba1f35a81ee7ab3f481e51a..b3bcdd9a5bde563ddfd4ada5e6e80082a9258c59 100644 (file)
@@ -1,3 +1,8 @@
+2013-10-04  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * automated/completion-tests.el:
+       * indent/css-mode.css: New files.
+
 2013-10-03  Daiki Ueno  <ueno@gnu.org>
 
        * automated/data/package/signed/archive-contents:
diff --git a/test/automated/completion-tests.el b/test/automated/completion-tests.el
new file mode 100644 (file)
index 0000000..9e54a00
--- /dev/null
@@ -0,0 +1,46 @@
+;;; completion-tests.el --- Tests for completion functions  -*- lexical-binding: t; -*-
+
+;; Copyright (C) 2013  Free Software Foundation, Inc.
+
+;; Author: Stefan Monnier <monnier@iro.umontreal.ca>
+;; Keywords:
+
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
+;;
+
+;;; Code:
+
+(eval-when-compile (require 'cl-lib))
+
+(ert-deftest completion-test1 ()
+  (with-temp-buffer
+    (cl-flet* ((test/completion-table (string pred action)
+                                      (if (eq action 'lambda)
+                                          nil
+                                        "test: "))
+               (test/completion-at-point ()
+                                         (list (copy-marker (point-min))
+                                               (copy-marker (point))
+                                               #'test/completion-table)))
+      (let ((completion-at-point-functions (list #'test/completion-at-point)))
+        (insert "TEST")
+        (completion-at-point)
+        (should (equal (buffer-string)
+                       "test: "))))))
+
+(provide 'completion-tests)
+;;; completion-tests.el ends here
diff --git a/test/indent/css-mode.css b/test/indent/css-mode.css
new file mode 100644 (file)
index 0000000..f378753
--- /dev/null
@@ -0,0 +1,3 @@
+.xxx
+{
+}