From 87ab808f0c0b2653a4a314d216c2afb44cfb2fc9 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 20 Jul 2012 13:29:32 +0300 Subject: [PATCH] Fix display of Hebrew tutorial title on splash screen. lisp/startup.el (fancy-startup-text): Read the whole tutorial, not just its first 256 bytes. Prevents gibberish in display of the tutorial title. etc/tutorials/TUTORIAL.he: Make the first sentence display correctly in a left-to-right paragraph, such as what is shown on the fancy splash screen, by using directional control characters. --- etc/ChangeLog | 6 ++++++ etc/tutorials/TUTORIAL.he | 2 +- lisp/ChangeLog | 6 ++++++ lisp/startup.el | 10 +++++++++- 4 files changed, 22 insertions(+), 2 deletions(-) diff --git a/etc/ChangeLog b/etc/ChangeLog index 5c5f85a1a25..15cc0065da7 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog @@ -1,3 +1,9 @@ +2012-07-20 Eli Zaretskii + + * tutorials/TUTORIAL.he: Make the first sentence display correctly + in a left-to-right paragraph, such as what is shown on the fancy + splash screen. + 2012-07-15 Leo Liu * NEWS: Mention exclamation-mark and flymake. diff --git a/etc/tutorials/TUTORIAL.he b/etc/tutorials/TUTORIAL.he index cb82f87f765..e0c85a379a9 100644 --- a/etc/tutorials/TUTORIAL.he +++ b/etc/tutorials/TUTORIAL.he @@ -1,4 +1,4 @@ -שיעור ראשון בשימוש ב־Emacs. זכויות שימוש ראה בסוף המסמך. +שיעור ראשון בשימוש ב־‫Emacs‬. זכויות שימוש ראה בסוף המסמך. פקודות רבות של Emacs משתמשות במקש CONTROL (לפעמים הוא מסומן ב־CTRL או CTL) או במקש META (לפעמים מסומן EDIT או ALT). במקום לציין את כל השמות האפשריים diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f2b89c086dd..8edae88c1da 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2012-07-20 Eli Zaretskii + + * startup.el (fancy-startup-text): Read the whole tutorial, not + just its first 256 bytes. Prevents gibberish in display of the + tutorial title. + 2012-07-20 Dmitry Antipov Drop idle buffer compaction due to an absence of the diff --git a/lisp/startup.el b/lisp/startup.el index 3adc2caa04a..e861a333a76 100644 --- a/lisp/startup.el +++ b/lisp/startup.el @@ -1311,7 +1311,15 @@ If this is nil, no message will be displayed." (title (with-temp-buffer (insert-file-contents (expand-file-name tut tutorial-directory) - nil 0 256) + ;; We used to read only the first 256 bytes of + ;; the tutorial, but that prevents the coding: + ;; setting, if any, in file-local variables + ;; section to be seen by insert-file-contents, + ;; and results in gibberish when the language + ;; environment's preferred encoding is + ;; different from what the file-local variable + ;; says. One case in point is Hebrew. + nil) (search-forward ".") (buffer-substring (point-min) (1- (point)))))) ;; If there is a specific tutorial for the current language -- 2.39.2