emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs-25 cb1e3da: Also allow setting the paragraph directi


From: Lars Ingebrigtsen
Subject: [Emacs-diffs] emacs-25 cb1e3da: Also allow setting the paragraph direction to nil
Date: Tue, 01 Mar 2016 00:32:00 +0000

branch: emacs-25
commit cb1e3da12eb1fcacbf9933ca49a85b6f4116878c
Author: Lars Ingebrigtsen <address@hidden>
Commit: Lars Ingebrigtsen <address@hidden>

    Also allow setting the paragraph direction to nil
    
    * lisp/net/eww.el (eww-toggle-paragraph-direction): Also allow
    setting the paragraph direction to nil ("auto").
---
 lisp/net/eww.el |   16 +++++++++++-----
 1 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/lisp/net/eww.el b/lisp/net/eww.el
index 886b4b9..620a8a5 100644
--- a/lisp/net/eww.el
+++ b/lisp/net/eww.el
@@ -608,13 +608,19 @@ Currently this means either text/html or 
application/xhtml+xml."
     (view-buffer buf)))
 
 (defun eww-toggle-paragraph-direction ()
-  "Toggle the paragraphs direction between left-to-right and right-to-left."
+  "Cycle the paragraph direction between left-to-right, right-to-left and 
auto."
   (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))
+        (cond ((eq bidi-paragraph-direction 'left-to-right)
+               nil)
+              ((eq bidi-paragraph-direction 'right-to-left)
+               'left-to-right)
+              (t
+               'right-to-left)))
+  (message "The paragraph direction is now %s"
+           (if (null bidi-paragraph-direction)
+               "automatic"
+             bidi-paragraph-direction)))
 
 (defun eww-readable ()
   "View the main \"readable\" parts of the current web page.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]