From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Christopher Schmidt Newsgroups: gmane.emacs.bugs Subject: bug#12761: cl-lib.el functions do not get font-locked like cl.el ones Date: Sat, 15 Dec 2012 16:54:24 +0000 (GMT) Message-ID: <87r4mrl0hj@ch.ristopher.com> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1355590505 3351 80.91.229.3 (15 Dec 2012 16:55:05 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 15 Dec 2012 16:55:05 +0000 (UTC) To: 12761@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Dec 15 17:55:19 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Tjv1C-0004W7-R6 for geb-bug-gnu-emacs@m.gmane.org; Sat, 15 Dec 2012 17:55:19 +0100 Original-Received: from localhost ([::1]:60284 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tjv0z-0007D1-KH for geb-bug-gnu-emacs@m.gmane.org; Sat, 15 Dec 2012 11:55:05 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:52742) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tjv0u-0007BG-Tt for bug-gnu-emacs@gnu.org; Sat, 15 Dec 2012 11:55:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tjv0s-00026E-9T for bug-gnu-emacs@gnu.org; Sat, 15 Dec 2012 11:55:00 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:34049) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tjv0s-000264-5H for bug-gnu-emacs@gnu.org; Sat, 15 Dec 2012 11:54:58 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1Tjv1u-0001LR-6m for bug-gnu-emacs@gnu.org; Sat, 15 Dec 2012 11:56:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Christopher Schmidt Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 15 Dec 2012 16:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12761 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.13555905435144 (code B ref -1); Sat, 15 Dec 2012 16:56:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 15 Dec 2012 16:55:43 +0000 Original-Received: from localhost ([127.0.0.1]:44300 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tjv1b-0001Ku-2v for submit@debbugs.gnu.org; Sat, 15 Dec 2012 11:55:43 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:41341) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tjv1Y-0001Kn-2D for submit@debbugs.gnu.org; Sat, 15 Dec 2012 11:55:41 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tjv0T-000215-9j for submit@debbugs.gnu.org; Sat, 15 Dec 2012 11:54:35 -0500 Original-Received: from lists.gnu.org ([208.118.235.17]:41619) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tjv0T-00020n-6h for submit@debbugs.gnu.org; Sat, 15 Dec 2012 11:54:33 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:52689) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tjv0Q-0007Aj-I6 for bug-gnu-emacs@gnu.org; Sat, 15 Dec 2012 11:54:33 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tjv0N-0001vz-Pu for bug-gnu-emacs@gnu.org; Sat, 15 Dec 2012 11:54:30 -0500 Original-Received: from ristopher.com ([146.185.21.93]:36874 helo=saturn.ch.ristopher.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tjv0N-0001vj-DR for bug-gnu-emacs@gnu.org; Sat, 15 Dec 2012 11:54:27 -0500 Original-Received: by saturn.ch.ristopher.com (Postfix, from userid 0) id 93A5D20168; Sat, 15 Dec 2012 16:54:24 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=ch.ristopher.com; s=mail; t=1355590464; bh=o2Eax4lMktoGpRHCHFyVVGOL2oivOiTFb1UonroCmJk=; h=From:To:Subject:In-Reply-To:Message-ID:References:MIME-Version: Content-Type:Date; b=yFz+4KIpezgBi4I79DtBQqb4ONh1aI2uS529XSV7M/zq4tT24nEimtpHZnDlWtkZx be5C0rbMDt+HyH6OCEEfkX+C0NeWv5WuY1V4HSRW5X3ICGdaTReidtwwZizfI4aTfK fCWBMZvqbWl7yK64T3w+zaHa2Yoi6gz0VEIH/QAk= In-Reply-To: (Stefan Monnier's message of "Tue, 30 Oct 2012 09:33:16 -0400") Mail-Followup-To: bug-gnu-emacs@gnu.org X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x 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.x 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:68576 Archived-At: Stefan Monnier writes: >> So maybe that special treatment (lexical-let, letf, etc) >> should be removed, to make everyone equally miserable. > > Right. But then the "cl-*" versions could be fine choices (tho I'd > much rather not hard code those things in the font-lock rules. > Couldn't we build those dynamically by loading cl-lib.el, then going > through the obarray, keeping all macros whose name starts with "cl-" > but not "cl--"?). +1. I think it might be a good idea to remove CL font lock support in emacs-lisp-mode and its deviates by default. A function that adds keyword highlighting on the fly could be added, though. (require 'cl-lib) (defun add-cl-font-lock-keywords () (font-lock-add-keywords 'emacs-lisp-mode (eval-when-compile (cl-loop for s being the symbols for n = (symbol-name s) when (and (string-match-p "^cl-[^-]" n) (condition-case nil (eq (car (symbol-function s)) 'macro) (error))) collect (list (concat "(\\(?:[ \t]*\\)\\<\\(" (regexp-quote n) "\\)\\>") 1 font-lock-keyword-face) end)))) An user just needs to put (add-cl-font-lock-keywords) in his init.el in case he really wants CL font lock support. I am just brainstorming here. This does not take care of lisp-interaction-mode, *scratch*, etc. Christopher