diff options
| author | Stefan Monnier | 2013-10-04 17:45:37 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2013-10-04 17:45:37 -0400 |
| commit | a27c1b72c5d444f591b179d89ab329faee4555b6 (patch) | |
| tree | 06f42b309ca3590f0124929af1d13ed323a3b5fd | |
| parent | 258ab3bc882036e9b3d85d73d1f22bc29f42f979 (diff) | |
| download | emacs-a27c1b72c5d444f591b179d89ab329faee4555b6.tar.gz emacs-a27c1b72c5d444f591b179d89ab329faee4555b6.zip | |
* lisp/textmodes/css-mode.el (css-smie-rules): Toplevel's a list.
* test/automated/completion-tests.el:
* test/indent/css-mode.css: New files.
Fixes: debbugs:15467
| -rw-r--r-- | lisp/ChangeLog | 4 | ||||
| -rw-r--r-- | lisp/textmodes/css-mode.el | 1 | ||||
| -rw-r--r-- | test/ChangeLog | 5 | ||||
| -rw-r--r-- | test/automated/completion-tests.el | 46 | ||||
| -rw-r--r-- | test/indent/css-mode.css | 3 |
5 files changed, 59 insertions, 0 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 253f90278cd..2f996cba224 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,9 @@ | |||
| 1 | 2013-10-04 Stefan Monnier <monnier@iro.umontreal.ca> | 1 | 2013-10-04 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 2 | ||
| 3 | * textmodes/css-mode.el (css-smie-rules): Toplevel's a list (bug#15467). | ||
| 4 | |||
| 5 | 2013-10-04 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 6 | |||
| 3 | * subr.el (read-passwd): Hide chars even when called within a context | 7 | * subr.el (read-passwd): Hide chars even when called within a context |
| 4 | where after-change-functions is disabled (bug#15501). | 8 | where after-change-functions is disabled (bug#15501). |
| 5 | (set-temporary-overlay-map): Don't remove oneself from pre-command-hook | 9 | (set-temporary-overlay-map): Don't remove oneself from pre-command-hook |
diff --git a/lisp/textmodes/css-mode.el b/lisp/textmodes/css-mode.el index 9c32604b4f4..0f4daa9a35c 100644 --- a/lisp/textmodes/css-mode.el +++ b/lisp/textmodes/css-mode.el | |||
| @@ -302,6 +302,7 @@ | |||
| 302 | (pcase (cons kind token) | 302 | (pcase (cons kind token) |
| 303 | (`(:elem . basic) css-indent-offset) | 303 | (`(:elem . basic) css-indent-offset) |
| 304 | (`(:elem . arg) 0) | 304 | (`(:elem . arg) 0) |
| 305 | (`(:list-intro . "") t) ;"" stands for BOB (bug#15467). | ||
| 305 | (`(:before . "{") (if (smie-rule-hanging-p) | 306 | (`(:before . "{") (if (smie-rule-hanging-p) |
| 306 | (smie-rule-parent 0))))) | 307 | (smie-rule-parent 0))))) |
| 307 | 308 | ||
diff --git a/test/ChangeLog b/test/ChangeLog index 00a49eea936..b3bcdd9a5bd 100644 --- a/test/ChangeLog +++ b/test/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2013-10-04 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * automated/completion-tests.el: | ||
| 4 | * indent/css-mode.css: New files. | ||
| 5 | |||
| 1 | 2013-10-03 Daiki Ueno <ueno@gnu.org> | 6 | 2013-10-03 Daiki Ueno <ueno@gnu.org> |
| 2 | 7 | ||
| 3 | * automated/data/package/signed/archive-contents: | 8 | * automated/data/package/signed/archive-contents: |
diff --git a/test/automated/completion-tests.el b/test/automated/completion-tests.el new file mode 100644 index 00000000000..9e54a00ddaf --- /dev/null +++ b/test/automated/completion-tests.el | |||
| @@ -0,0 +1,46 @@ | |||
| 1 | ;;; completion-tests.el --- Tests for completion functions -*- lexical-binding: t; -*- | ||
| 2 | |||
| 3 | ;; Copyright (C) 2013 Free Software Foundation, Inc. | ||
| 4 | |||
| 5 | ;; Author: Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 6 | ;; Keywords: | ||
| 7 | |||
| 8 | ;; This program is free software; you can redistribute it and/or modify | ||
| 9 | ;; it under the terms of the GNU General Public License as published by | ||
| 10 | ;; the Free Software Foundation, either version 3 of the License, or | ||
| 11 | ;; (at your option) any later version. | ||
| 12 | |||
| 13 | ;; This program is distributed in the hope that it will be useful, | ||
| 14 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 15 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 16 | ;; GNU General Public License for more details. | ||
| 17 | |||
| 18 | ;; You should have received a copy of the GNU General Public License | ||
| 19 | ;; along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 20 | |||
| 21 | ;;; Commentary: | ||
| 22 | |||
| 23 | ;; | ||
| 24 | |||
| 25 | ;;; Code: | ||
| 26 | |||
| 27 | (eval-when-compile (require 'cl-lib)) | ||
| 28 | |||
| 29 | (ert-deftest completion-test1 () | ||
| 30 | (with-temp-buffer | ||
| 31 | (cl-flet* ((test/completion-table (string pred action) | ||
| 32 | (if (eq action 'lambda) | ||
| 33 | nil | ||
| 34 | "test: ")) | ||
| 35 | (test/completion-at-point () | ||
| 36 | (list (copy-marker (point-min)) | ||
| 37 | (copy-marker (point)) | ||
| 38 | #'test/completion-table))) | ||
| 39 | (let ((completion-at-point-functions (list #'test/completion-at-point))) | ||
| 40 | (insert "TEST") | ||
| 41 | (completion-at-point) | ||
| 42 | (should (equal (buffer-string) | ||
| 43 | "test: ")))))) | ||
| 44 | |||
| 45 | (provide 'completion-tests) | ||
| 46 | ;;; completion-tests.el ends here | ||
diff --git a/test/indent/css-mode.css b/test/indent/css-mode.css new file mode 100644 index 00000000000..f3787538460 --- /dev/null +++ b/test/indent/css-mode.css | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | .xxx | ||
| 2 | { | ||
| 3 | } | ||