2018年11月27日に初出の投稿

Last modified: 2018-11-27

;;; -*- Mode: Lisp; Package: EDITOR -*-

;;;

;;; This file is part of xyzzy.

;;;

(provide "app-menu")

(in-package "editor")

(export '(*app-menu* *app-popup-menu* *menu-history-max

* *app-rectangle-popup-menu* *clipboard-char-encoding-popup-menu

* *dictionary-popup-menu* *paste-rectangle-popup-menu

* *command-bar-popup-menu

* make-char-encoding-popup-menu

add-file-history-to-menu *menu-display-length

* *init-app-menus-hook*))

(defvar *app-menu* nil)

(defvar *app-popup-menu* nil)

(defvar *app-rectangle-popup-menu* nil)

(defvar *clipboard-char-encoding-popup-menu* nil)

(defvar *dictionary-popup-menu* nil)

(defvar *paste-rectangle-popup-menu* nil)

(defvar *command-bar-popup-menu* nil)

(defvar *recent-file-popup-menu* nil)

(defvar *recent-session-popup-menu* nil)

(defvar *menu-history-max* 9)

(defvar *init-app-menus-hook* nil)

(defun init-app-menus ()

(setq *clipboard-char-encoding-popup-menu

* (make-char-encoding-popup-menu

#'(lambda (encoding)

(interactive)

(continue-pre-selection)

(setq *clipboard-char-encoding* encoding))

#'(lambda (encoding)

(and (eq *clipboard-char-encoding* encoding) :check))

*clipboard-char-encoding-list*))

(setq *dictionary-popup-menu

* (define-popup-menu

(:item nil "J-E (&J)"

'lookup-j2e-dictionary-selection)

(:item nil "Reading (&R)"

'lookup-reading-dictionary-selection)

(:item nil "E-J (&E)"

'lookup-e2j-dictionary-selection)

(:item nil "Idiom (&I)"

'lookup-idiom-dictionary-selection)

:sep

(:item nil "Dictionary mode (&D)"

'edict-mode

#'(lambda () (if edict-mode :check)))))

(setq *paste-rectangle-popup-menu

* (define-popup-menu

(:item nil "Insert (&I)"

'yank-rectangle

#'(lambda () (unless *rectangle-kill-buffer* :disable)))

(:item nil "Overwrite (&O)"

'overwrite-rectangle

#'(lambda () (unless *rectangle-kill-buffer* :disable)))

(:item nil "Append (&A)"

'append-rectangle

#'(lambda () (unless *rectangle-kill-buffer* :disable)))

(:item nil "Insert as text (&R)"

'yank-rectangle-as-region

#'(lambda () (unless *rectangle-kill-buffer* :disable)))))

(setq *app-popup-menu

* (define-popup-menu

(:item nil "Cut (&T)"

'kill-selection-to-clipboard :modify-any-selection)

(:item nil "Copy (&C)"

'copy-selection-to-clipboard :any-selection)

(:item nil "Paste (&P)"

'paste-from-clipboard :clipboard)

(:item nil "Rectangle paste (&G)"

'paste-rectangle-from-clipboard :clipboard)

(:menu nil "Clipboard encoding (&E)"

*clipboard-char-encoding-popup-menu*)

(:item nil "Delete (&D)"

'delete-selection :modify-any-selection)**

懐かしいものを見つけたので、再掲載しておこう。xyzzy のメニューを英語版にしたときのリソース・ファイルだ。再コンパイルして、所定の場所に格納すれば英語版になる。

  1. もっと新しいノート <<
  2. >> もっと古いノート

冒頭に戻る


※ 以下の SNS 共有ボタンは JavaScript を使っておらず、ボタンを押すまでは SNS サイトと全く通信しません。

Twitter Facebook