* textmodes/css-mode.el (css-backward-sexp): Stop once
authorJuanma Barranquero <lekktu@gmail.com>
Sun, 18 Jan 2009 22:32:20 +0000 (22:32 +0000)
committerJuanma Barranquero <lekktu@gmail.com>
Sun, 18 Jan 2009 22:32:20 +0000 (22:32 +0000)
  it reaches the beginning of the buffer.  (Bug#1949)

lisp/ChangeLog
lisp/textmodes/css-mode.el

index 1ad284b..a1cb1cc 100644 (file)
@@ -1,3 +1,8 @@
+2009-01-18  Juanma Barranquero  <lekktu@gmail.com>
+
+       * textmodes/css-mode.el (css-backward-sexp): Stop once it reaches
+       the beginning of the buffer.  (Bug#1949)
+
 2009-01-18  Markus Triska  <markus.triska@gmx.at>
 
        * linum.el (linum-update-window): Use `delq' instead of `delete';
index fdc9349..70dc3ca 100644 (file)
@@ -92,7 +92,7 @@
        ;; vice-versa).
        (t nil)))
     elems))
-        
+
 
 (defun css-extract-props-and-vals ()
   (with-temp-buffer
                                                  (progn
                                                    (re-search-forward "[ \t\n]+|[ \t\n]+<a href=\"cascade.html#value-def-inherit\" class=\"noxref\"><span class=\"value-inst-inherit\">inherit</span></a>")
                                                    (match-beginning 0)))))
-              ;; 
+              ;;
               (push (cons prop (css-extract-parse-val-grammar vals-string props))
                     props)))))
       props)))
             (fill-paragraph justify)
             ;; Don't try filling again.
             t)))
-        
+
        ((and (null (nth 8 ppss))
              (or (nth 1 ppss)
                  (and (ignore-errors
                         (save-excursion
                           (forward-comment (- (point-max)))
                           ;; FIXME: We should also skip punctuation.
-                          (not (memq (char-before) '(?\; ?\{)))))))))))
+                          (not (or (bobp) (memq (char-before) '(?\; ?\{))))))))))))
 
 (defun css-forward-sexp (n)
   (let ((forward-sexp-function nil))
              (if (looking-at "\\s(")
                  (css-indent-calculate)
                (css-indent-calculate-virtual))))))))))
-     
+
 
 (defun css-indent-line ()
   "Indent current line according to CSS indentation rules."