From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Matthias Meulien Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Custom option to turn Flyspell mode on in prog modes Date: Thu, 12 Dec 2013 00:17:25 +0100 Message-ID: <87fvpzuge2.fsf@gmail.com> References: <87ppp6vpjv.fsf@gmail.com> <2643591.vy3k34KHB8@descartes> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1386803850 25570 80.91.229.3 (11 Dec 2013 23:17:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 11 Dec 2013 23:17:30 +0000 (UTC) Cc: emacs-devel@gnu.org To: =?utf-8?Q?R=C3=BCdiger?= Sonderfeld Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Dec 12 00:17:37 2013 Return-path: Envelope-to: ged-emacs-devel@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 1Vqt26-00007b-DT for ged-emacs-devel@m.gmane.org; Thu, 12 Dec 2013 00:17:34 +0100 Original-Received: from localhost ([::1]:60694 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vqt25-0008Sw-Ti for ged-emacs-devel@m.gmane.org; Wed, 11 Dec 2013 18:17:33 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41058) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vqt22-0008Qv-6a for emacs-devel@gnu.org; Wed, 11 Dec 2013 18:17:31 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vqt21-0003hQ-CJ for emacs-devel@gnu.org; Wed, 11 Dec 2013 18:17:30 -0500 Original-Received: from mail-we0-x22f.google.com ([2a00:1450:400c:c03::22f]:39572) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vqt21-0003ge-64 for emacs-devel@gnu.org; Wed, 11 Dec 2013 18:17:29 -0500 Original-Received: by mail-we0-f175.google.com with SMTP id t60so7300232wes.34 for ; Wed, 11 Dec 2013 15:17:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=nAIuL+N6SBWuZDaeyvJmKgAx2rpA6h7/unAQuiXMp0g=; b=By2WUc9VzgE1bxu/yLyMUiYnewrKg+cWyGdW9NtRXIM9Js/N+3k9YLPpiQM6X/oMsJ 83hLP9dInNUXH+hVeNYhHfLs99ACtj5Q+LKhgdypU0Omfj8GR+4ow0LqlY62JoviqX+1 z+CaKJu4q+hkbVoiq8e53Y4mJYWje+WM6JL5QfGgYf1nbQz00Lb0m5CTDhrB/1c10aCV TlKphENFVtCcwR7re04f4b2fyv3RsjrzlDTqnvuCm5EAjFUzx22XwJmNn00cbrYr8KB0 kITaME+jOj69itxAf97I00LdbP1FCr3TRkQEc5U8RrEgSfuutebFXw09Lox8sysP+t+P PJ0Q== X-Received: by 10.180.79.38 with SMTP id g6mr5017485wix.60.1386803847571; Wed, 11 Dec 2013 15:17:27 -0800 (PST) Original-Received: from choubidou.localdomain ([2a01:e35:2ef1:4540:290:f5ff:feb9:5d26]) by mx.google.com with ESMTPSA id d2sm19261097wik.11.2013.12.11.15.17.26 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 11 Dec 2013 15:17:26 -0800 (PST) In-Reply-To: <2643591.vy3k34KHB8@descartes> (=?utf-8?Q?=22R=C3=BCdiger?= Sonderfeld"'s message of "Mon, 09 Dec 2013 14:28:49 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c03::22f X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:166313 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable R=C3=BCdiger Sonderfeld writes: > Looks good. But I don't think `turn-on-flyspell-prog' is needed=20 > because `flyspell-prog-mode' already turns the mode on=20 > unconditionally. (Although maybe the latter should be=20 > reconsidered.)=20 You are right. The following works well. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-lisp-progmodes-prog-mode.el-Add-custom-options-to-mo.patch >From 29893db295fa1d01f9eec0f3f029b33d9a523a49 Mon Sep 17 00:00:00 2001 From: Matthias Meulien Date: Thu, 12 Dec 2013 00:09:16 +0100 Subject: [PATCH] lisp/progmodes/prog-mode.el: Add custom options to mode hook --- lisp/progmodes/prog-mode.el | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lisp/progmodes/prog-mode.el b/lisp/progmodes/prog-mode.el index b3ed328..f325a67 100644 --- a/lisp/progmodes/prog-mode.el +++ b/lisp/progmodes/prog-mode.el @@ -35,6 +35,12 @@ "Generic programming mode, from which others derive." :group 'languages) +(defcustom prog-mode-hook nil + "Normal hook run when entering Text mode and many related modes." + :type 'hook + :options '(flyspell-prog-mode abbrev-mode flymake-mode linum-mode) + :group 'prog-mode) + (defvar prog-mode-map (let ((map (make-sparse-keymap))) (define-key map [?\C-\M-q] 'prog-indent-sexp) -- 1.8.5.1 --=-=-= Content-Type: text/plain -- Matthias --=-=-=--