[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Hello / First contribution / Major Mode menu entries

From: John Anthony
Subject: Hello / First contribution / Major Mode menu entries
Date: Wed, 2 Oct 2013 09:27:55 +0400
User-agent: Mutt/1.5.20 (2009-06-14)

Hey there, guys.

I'm interested in taking care of a bunch of the little TODO items in
etc/TODO. I've read etc/CONTRIBUTE and understand that there are
special considerations when contributing to emacs and other FSF
projects. I thought I'd start by handling the major mode menu items
mentioned on line 65 of etc/TODO. I thought I'd get some feedback
before I steam in and do a bunch:

diff --git a/lisp/textmodes/text-mode.el b/lisp/textmodes/text-mode.el
index d9ff04c..367a84a 100644
--- a/lisp/textmodes/text-mode.el
+++ b/lisp/textmodes/text-mode.el
@@ -192,4 +192,22 @@ The argument NLINES says how many lines to center."
       (setq nlines (1+ nlines))
       (forward-line -1)))))

+(easy-menu-define text-mode-menu text-mode-map
+  "Menu for Text mode."
+  '("Text Mode"
+    ["Center Line" center-line
+     :help "Center the current line"
+     :active t]
+    ["Center Lines" (lambda (n)
+              (interactive "nNumber of lines to indent: ")
+              (center-line n))
+     :help "Center several lines"
+     :active t]
+    ["Center Paragraph" center-paragraph
+     :help "Center the current paragraph"
+     :active t]
+    ["Center Region" center-region
+     :help "Center the selected region"
+     :active (region-active-p)]))
;;; text-mode.el ends here

When I post such patches to bug-gnu-emacs.org would I be better off
submitting a diff generated by bzr?

This is my first message to emacs-devel and I'm vaguely aware of the
fact that I may not be doing things correctly. I'd very much
appreciate any help/advice I could get.

Thanks in advance everyone!

reply via email to

[Prev in Thread] Current Thread [Next in Thread]