unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#16394: [PATCH] Custom option to turn Flyspell mode on in prog modes
       [not found] ` <2643591.vy3k34KHB8@descartes>
@ 2013-12-11 23:17   ` Matthias Meulien
  2014-08-08 14:10     ` Rüdiger Sonderfeld
  0 siblings, 1 reply; 2+ messages in thread
From: Matthias Meulien @ 2013-12-11 23:17 UTC (permalink / raw)
  To: 16394

[-- Attachment #1: Type: text/plain, Size: 395 bytes --]

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.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-lisp-progmodes-prog-mode.el-Add-custom-options-to-mo.patch --]
[-- Type: text/x-diff, Size: 912 bytes --]

>From 29893db295fa1d01f9eec0f3f029b33d9a523a49 Mon Sep 17 00:00:00 2001
From: Matthias Meulien <orontee@gmail.com>
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


[-- Attachment #3: Type: text/plain, Size: 14 bytes --]


-- 
Matthias

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* bug#16394: [PATCH] Custom option to turn Flyspell mode on in prog modes
  2013-12-11 23:17   ` bug#16394: [PATCH] Custom option to turn Flyspell mode on in prog modes Matthias Meulien
@ 2014-08-08 14:10     ` Rüdiger Sonderfeld
  0 siblings, 0 replies; 2+ messages in thread
From: Rüdiger Sonderfeld @ 2014-08-08 14:10 UTC (permalink / raw)
  To: 16394; +Cc: Matthias Meulien, 16394-done

close 16394 r117667

Applied in r117667 (ChangeLog fix in r117668).

On Thursday 12 December 2013 00:17:25 Matthias Meulien wrote:
> 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.






^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-08-08 14:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <87ppp6vpjv.fsf@gmail.com>
     [not found] ` <2643591.vy3k34KHB8@descartes>
2013-12-11 23:17   ` bug#16394: [PATCH] Custom option to turn Flyspell mode on in prog modes Matthias Meulien
2014-08-08 14:10     ` Rüdiger Sonderfeld

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).