* [PATCH] change wordstar-mode into a minor mode
@ 2017-02-12 17:32 Mark Oteiza
2017-02-12 18:27 ` Eli Zaretskii
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Mark Oteiza @ 2017-02-12 17:32 UTC (permalink / raw
To: emacs-devel; +Cc: Douglas Quagliana
I was poking through obsolete/ the other day and happened upon
ws-mode.el and subsequently the thread
https://lists.gnu.org/archive/html/emacs-devel/2015-05/msg00127.html
The following changes `wordstar-mode' into a minor mode, and also
adds a global minor mode `global-wordstar-mode', which will turn on
wordstar-mode in all buffers except the minibuffer.
diff --git a/lisp/obsolete/ws-mode.el b/lisp/obsolete/ws-mode.el
index 62cccf725a..f977bc089e 100644
--- a/lisp/obsolete/ws-mode.el
+++ b/lisp/obsolete/ws-mode.el
@@ -1,4 +1,4 @@
-;;; ws-mode.el --- WordStar emulation mode for GNU Emacs
+;;; ws-mode.el --- WordStar emulation mode for GNU Emacs -*- lexical-binding: t -*-
;; Copyright (C) 1991, 2001-2017 Free Software Foundation, Inc.
@@ -24,9 +24,20 @@
;;; Commentary:
-;; This emulates WordStar, with a major mode.
+;; This provides emulation of WordStar with a minor mode.
;;; Code:
+
+(defgroup wordstar nil
+ "WordStar emulation within Emacs."
+ :prefix "wordstar-"
+ :prefix "ws-"
+ :group 'emulations)
+
+(defcustom wordstar-mode-lighter " WordStar"
+ "Lighter shown in the modeline for `wordstar' mode."
+ :type 'string)
+
(defvar wordstar-C-k-map
(let ((map (make-keymap)))
(define-key map " " ())
@@ -98,8 +109,7 @@ wordstar-C-o-map
(define-key map "wh" 'split-window-right)
(define-key map "wo" 'other-window)
(define-key map "wv" 'split-window-below)
- map)
- "")
+ map))
(defvar wordstar-C-q-map
(let ((map (make-keymap)))
@@ -174,12 +184,9 @@ wordstar-mode-map
;; wordstar-C-j-map not yet implemented
(defvar wordstar-C-j-map nil)
-
-(put 'wordstar-mode 'mode-class 'special)
-
;;;###autoload
-(define-derived-mode wordstar-mode fundamental-mode "WordStar"
- "Major mode with WordStar-like key bindings.
+(define-minor-mode wordstar-mode
+ "Minor mode with WordStar-like key bindings.
BUGS:
- Help menus with WordStar commands (C-j just calls help-for-help)
@@ -189,8 +196,18 @@ wordstar-mode
- Search and replace (C-q a) is only available in forward direction
No key bindings beginning with ESC are installed, they will work
-Emacs-like.")
-
+Emacs-like."
+ :group 'wordstar
+ :lighter wordstar-mode-lighter
+ :keymap wordstar-mode-map)
+
+(defun turn-on-wordstar-mode ()
+ (when (and (not (minibufferp))
+ (not wordstar-mode))
+ (wordstar-mode 1)))
+
+(define-globalized-minor-mode global-wordstar-mode wordstar-mode
+ turn-on-wordstar-mode)
(defun wordstar-center-paragraph ()
"Center each line in the paragraph at or after point.
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH] change wordstar-mode into a minor mode
2017-02-12 17:32 [PATCH] change wordstar-mode into a minor mode Mark Oteiza
@ 2017-02-12 18:27 ` Eli Zaretskii
2017-02-12 20:38 ` Stefan Monnier
2017-02-12 18:29 ` Eli Zaretskii
2019-04-04 17:53 ` bug#35148: " Mark Oteiza
2 siblings, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2017-02-12 18:27 UTC (permalink / raw
To: Mark Oteiza; +Cc: dquagliana, emacs-devel
> Date: Sun, 12 Feb 2017 12:32:00 -0500
> From: Mark Oteiza <mvoteiza@udel.edu>
> Cc: Douglas Quagliana <dquagliana@gmail.com>
>
> I was poking through obsolete/ the other day and happened upon
> ws-mode.el and subsequently the thread
>
> https://lists.gnu.org/archive/html/emacs-devel/2015-05/msg00127.html
>
> The following changes `wordstar-mode' into a minor mode, and also
> adds a global minor mode `global-wordstar-mode', which will turn on
> wordstar-mode in all buffers except the minibuffer.
If we want to continue developing ws-mode.el, we should pull it from
lisp/obsolete/, IMO.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] change wordstar-mode into a minor mode
2017-02-12 17:32 [PATCH] change wordstar-mode into a minor mode Mark Oteiza
2017-02-12 18:27 ` Eli Zaretskii
@ 2017-02-12 18:29 ` Eli Zaretskii
2017-02-12 19:22 ` Mark Oteiza
2019-04-04 17:53 ` bug#35148: " Mark Oteiza
2 siblings, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2017-02-12 18:29 UTC (permalink / raw
To: Mark Oteiza; +Cc: dquagliana, emacs-devel
> Date: Sun, 12 Feb 2017 12:32:00 -0500
> From: Mark Oteiza <mvoteiza@udel.edu>
> Cc: Douglas Quagliana <dquagliana@gmail.com>
>
> +(defgroup wordstar nil
> + "WordStar emulation within Emacs."
> + :prefix "wordstar-"
> + :prefix "ws-"
> + :group 'emulations)
> +
> +(defcustom wordstar-mode-lighter " WordStar"
> + "Lighter shown in the modeline for `wordstar' mode."
> + :type 'string)
> +
When you introduce new groups and defcustoms, please always specify a
':version' tag.
Thanks.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] change wordstar-mode into a minor mode
2017-02-12 18:29 ` Eli Zaretskii
@ 2017-02-12 19:22 ` Mark Oteiza
0 siblings, 0 replies; 9+ messages in thread
From: Mark Oteiza @ 2017-02-12 19:22 UTC (permalink / raw
To: Eli Zaretskii; +Cc: dquagliana, emacs-devel
On 12/02/17 at 08:29pm, Eli Zaretskii wrote:
> > Date: Sun, 12 Feb 2017 12:32:00 -0500
> > From: Mark Oteiza <mvoteiza@udel.edu>
> > Cc: Douglas Quagliana <dquagliana@gmail.com>
> >
> > +(defgroup wordstar nil
> > + "WordStar emulation within Emacs."
> > + :prefix "wordstar-"
> > + :prefix "ws-"
> > + :group 'emulations)
> > +
> > +(defcustom wordstar-mode-lighter " WordStar"
> > + "Lighter shown in the modeline for `wordstar' mode."
> > + :type 'string)
> > +
>
> When you introduce new groups and defcustoms, please always specify a
> ':version' tag.
Right, thanks.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] change wordstar-mode into a minor mode
2017-02-12 18:27 ` Eli Zaretskii
@ 2017-02-12 20:38 ` Stefan Monnier
2017-02-13 5:33 ` Eli Zaretskii
0 siblings, 1 reply; 9+ messages in thread
From: Stefan Monnier @ 2017-02-12 20:38 UTC (permalink / raw
To: emacs-devel
> If we want to continue developing ws-mode.el, we should pull it from
> lisp/obsolete/, IMO.
And move it to elpa.git, like we've done for crisp.el.
Stefan
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] change wordstar-mode into a minor mode
2017-02-12 20:38 ` Stefan Monnier
@ 2017-02-13 5:33 ` Eli Zaretskii
0 siblings, 0 replies; 9+ messages in thread
From: Eli Zaretskii @ 2017-02-13 5:33 UTC (permalink / raw
To: Stefan Monnier; +Cc: emacs-devel
> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Date: Sun, 12 Feb 2017 15:38:06 -0500
>
> > If we want to continue developing ws-mode.el, we should pull it from
> > lisp/obsolete/, IMO.
>
> And move it to elpa.git, like we've done for crisp.el.
That's up to the individual(s) who'd volunteer to develop/maintain it.
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#35148: [PATCH] change wordstar-mode into a minor mode
2017-02-12 17:32 [PATCH] change wordstar-mode into a minor mode Mark Oteiza
2017-02-12 18:27 ` Eli Zaretskii
2017-02-12 18:29 ` Eli Zaretskii
@ 2019-04-04 17:53 ` Mark Oteiza
2019-04-21 16:33 ` Mark Oteiza
2 siblings, 1 reply; 9+ messages in thread
From: Mark Oteiza @ 2019-04-04 17:53 UTC (permalink / raw
To: 35148; +Cc: Douglas Quagliana
Hi,
I recently got some testing/confirmation that this does work as
expected, so pinging the list again to ask what I should do here.
I don't have strong feelings over whether this gets nudged out of
obsolete/ or gets moved over to ELPA.
The original thread is here:
https://lists.gnu.org/archive/html/emacs-devel/2017-02/msg00467.html
On 12/02/17 at 12:32pm, Mark Oteiza wrote:
> I was poking through obsolete/ the other day and happened upon
> ws-mode.el and subsequently the thread
>
> https://lists.gnu.org/archive/html/emacs-devel/2015-05/msg00127.html
>
> The following changes `wordstar-mode' into a minor mode, and also
> adds a global minor mode `global-wordstar-mode', which will turn on
> wordstar-mode in all buffers except the minibuffer.
>
> diff --git a/lisp/obsolete/ws-mode.el b/lisp/obsolete/ws-mode.el
> index 62cccf725a..f977bc089e 100644
> --- a/lisp/obsolete/ws-mode.el
> +++ b/lisp/obsolete/ws-mode.el
> @@ -1,4 +1,4 @@
> -;;; ws-mode.el --- WordStar emulation mode for GNU Emacs
> +;;; ws-mode.el --- WordStar emulation mode for GNU Emacs -*- lexical-binding: t -*-
>
> ;; Copyright (C) 1991, 2001-2017 Free Software Foundation, Inc.
>
> @@ -24,9 +24,20 @@
>
> ;;; Commentary:
>
> -;; This emulates WordStar, with a major mode.
> +;; This provides emulation of WordStar with a minor mode.
>
> ;;; Code:
> +
> +(defgroup wordstar nil
> + "WordStar emulation within Emacs."
> + :prefix "wordstar-"
> + :prefix "ws-"
> + :group 'emulations)
> +
> +(defcustom wordstar-mode-lighter " WordStar"
> + "Lighter shown in the modeline for `wordstar' mode."
> + :type 'string)
> +
> (defvar wordstar-C-k-map
> (let ((map (make-keymap)))
> (define-key map " " ())
> @@ -98,8 +109,7 @@ wordstar-C-o-map
> (define-key map "wh" 'split-window-right)
> (define-key map "wo" 'other-window)
> (define-key map "wv" 'split-window-below)
> - map)
> - "")
> + map))
>
> (defvar wordstar-C-q-map
> (let ((map (make-keymap)))
> @@ -174,12 +184,9 @@ wordstar-mode-map
> ;; wordstar-C-j-map not yet implemented
> (defvar wordstar-C-j-map nil)
>
> -
> -(put 'wordstar-mode 'mode-class 'special)
> -
> ;;;###autoload
> -(define-derived-mode wordstar-mode fundamental-mode "WordStar"
> - "Major mode with WordStar-like key bindings.
> +(define-minor-mode wordstar-mode
> + "Minor mode with WordStar-like key bindings.
>
> BUGS:
> - Help menus with WordStar commands (C-j just calls help-for-help)
> @@ -189,8 +196,18 @@ wordstar-mode
> - Search and replace (C-q a) is only available in forward direction
>
> No key bindings beginning with ESC are installed, they will work
> -Emacs-like.")
> -
> +Emacs-like."
> + :group 'wordstar
> + :lighter wordstar-mode-lighter
> + :keymap wordstar-mode-map)
> +
> +(defun turn-on-wordstar-mode ()
> + (when (and (not (minibufferp))
> + (not wordstar-mode))
> + (wordstar-mode 1)))
> +
> +(define-globalized-minor-mode global-wordstar-mode wordstar-mode
> + turn-on-wordstar-mode)
>
> (defun wordstar-center-paragraph ()
> "Center each line in the paragraph at or after point.
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#35148: [PATCH] change wordstar-mode into a minor mode
2019-04-04 17:53 ` bug#35148: " Mark Oteiza
@ 2019-04-21 16:33 ` Mark Oteiza
2019-06-23 17:45 ` Lars Ingebrigtsen
0 siblings, 1 reply; 9+ messages in thread
From: Mark Oteiza @ 2019-04-21 16:33 UTC (permalink / raw
To: 35148
Bumping for attention. I'll push this in a few days or so otherwise.
On 04/04/19 at 01:53pm, Mark Oteiza wrote:
> Hi,
>
> I recently got some testing/confirmation that this does work as
> expected, so pinging the list again to ask what I should do here.
> I don't have strong feelings over whether this gets nudged out of
> obsolete/ or gets moved over to ELPA.
>
> The original thread is here:
> https://lists.gnu.org/archive/html/emacs-devel/2017-02/msg00467.html
>
> On 12/02/17 at 12:32pm, Mark Oteiza wrote:
> > I was poking through obsolete/ the other day and happened upon
> > ws-mode.el and subsequently the thread
> >
> > https://lists.gnu.org/archive/html/emacs-devel/2015-05/msg00127.html
> >
> > The following changes `wordstar-mode' into a minor mode, and also
> > adds a global minor mode `global-wordstar-mode', which will turn on
> > wordstar-mode in all buffers except the minibuffer.
> >
> > diff --git a/lisp/obsolete/ws-mode.el b/lisp/obsolete/ws-mode.el
> > index 62cccf725a..f977bc089e 100644
> > --- a/lisp/obsolete/ws-mode.el
> > +++ b/lisp/obsolete/ws-mode.el
> > @@ -1,4 +1,4 @@
> > -;;; ws-mode.el --- WordStar emulation mode for GNU Emacs
> > +;;; ws-mode.el --- WordStar emulation mode for GNU Emacs -*- lexical-binding: t -*-
> >
> > ;; Copyright (C) 1991, 2001-2017 Free Software Foundation, Inc.
> >
> > @@ -24,9 +24,20 @@
> >
> > ;;; Commentary:
> >
> > -;; This emulates WordStar, with a major mode.
> > +;; This provides emulation of WordStar with a minor mode.
> >
> > ;;; Code:
> > +
> > +(defgroup wordstar nil
> > + "WordStar emulation within Emacs."
> > + :prefix "wordstar-"
> > + :prefix "ws-"
> > + :group 'emulations)
> > +
> > +(defcustom wordstar-mode-lighter " WordStar"
> > + "Lighter shown in the modeline for `wordstar' mode."
> > + :type 'string)
> > +
> > (defvar wordstar-C-k-map
> > (let ((map (make-keymap)))
> > (define-key map " " ())
> > @@ -98,8 +109,7 @@ wordstar-C-o-map
> > (define-key map "wh" 'split-window-right)
> > (define-key map "wo" 'other-window)
> > (define-key map "wv" 'split-window-below)
> > - map)
> > - "")
> > + map))
> >
> > (defvar wordstar-C-q-map
> > (let ((map (make-keymap)))
> > @@ -174,12 +184,9 @@ wordstar-mode-map
> > ;; wordstar-C-j-map not yet implemented
> > (defvar wordstar-C-j-map nil)
> >
> > -
> > -(put 'wordstar-mode 'mode-class 'special)
> > -
> > ;;;###autoload
> > -(define-derived-mode wordstar-mode fundamental-mode "WordStar"
> > - "Major mode with WordStar-like key bindings.
> > +(define-minor-mode wordstar-mode
> > + "Minor mode with WordStar-like key bindings.
> >
> > BUGS:
> > - Help menus with WordStar commands (C-j just calls help-for-help)
> > @@ -189,8 +196,18 @@ wordstar-mode
> > - Search and replace (C-q a) is only available in forward direction
> >
> > No key bindings beginning with ESC are installed, they will work
> > -Emacs-like.")
> > -
> > +Emacs-like."
> > + :group 'wordstar
> > + :lighter wordstar-mode-lighter
> > + :keymap wordstar-mode-map)
> > +
> > +(defun turn-on-wordstar-mode ()
> > + (when (and (not (minibufferp))
> > + (not wordstar-mode))
> > + (wordstar-mode 1)))
> > +
> > +(define-globalized-minor-mode global-wordstar-mode wordstar-mode
> > + turn-on-wordstar-mode)
> >
> > (defun wordstar-center-paragraph ()
> > "Center each line in the paragraph at or after point.
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#35148: [PATCH] change wordstar-mode into a minor mode
2019-04-21 16:33 ` Mark Oteiza
@ 2019-06-23 17:45 ` Lars Ingebrigtsen
0 siblings, 0 replies; 9+ messages in thread
From: Lars Ingebrigtsen @ 2019-06-23 17:45 UTC (permalink / raw
To: Mark Oteiza; +Cc: 35148
Mark Oteiza <mvoteiza@udel.edu> writes:
> Bumping for attention. I'll push this in a few days or so otherwise.
This was apparently done, so I'm now closing this bug report.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2019-06-23 17:45 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-12 17:32 [PATCH] change wordstar-mode into a minor mode Mark Oteiza
2017-02-12 18:27 ` Eli Zaretskii
2017-02-12 20:38 ` Stefan Monnier
2017-02-13 5:33 ` Eli Zaretskii
2017-02-12 18:29 ` Eli Zaretskii
2017-02-12 19:22 ` Mark Oteiza
2019-04-04 17:53 ` bug#35148: " Mark Oteiza
2019-04-21 16:33 ` Mark Oteiza
2019-06-23 17:45 ` Lars Ingebrigtsen
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.