emacs-diffs
[Top][All Lists]
Advanced

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

master a1d08d2c134 3/3: Merge from origin/emacs-30


From: Eli Zaretskii
Subject: master a1d08d2c134 3/3: Merge from origin/emacs-30
Date: Sat, 21 Dec 2024 07:59:21 -0500 (EST)

branch: master
commit a1d08d2c13497937475bf453c66a22a61f4e8631
Merge: b6d9183e7dd 5e97079cc75
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>

    Merge from origin/emacs-30
    
    5e97079cc75 ; Fix call to 'decode_string_utf_8' in  #ifdef'ed-away code
    6902673b5b9 ; Improve commentary in calendar.el
    08b62132dde Add 'lua-ts-mode' to 'interpreter-mode-alist'
    d8ffcf2fbac Document representation of dates in calendar.el
    faaa13ec762 Autoload 'shortdoc-help-fns-examples-function'
---
 lisp/calendar/calendar.el     | 13 +++++++++++++
 lisp/help-fns.el              |  2 ++
 lisp/progmodes/lua-ts-mode.el |  3 ++-
 src/coding.c                  |  2 +-
 4 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el
index 60d8fdd6aee..c8bba6e592e 100644
--- a/lisp/calendar/calendar.el
+++ b/lisp/calendar/calendar.el
@@ -90,6 +90,19 @@
 ;; <https://doi.org/10.1002/spe.4380230404>
 ;; 
<http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.42.6421&rep=rep1&type=pdf>
 
+;; A note on how dates are represented:
+
+;; The standard format for a (Gregorian) calendar date in this file is a
+;; list of integers (MONTH DAY YEAR) -- see the functions
+;; `calendar-extract-year', `calendar-extract-month', and
+;; `calendar-extract-day'.  Internally it also uses an "absolute" format
+;; which is an integer number of days since December 31, 1BC on the
+;; Gregorian calendar (see e.g. `calendar-absolute-from-gregorian'), and
+;; converts between different calendar scales by converting to and from
+;; the absolute format (see e.g. `calendar-iso-from-absolute' in
+;; cal-iso.el).  This representation is also useful for certain
+;; calculations; e.g. `calendar-day-of-week' is simply the absolute
+;; represention modulo 7, because December 31, 1BC is a Sunday.
 
 ;; A note on free variables:
 
diff --git a/lisp/help-fns.el b/lisp/help-fns.el
index 1fd86863a69..58e65bd9e98 100644
--- a/lisp/help-fns.el
+++ b/lisp/help-fns.el
@@ -1594,6 +1594,8 @@ it is displayed along with the global value."
                 (prin1-to-string (nth 1 var)))))
       (set (nth 0 var) (read str)))))
 
+(autoload 'shortdoc-help-fns-examples-function "shortdoc")
+
 (defun help-fns--run-describe-functions (functions &rest args)
   (with-current-buffer standard-output
     (unless (bolp)
diff --git a/lisp/progmodes/lua-ts-mode.el b/lisp/progmodes/lua-ts-mode.el
index 9d2969d6ac4..6fa3e51b34b 100644
--- a/lisp/progmodes/lua-ts-mode.el
+++ b/lisp/progmodes/lua-ts-mode.el
@@ -839,7 +839,8 @@ Calls REPORT-FN directly."
 (derived-mode-add-parents 'lua-ts-mode '(lua-mode))
 
 (when (treesit-ready-p 'lua)
-  (add-to-list 'auto-mode-alist '("\\.lua\\'" . lua-ts-mode)))
+  (add-to-list 'auto-mode-alist '("\\.lua\\'" . lua-ts-mode))
+  (add-to-list 'interpreter-mode-alist '("\\<lua\\(?:jit\\)?" . lua-ts-mode)))
 
 (provide 'lua-ts-mode)
 
diff --git a/src/coding.c b/src/coding.c
index cd5a12972e6..dd8c20adc3e 100644
--- a/src/coding.c
+++ b/src/coding.c
@@ -10407,7 +10407,7 @@ DEFUN ("internal-decode-string-utf-8", 
Finternal_decode_string_utf_8,
   if (NILP (decode_method))
     {
       for (int i = 0; i < repeat_count; i++)
-       val = decode_string_utf_8 (string, buffer, ! NILP (nocopy),
+       val = decode_string_utf_8 (string, NULL, -1, buffer, ! NILP (nocopy),
                                   handle_8_bit, handle_over_uni);
     }
   else if (EQ (decode_method, Qt))



reply via email to

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