X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/018bdf7528d0d4bb0560d86b84c21ae9fed1206a..692caf1e8d1657fbe4809294df6791c2879a7bb1:/lisp/net/eww.el diff --git a/lisp/net/eww.el b/lisp/net/eww.el index 3c3736ac37..d37b1b3261 100644 --- a/lisp/net/eww.el +++ b/lisp/net/eww.el @@ -617,6 +617,15 @@ Currently this means either text/html or application/xhtml+xml." (html-mode)))) (view-buffer buf))) +(defun eww-toggle-paragraph-direction () + "Toggle the paragraphs direction between left-to-right and right-to-left." + (interactive) + (setq bidi-paragraph-direction + (if (eq bidi-paragraph-direction 'left-to-right) + 'right-to-left + 'left-to-right)) + (message "The paragraph direction is now %s" bidi-paragraph-direction)) + (defun eww-readable () "View the main \"readable\" parts of the current web page. This command uses heuristics to find the parts of the web page that @@ -701,6 +710,7 @@ the like." (define-key map "s" 'eww-switch-to-buffer) (define-key map "S" 'eww-list-buffers) (define-key map "F" 'eww-toggle-fonts) + (define-key map "D" 'eww-toggle-paragraph-direction) (define-key map [(meta C)] 'eww-toggle-colors) (define-key map "b" 'eww-add-bookmark) @@ -729,7 +739,8 @@ the like." ["List cookies" url-cookie-list t] ["Toggle fonts" eww-toggle-fonts t] ["Toggle colors" eww-toggle-colors t] - ["Character Encoding" eww-set-character-encoding])) + ["Character Encoding" eww-set-character-encoding] + ["Toggle Paragraph Direction" eww-toggle-paragraph-direction])) map)) (defvar eww-tool-bar-map