From: j.anthony@hushmail.com
To: emacs-devel@gnu.org
Subject: Hello / First contribution / Major Mode menu entries
Date: Tue, 01 Oct 2013 21:48:02 +0100 [thread overview]
Message-ID: <20131001204802.D9EB720360@smtp.hushmail.com> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 667 bytes --]
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, so I've attached a diff file of my
first attempt.
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 and sorry for any silly mistakes!
[-- Attachment #1.2: Type: text/html, Size: 810 bytes --]
[-- Attachment #2: ja-patch-00001.patch --]
[-- Type: application/octet-stream, Size: 916 bytes --]
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
next reply other threads:[~2013-10-01 20:48 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-01 20:48 j.anthony [this message]
-- strict thread matches above, loose matches on Subject: below --
2013-10-02 5:27 Hello / First contribution / Major Mode menu entries John Anthony
2013-10-02 14:16 ` Xue Fuqiao
2013-10-03 0:04 ` John Anthony
2013-10-03 1:03 ` Stephen J. Turnbull
2013-10-03 3:38 ` Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20131001204802.D9EB720360@smtp.hushmail.com \
--to=j.anthony@hushmail.com \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.