From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jimmy Yuen Ho Wong Newsgroups: gmane.emacs.bugs Subject: bug#4310: Flymake standardizing(slightly) patch Date: Thu, 03 Sep 2009 08:23:31 -0400 Message-ID: <4A9FB543.10708@gmail.com> References: <4A9E01DC.3030903@gmail.com> <4pljkwbm76.fsf@fencepost.gnu.org> Reply-To: Jimmy Yuen Ho Wong , 4310@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1251982041 7254 80.91.229.12 (3 Sep 2009 12:47:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 3 Sep 2009 12:47:21 +0000 (UTC) Cc: 4310@emacsbugs.donarmstrong.com To: Glenn Morris Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Sep 03 14:47:14 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MjBia-0006W2-Oc for geb-bug-gnu-emacs@m.gmane.org; Thu, 03 Sep 2009 14:47:13 +0200 Original-Received: from localhost ([127.0.0.1]:39115 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MjBiZ-00070P-P9 for geb-bug-gnu-emacs@m.gmane.org; Thu, 03 Sep 2009 08:47:11 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MjBiU-000702-QN for bug-gnu-emacs@gnu.org; Thu, 03 Sep 2009 08:47:06 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MjBiP-0006yi-Tm for bug-gnu-emacs@gnu.org; Thu, 03 Sep 2009 08:47:06 -0400 Original-Received: from [199.232.76.173] (port=60460 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MjBiP-0006ye-QL for bug-gnu-emacs@gnu.org; Thu, 03 Sep 2009 08:47:01 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:55120) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MjBiO-0005JA-NI for bug-gnu-emacs@gnu.org; Thu, 03 Sep 2009 08:47:01 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n83Ckvkw011244; Thu, 3 Sep 2009 05:46:58 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id n83CU4PC008506; Thu, 3 Sep 2009 05:30:04 -0700 Resent-Date: Thu, 3 Sep 2009 05:30:04 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Jimmy Yuen Ho Wong Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Thu, 03 Sep 2009 12:30:04 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 4310 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 4310-submit@emacsbugs.donarmstrong.com id=B4310.12519806237607 (code B ref 4310); Thu, 03 Sep 2009 12:30:04 +0000 Original-Received: (at 4310) by emacsbugs.donarmstrong.com; 3 Sep 2009 12:23:43 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from mail-yw0-f171.google.com (mail-yw0-f171.google.com [209.85.211.171]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n83CNfFN007594 for <4310@emacsbugs.donarmstrong.com>; Thu, 3 Sep 2009 05:23:42 -0700 Original-Received: by ywh1 with SMTP id 1so1970718ywh.9 for <4310@emacsbugs.donarmstrong.com>; Thu, 03 Sep 2009 05:23:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=qg5wDBIrUose7s5QuooxhJRF0m9OecobTqeu9WkMEnI=; b=h+Npkg1poIeulue4L5EyuHvHJLAbyCH/M2jy0I9URZj2jiZ8+7s0//jW/IlreVSCi0 1uGnFFnFlSgRmiHYve1Tp9jnjB9Y3qi7/sgb1iIOVxdbLhmZ/V1cUSq3utwuZ4yW+/ty 7vnj5NUcifkSKkFJjF0HtoJnOW56P58VMknvo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=wPCf1bvP2pVRdsTl16e8EjHYSGbjWLTmrHXcWGXn2nvan6z0jno66efevO1FPpdX3N PDF0nPGf5WKuROwvFsAMDrfEMWdMIGFchD2N37K8SjO30Mi7Kz641/EMj8myeJ6J0KLj my32L5kTJ1edmvfyceTmiCg05IMoalzlYONVQ= Original-Received: by 10.91.7.17 with SMTP id k17mr7118805agi.24.1251980615457; Thu, 03 Sep 2009 05:23:35 -0700 (PDT) Original-Received: from MobileCat.local (146-115-23-49.c3-0.abr-ubr3.sbo-abr.ma.cable.rcn.com [146.115.23.49]) by mx.google.com with ESMTPS id 39sm1793802agd.6.2009.09.03.05.23.32 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 03 Sep 2009 05:23:32 -0700 (PDT) User-Agent: Thunderbird 2.0.0.23 (Macintosh/20090812) In-Reply-To: <4pljkwbm76.fsf@fencepost.gnu.org> X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Resent-Date: Thu, 03 Sep 2009 08:47:06 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:30766 Archived-At: Ah right. I missed that part of the documentation. Noob mistake. However, this brings me to a question, since all the initialization is essentially done before flymake finally runs syntax check at the end of the minor mode definition. If I want to run the minor mode hook before syntax check, but not after, what should I do? Also, I'd imagine some people might want to do something after syntax check is done too, like echoing to the minibuffer, or automatically jump to the first line of error etc. That means I should probably add a post-syntax-check hook. But it seems rather complicated due to the number of cases in which it may fail. Any suggestions? Glenn Morris wrote: > Jimmy Yuen Ho Wong wrote: > >> I've added a default keymap and a minor-mode hook to flymake > > With regards to the hook part, it already runs flymake-mode-hook, as > you can see eg by: > > (add-hook 'flymake-mode-hook (lambda () (error "foo"))) > > The define-minor-mode macro takes care of this. There is no need for a > hook to be defvar'd before use.