unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Proposing Addition of a BIDI SubMenu to "Options"
@ 2011-08-03  3:37 Mohsen BANAN
  2011-08-03  9:24 ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: Mohsen BANAN @ 2011-08-03  3:37 UTC (permalink / raw)
  To: emacs-devel


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: ---



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-08-03 19:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-03  3:37 Proposing Addition of a BIDI SubMenu to "Options" Mohsen BANAN
2011-08-03  9:24 ` Eli Zaretskii
2011-08-03 18:23   ` Mohsen BANAN
2011-08-03 19:33     ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).