[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Proposing Addition of a BIDI SubMenu to "Options"
From: |
Mohsen BANAN |
Subject: |
Proposing Addition of a BIDI SubMenu to "Options" |
Date: |
Tue, 02 Aug 2011 20:37:57 -0700 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
Particularly in the beginning (after release of
emacs24), I think bidi users would want/need to
change reordering and paragraph directionality
often in various buffers.
I think it is a good idea to make that easy for
novice users who may not like (setq) very much.
The code below is what I have been using to create
a "BIDI" menu for Perso-Arabic BLEE users. (BLEE
is ByStar's Emacs User Environment)
I am proposing that something like this be added
to the Options Menu -- Perhaps right after Mule.
In addittion to English, I think it would be kool
for the menu items to also be in Hebrew, Arabic
and Persian. I have included starting point
Persian text below.
As a bidi user, I often use these. So, I really
think something like this would be useful.
If this is a worthwhile suggestion, how will we be
making it happen?
Thanks.
...Mohsen
--- bystar-bidi-menu.el begins: ---
;;;
;;;
(require 'easymenu)
;;;
;;; Global BIDI Menu
;;;
;; (blee:blee:menu)
;; (bystar:bidi-global:menu)
(defun bystar:bidi-global:menu ()
(easy-menu-define
bidi-menu
nil
"Global BIDI Menu"
'("Bi-Directional -- BIDI"
"---"
["يک طرفه -- reordering off" bidi-display-reordering-off t]
["دو طرفه -- reordering on" bidi-display-reordering-on t]
["کدام طرف؟ -- current reordering show" bidi-display-reordering-show t]
"---"
["چپ به راست -- paragraph left-to-right"
bidi-paragraph-direction-left-to-right t]
["راست به چپ -- paragraph right-to-left"
bidi-paragraph-direction-right-to-left t]
["خودبه خود -- paragraph auto-detect"
bidi-paragraph-direction-auto-detect t]
["کدام جهت؟ -- current paragraph direction"
bidi-paragraph-direction-current t]
))
)
;; (bidi-display-reordering-on)
(defun bidi-display-reordering-on ()
(interactive)
(setq bidi-display-reordering t)
(recenter)
)
;; (bidi-display-reordering-off)
(defun bidi-display-reordering-off ()
(interactive)
(setq bidi-display-reordering nil)
(recenter)
)
;; (bidi-display-reordering-show)
(defun bidi-display-reordering-show ()
(interactive)
(describe-variable 'bidi-display-reordering)
)
;; (bidi-paragraph-direction-right-to-left)
(defun bidi-paragraph-direction-right-to-left ()
(interactive)
(setq bidi-paragraph-direction 'right-to-left)
(recenter)
)
;; (bidi-paragraph-direction-left-to-right)
(defun bidi-paragraph-direction-left-to-right ()
(interactive)
(setq bidi-paragraph-direction 'left-to-right)
(recenter)
)
;; (bidi-paragraph-direction-auto-detect)
(defun bidi-paragraph-direction-auto-detect ()
(interactive)
(setq bidi-paragraph-direction nil)
(recenter)
)
;; (bidi-paragraph-direction-current)
(defun bidi-paragraph-direction-current ()
(interactive)
(describe-variable 'bidi-paragraph-direction)
;;(current-bidi-paragraph-direction)
)
(provide 'bystar-bidi-menu)
--- bystar-bidi-menu.el ends: ---
- Proposing Addition of a BIDI SubMenu to "Options",
Mohsen BANAN <=