Function: strokes-mode

strokes-mode is an autoloaded, interactive and byte-compiled function defined in strokes.el.gz.

Signature

(strokes-mode &optional ARG)

Documentation

Toggle Strokes mode, a global minor mode.

Strokes are pictographic mouse gestures which invoke commands. Strokes are invoked with S-<down-mouse-2> (strokes-do-stroke). You can define new strokes with M-x strokes-global-set-stroke (strokes-global-set-stroke). See also M-<down-mouse-2> (strokes-do-complex-stroke) for complex strokes.

To use strokes for pictographic editing, such as Chinese/Japanese, use M-x strokes-compose-complex-stroke (strokes-compose-complex-stroke), which draws strokes and inserts them. Encode/decode your strokes with M-x strokes-encode-buffer (strokes-encode-buffer), M-x strokes-decode-buffer (strokes-decode-buffer).

M-<down-mouse-2> strokes-do-complex-stroke
S-<down-mouse-2> strokes-do-stroke

This is a global minor mode. If called interactively, toggle the Strokes mode mode. If the prefix argument is positive, enable the mode, and if it is zero or negative, disable the mode.

If called from Lisp, toggle the mode if ARG is toggle. Enable the mode if ARG is nil, omitted, or is a positive number. Disable the mode if ARG is a negative number.

To check whether the minor mode is enabled in the current buffer, evaluate (default-value \=strokes-mode)'.

The mode's hook is called both when the mode is enabled and when it is disabled.

Probably introduced at or before Emacs version 31.1.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/strokes.el.gz
;;;###autoload
(define-minor-mode strokes-mode
  "Toggle Strokes mode, a global minor mode.

\\<strokes-mode-map>
Strokes are pictographic mouse gestures which invoke commands.
Strokes are invoked with \\[strokes-do-stroke].  You can define
new strokes with \\[strokes-global-set-stroke].  See also
\\[strokes-do-complex-stroke] for `complex' strokes.

To use strokes for pictographic editing, such as Chinese/Japanese, use
\\[strokes-compose-complex-stroke], which draws strokes and inserts them.
Encode/decode your strokes with \\[strokes-encode-buffer],
\\[strokes-decode-buffer].

\\{strokes-mode-map}"
  :lighter strokes-lighter :global t
  (cond (strokes-mode			; turn on strokes
	 (and (file-exists-p strokes-file)
	      (null strokes-global-map)
	      (strokes-load-user-strokes))
	 (add-hook 'kill-emacs-query-functions
		   #'strokes-prompt-user-save-strokes)
         ;; FIXME: Should this be something like `focus-in-hook'?
         ;; That variable is obsolete, but `select-frame-hook' has
         ;; never existed in Emacs.
         ;;(add-hook 'select-frame-hook
         ;;          #'strokes-update-window-configuration)
	 (strokes-update-window-configuration))
	(t				; turn off strokes
	 (if (get-buffer strokes-buffer-name)
             (kill-buffer (get-buffer strokes-buffer-name)))
         ;; FIXME: Same as above.
         ;;(remove-hook 'select-frame-hook
         ;;             #'strokes-update-window-configuration)
         )))