;;; ws-mode.el --- WordStar emulation mode for GNU Emacs
-;; Copyright (C) 1991, 2001, 2002, 2003, 2004, 2005,
-;; 2006, 2007 Free Software Foundation, Inc.
+;; Copyright (C) 1991, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
+;; 2009, 2010 Free Software Foundation, Inc.
;; Author: Juergen Nickelsen <nickel@cs.tu-berlin.de>
;; Version: 0.7
;; This file is part of GNU Emacs.
-;; GNU Emacs is free software; you can redistribute it and/or modify
+;; GNU Emacs is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
-;; any later version.
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
;; GNU Emacs is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING. If not, write to the
-;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-;; Boston, MA 02110-1301, USA.
+;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
;;; Commentary:
(if (or ws-block-begin-marker ws-block-end-marker)
(save-excursion
(if ws-block-begin-marker
- (let ()
+ (progn
(goto-char ws-block-begin-marker)
(message "Block begin marker")
(sit-for 2))
(message "Block begin marker not set")
(sit-for 2))
(if ws-block-end-marker
- (let ()
+ (progn
(goto-char ws-block-end-marker)
(message "Block end marker")
(sit-for 2))
"In WordStar mode: Move block to current cursor position."
(interactive)
(if (and ws-block-begin-marker ws-block-end-marker)
- (let ()
+ (progn
(kill-region ws-block-begin-marker ws-block-end-marker)
(yank)
(save-excursion
"In WordStar mode: Delete block."
(interactive)
(if (and ws-block-begin-marker ws-block-end-marker)
- (let ()
+ (progn
(kill-region ws-block-begin-marker ws-block-end-marker)
(setq ws-block-end-marker nil)
(setq ws-block-begin-marker nil))
"In WordStar mode: Go to marker 0."
(interactive)
(if ws-marker-0
- (let ()
+ (progn
(setq ws-last-cursorposition (point-marker))
(goto-char ws-marker-0))
(ws-error "Marker 0 not set")))
"In WordStar mode: Go to marker 1."
(interactive)
(if ws-marker-1
- (let ()
+ (progn
(setq ws-last-cursorposition (point-marker))
(goto-char ws-marker-1))
(ws-error "Marker 1 not set")))
"In WordStar mode: Go to marker 2."
(interactive)
(if ws-marker-2
- (let ()
+ (progn
(setq ws-last-cursorposition (point-marker))
(goto-char ws-marker-2))
(ws-error "Marker 2 not set")))
"In WordStar mode: Go to marker 3."
(interactive)
(if ws-marker-3
- (let ()
+ (progn
(setq ws-last-cursorposition (point-marker))
(goto-char ws-marker-3))
(ws-error "Marker 3 not set")))
"In WordStar mode: Go to marker 4."
(interactive)
(if ws-marker-4
- (let ()
+ (progn
(setq ws-last-cursorposition (point-marker))
(goto-char ws-marker-4))
(ws-error "Marker 4 not set")))
"In WordStar mode: Go to marker 5."
(interactive)
(if ws-marker-5
- (let ()
+ (progn
(setq ws-last-cursorposition (point-marker))
(goto-char ws-marker-5))
(ws-error "Marker 5 not set")))
"In WordStar mode: Go to marker 6."
(interactive)
(if ws-marker-6
- (let ()
+ (progn
(setq ws-last-cursorposition (point-marker))
(goto-char ws-marker-6))
(ws-error "Marker 6 not set")))
"In WordStar mode: Go to marker 7."
(interactive)
(if ws-marker-7
- (let ()
+ (progn
(setq ws-last-cursorposition (point-marker))
(goto-char ws-marker-7))
(ws-error "Marker 7 not set")))
"In WordStar mode: Go to marker 8."
(interactive)
(if ws-marker-8
- (let ()
+ (progn
(setq ws-last-cursorposition (point-marker))
(goto-char ws-marker-8))
(ws-error "Marker 8 not set")))
"In WordStar mode: Go to marker 9."
(interactive)
(if ws-marker-9
- (let ()
+ (progn
(setq ws-last-cursorposition (point-marker))
(goto-char ws-marker-9))
(ws-error "Marker 9 not set")))
"In WordStar mode: Go to block begin marker."
(interactive)
(if ws-block-begin-marker
- (let ()
+ (progn
(setq ws-last-cursorposition (point-marker))
(goto-char ws-block-begin-marker))
(ws-error "Block begin marker not set")))
"In WordStar mode: Go to block end marker."
(interactive)
(if ws-block-end-marker
- (let ()
+ (progn
(setq ws-last-cursorposition (point-marker))
(goto-char ws-block-end-marker))
(ws-error "Block end marker not set")))
"In WordStar mode: "
(interactive)
(if ws-last-cursorposition
- (let ()
+ (progn
(setq ws-last-cursorposition (point-marker))
(goto-char ws-last-cursorposition))
(ws-error "No last cursor position available.")))
"In WordStar mode: Copy block to current cursor position."
(interactive)
(if (and ws-block-begin-marker ws-block-end-marker)
- (let ()
+ (progn
(copy-region-as-kill ws-block-begin-marker ws-block-end-marker)
(yank)
(save-excursion
(provide 'ws-mode)
-;;; arch-tag: 6dd864bf-2ccb-4d59-af6e-492eba2890a3
+;; arch-tag: 6dd864bf-2ccb-4d59-af6e-492eba2890a3
;;; ws-mode.el ends here