From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Matthias Meulien Newsgroups: gmane.emacs.bugs Subject: bug#16394: [PATCH] Custom option to turn Flyspell mode on in prog modes Date: Thu, 12 Dec 2013 00:17:25 +0100 Message-ID: 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 1389122524 28617 80.91.229.3 (7 Jan 2014 19:22:04 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 7 Jan 2014 19:22:04 +0000 (UTC) To: 16394@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jan 07 20:22:10 2014 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 1W0cE6-000403-3x for geb-bug-gnu-emacs@m.gmane.org; Tue, 07 Jan 2014 20:22:10 +0100 Original-Received: from localhost ([::1]:42426 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W0cE5-0003HG-NX for geb-bug-gnu-emacs@m.gmane.org; Tue, 07 Jan 2014 14:22:09 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51758) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W0cE2-0003HA-47 for bug-gnu-emacs@gnu.org; Tue, 07 Jan 2014 14:22:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W0cDz-0006Yx-Jc for bug-gnu-emacs@gnu.org; Tue, 07 Jan 2014 14:22:06 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:55677) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W0cDz-0006Ys-D8 for bug-gnu-emacs@gnu.org; Tue, 07 Jan 2014 14:22:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1W0cDy-0008Ko-RC for bug-gnu-emacs@gnu.org; Tue, 07 Jan 2014 14:22:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Matthias Meulien Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 07 Jan 2014 19:22:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 16394 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: submit@debbugs.gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.138912248931977 (code B ref -1); Tue, 07 Jan 2014 19:22:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 7 Jan 2014 19:21:29 +0000 Original-Received: from localhost ([127.0.0.1]:41463 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W0cDP-0008Jf-GR for submit@debbugs.gnu.org; Tue, 07 Jan 2014 14:21:28 -0500 Original-Received: from fencepost.gnu.org ([208.118.235.10]:38814) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W0cDN-0008JY-4W for submit@debbugs.gnu.org; Tue, 07 Jan 2014 14:21:25 -0500 Original-Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1W0cDM-0007vZ-Pa for submit@debbugs.gnu.org; Tue, 07 Jan 2014 14:21:24 -0500 In-Reply-To: <2643591.vy3k34KHB8@descartes> ("\"Rudiger" Sonderfeld"'s message of "Mon, 09 Dec 2013 14:28:49 +0100") Original-Lines: 59 X-From-Line: emacs-devel-bounces+rgm=gnu.org@gnu.org Wed Dec 11 18:17:38 2013 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37047) by fencepost.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1Vqt2A-0003HL-CB for rgm@gnu.org; Wed, 11 Dec 2013 18:17:38 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vqt29-0003jx-JP for rgm@gnu.org; Wed, 11 Dec 2013 18:17:38 -0500 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:51842) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vqt29-0003jt-HJ for rgm@gnu.org; Wed, 11 Dec 2013 18:17:37 -0500 Original-Received: from localhost ([::1]:60694 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vqt29-0008Sw-En for rgm@gnu.org; Wed, 11 Dec 2013 18:17:37 -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) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.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:83136 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8; format=flowed Package: emacs Tags: patch Severity: wishlist Version: 24.3 [ resent from http://lists.gnu.org/archive/html/emacs-devel/2013-12/msg00353.html ] > Looks good. But I don't think `turn-on-flyspell-prog' is needed > because `flyspell-prog-mode' already turns the mode on > unconditionally. (Although maybe the latter should be > reconsidered.) 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 --=-=-= -- Matthias --=-=-=--