From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lennart Borgman Newsgroups: gmane.emacs.bugs Subject: bug#10633: Please mark invalid "; !important;" in CSS Date: Sun, 29 Jan 2012 00:52:25 +0100 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1327794794 1857 80.91.229.3 (28 Jan 2012 23:53:14 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 28 Jan 2012 23:53:14 +0000 (UTC) Cc: 10633@debbugs.gnu.org To: Juanma Barranquero Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jan 29 00:53:13 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RrI53-0003Hr-Hp for geb-bug-gnu-emacs@m.gmane.org; Sun, 29 Jan 2012 00:53:13 +0100 Original-Received: from localhost ([::1]:57319 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RrI53-0007H9-2Y for geb-bug-gnu-emacs@m.gmane.org; Sat, 28 Jan 2012 18:53:13 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:59023) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RrI4v-0007Gt-ST for bug-gnu-emacs@gnu.org; Sat, 28 Jan 2012 18:53:10 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RrI4r-0003l3-Ci for bug-gnu-emacs@gnu.org; Sat, 28 Jan 2012 18:53:05 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:38963) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RrI4r-0003kz-8e for bug-gnu-emacs@gnu.org; Sat, 28 Jan 2012 18:53:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1RrI4r-0003j9-Mq for bug-gnu-emacs@gnu.org; Sat, 28 Jan 2012 18:53:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Lennart Borgman Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 28 Jan 2012 23:53:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10633 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 10633-submit@debbugs.gnu.org id=B10633.132779477414314 (code B ref 10633); Sat, 28 Jan 2012 23:53:01 +0000 Original-Received: (at 10633) by debbugs.gnu.org; 28 Jan 2012 23:52:54 +0000 Original-Received: from localhost ([127.0.0.1]:42586 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RrI4j-0003io-VR for submit@debbugs.gnu.org; Sat, 28 Jan 2012 18:52:54 -0500 Original-Received: from mail-lpp01m010-f44.google.com ([209.85.215.44]:51893) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RrI4h-0003ia-N3 for 10633@debbugs.gnu.org; Sat, 28 Jan 2012 18:52:52 -0500 Original-Received: by lahl5 with SMTP id l5so1547350lah.3 for <10633@debbugs.gnu.org>; Sat, 28 Jan 2012 15:52:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=elKd3pHRZ0YxYQCpFR0Hbof7j/y3ZfZMb/HoRYsKl/o=; b=AZRCUIBnSbxGT92iz3ZAVOZF9Uy++FjZtYXmrezrfZ7Ui46wMVsBbgYCeY+Hq9ZBIO U+rMuESCa/CDd+KATxbFs45aLYWcddM9y31bRoFjeHDSH2F2ZBgVgMEJabPa75OOnKhg 4NcfC71MhyqBL+DVXKnTGf8K9h0VlFcCuegKA= Original-Received: by 10.152.129.226 with SMTP id nz2mr2583107lab.7.1327794765220; Sat, 28 Jan 2012 15:52:45 -0800 (PST) Original-Received: by 10.112.97.11 with HTTP; Sat, 28 Jan 2012 15:52:25 -0800 (PST) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:56156 Archived-At: On Sun, Jan 29, 2012 at 00:26, Lennart Borgman wrote: > On Sun, Jan 29, 2012 at 00:18, Juanma Barranquero wrot= e: >> On Sat, Jan 28, 2012 at 23:01, Lennart Borgman >> wrote: >> >>> One of my most common mistakes when editing CSS files is that I leave >>> a ";" before "!important", like this: >>> >>> =C2=A0 width: 500px; !important; >>> >>> This should have been >>> >>> =C2=A0 width: 500px !important; >>> >>> Could Emacs please help me with this?;-) >> >> Sure. Use hi-lock-mode, add a "; +!important" regexp as a file >> pattern, set the mode in the css-mode-hook, and for added simplicity >> do also >> >> (setq hi-lock-file-patterns-policy (lambda (patterns) >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0(if (eq major-mode 'css-mode) >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0t >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0(y-or-n-p "Add patterns >> from this buffer to hi-lock? ")))) >> >> Look, ma, no hands. > > Thanks, it is a great tip until it is fixed! Though it was a bit unpractical. It would be easier to just add it to css-mode-hook and forget hi-lock-mode. Since isearch does it without hi-lock-mode that is doable. Anyone remember how to do it offhand? (Or do I have to search the isearch code... ?;-)