commit 663fad561d9a18d9b1291f63fe9e9ac1062cf9aa (HEAD, refs/remotes/origin/master) Author: Eli Zaretskii Date: Thu Oct 20 09:58:18 2022 +0300 ; Fix documentation and name of 'slovak-qwerty' input method * etc/NEWS: Fix entry for slovak-qwerty. * lisp/leim/quail/slovak.el ("slovak", "slovak-qwerty"): Doc fix. diff --git a/etc/NEWS b/etc/NEWS index 35d2fefeaf..be90d1beef 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1363,9 +1363,9 @@ This supports the keyboard layout specifically designed for the Tamil language. --- -*** New 'slovak-qwerty' input method -This completes the set of the standard Slovak keyboards, now -containing both the QWERTZ and the QWERTY variants. +*** New input method 'slovak-qwerty'. +This is a variant of the 'slovak' input method, which corresponds to +the QWERTY Slovak keyboards. * Changes in Specialized Modes and Packages in Emacs 29.1 diff --git a/lisp/leim/quail/slovak.el b/lisp/leim/quail/slovak.el index a855ecbf91..8ddd92d5b4 100644 --- a/lisp/leim/quail/slovak.el +++ b/lisp/leim/quail/slovak.el @@ -37,7 +37,7 @@ (quail-define-package "slovak" "Slovak" "SK" t - "Standard Slovak keyboard." + "Standard Slovak QWERTZ keyboard." nil t nil nil t nil nil nil nil nil t) (quail-define-rules @@ -157,8 +157,8 @@ (quail-define-package - "slovak-querty" "Slovak" "SK" t - "Standard Slovak keyboard, QWERTY variant." + "slovak-qwerty" "Slovak" "SK" t + "Standard Slovak QWERTY keyboard." nil t nil nil t nil nil nil nil nil t) (quail-define-rules commit fa7c5c8707cae227e5b9cb7701ec713a66349083 Author: Rudolf Adamkovič Date: Wed Oct 19 20:57:03 2022 +0200 Add 'slovak-querty' input method (bug#58642) * lisp/leim/quail/slovak.el ("slovak-querty"): New input method. * etc/NEWS: Mention the new 'slovak-querty' input method. diff --git a/etc/NEWS b/etc/NEWS index a378b5acbb..35d2fefeaf 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1362,6 +1362,11 @@ change the input method's translation rules, customize the user option This supports the keyboard layout specifically designed for the Tamil language. +--- +*** New 'slovak-qwerty' input method +This completes the set of the standard Slovak keyboards, now +containing both the QWERTZ and the QWERTY variants. + * Changes in Specialized Modes and Packages in Emacs 29.1 diff --git a/lisp/leim/quail/slovak.el b/lisp/leim/quail/slovak.el index acde11d02a..a855ecbf91 100644 --- a/lisp/leim/quail/slovak.el +++ b/lisp/leim/quail/slovak.el @@ -3,7 +3,8 @@ ;; Copyright (C) 1998, 2001-2022 Free Software Foundation, Inc. ;; Authors: Tibor Šimko -;; Milan Zamazal +;; Milan Zamazal +;; Rudolf Adamkovič ;; Maintainer: Pavel Janík ;; Keywords: i18n, multilingual, input method, Slovak @@ -25,8 +26,9 @@ ;;; Commentary: ;; This file defines the following Slovak keyboards: -;; - standard Slovak keyboard +;; - standard Slovak keyboards, QWERTZ and QWERTY variants ;; - three Slovak keyboards for programmers +;; LocalWords: QWERTZ ;;; Code: @@ -154,6 +156,123 @@ ("+0" ?\))) +(quail-define-package + "slovak-querty" "Slovak" "SK" t + "Standard Slovak keyboard, QWERTY variant." + nil t nil nil t nil nil nil nil nil t) + +(quail-define-rules + ("1" ?+) + ("2" ?ľ) + ("3" ?š) + ("4" ?č) + ("5" ?ť) + ("6" ?ž) + ("7" ?ý) + ("8" ?á) + ("9" ?í) + ("0" ?é) + ("!" ?1) + ("@" ?2) + ("#" ?3) + ("$" ?4) + ("%" ?5) + ("^" ?6) + ("&" ?7) + ("*" ?8) + ("(" ?9) + (")" ?0) + ("-" ?=) + ("_" ?%) + ("=" ?') + ("[" ?ú) + ("{" ?/) + ("]" ?ä) + ("}" ?\() + ("\\" ?ň) + ("|" ?\)) + (";" ?ô) + (":" ?\") + ("'" ?§) + ("\"" ?!) + ("<" ??) + (">" ?:) + ("/" ?-) + ("?" ?_) + ("`" ?\;) + ("~" ?^) + ("=a" ?á) + ("+a" ?ä) + ("+=a" ?ä) + ("+c" ?č) + ("+d" ?ď) + ("=e" ?é) + ("+e" ?ě) + ("=i" ?í) + ("=l" ?ĺ) + ("+l" ?ľ) + ("+n" ?ň) + ("=o" ?ó) + ("+o" ?ô) + ("~o" ?ô) + ("+=o" ?ö) + ("=r" ?ŕ) + ("+r" ?ř) + ("=s" ?ß) + ("+s" ?š) + ("+t" ?ť) + ("=u" ?ú) + ("+u" ?ů) + ("+=u" ?ü) + ("=y" ?ý) + ("+z" ?ž) + ("=A" ?Á) + ("+A" ?Ä) + ("+=A" ?Ä) + ("+C" ?Č) + ("+D" ?Ď) + ("=E" ?É) + ("+E" ?Ě) + ("=I" ?Í) + ("=L" ?Ĺ) + ("+L" ?Ľ) + ("+N" ?Ň) + ("=O" ?Ó) + ("+O" ?Ô) + ("~O" ?Ô) + ("+=O" ?Ö) + ("=R" ?Ŕ) + ("+R" ?Ř) + ("=S" ?ß) + ("+S" ?Š) + ("+T" ?Ť) + ("=U" ?Ú) + ("+U" ?Ů) + ("+=U" ?Ü) + ("=Y" ?Ý) + ("+Z" ?Ž) + ("=q" ?`) + ("=2" ?@) + ("=3" ?#) + ("=4" ?$) + ("=5" ?%) + ("=6" ?^) + ("=7" ?&) + ("=8" ?*) + ("=9" ?\() + ("=0" ?\)) + ("+1" ?!) + ("+2" ?@) + ("+3" ?#) + ("+4" ?$) + ("+5" ?%) + ("+6" ?^) + ("+7" ?&) + ("+8" ?*) + ("+9" ?\() + ("+0" ?\))) + + (quail-define-package "slovak-prog-1" "Slovak" "SK" t "Slovak (non-standard) keyboard for programmers #1. commit d8eae291e5a5e6d1285d6606acc1d86fe275b149 Merge: 56c63ca21b 4b2c83eeaf Author: Stefan Kangas Date: Thu Oct 20 06:31:29 2022 +0200 Merge from origin/emacs-28 4b2c83eeaf ; * doc/lispref/modes.texi (Defining Minor Modes): Explain... commit 56c63ca21b3e5e2d0bb05d3897ea287a754c5b29 Author: Andrea Corallo Date: Wed Oct 19 22:08:41 2022 +0200 * Fix async native compilation (bug#58637) * lisp/emacs-lisp/comp.el (comp--native-compile): Fix gate condition. (comp-run-async-workers): Add assetion. diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el index 2c9b79334b..5a05fe4854 100644 --- a/lisp/emacs-lisp/comp.el +++ b/lisp/emacs-lisp/comp.el @@ -3928,6 +3928,7 @@ processes from `comp-async-compilations'" "Start compiling files from `comp-files-queue' asynchronously. When compilation is finished, run `native-comp-async-all-done-hook' and display a message." + (cl-assert (null comp-no-spawn)) (if (or comp-files-queue (> (comp-async-runnings) 0)) (unless (>= (comp-async-runnings) (comp-effective-async-max-jobs)) @@ -4048,7 +4049,7 @@ the deferred compilation mechanism." (stringp function-or-file)) (signal 'native-compiler-error (list "Not a function symbol or file" function-or-file))) - (unless comp-no-spawn + (when (or (null comp-no-spawn) comp-async-compilation) (catch 'no-native-compile (let* ((print-symbols-bare t) (data function-or-file) commit a57a3746d8404abef82b6d0de670b2358ef01a24 Author: Stefan Kangas Date: Wed Oct 19 20:53:36 2022 +0200 ; * test/lisp/image/wallpaper-tests.el: Simplify last change. diff --git a/test/lisp/image/wallpaper-tests.el b/test/lisp/image/wallpaper-tests.el index ab980a11bb..a5d3343bd4 100644 --- a/test/lisp/image/wallpaper-tests.el +++ b/test/lisp/image/wallpaper-tests.el @@ -100,15 +100,11 @@ :init-action (lambda () (setq called t))))) (wallpaper-command (wallpaper--find-command)) (wallpaper-command-args (wallpaper--find-command-args)) - (start (time-convert nil 'integer)) - (timeout 3) process) + process) (should (functionp (wallpaper-setter-init-action wallpaper--current-setter))) (setq process (wallpaper-set fil-jpg)) ;; Wait for "touch" process to exit so temp file is removed. - (while (and (< (- (time-convert nil 'integer) start) - timeout) - (process-live-p process)) - (sit-for 0.01)) + (accept-process-output process 3) (should called))))) (ert-deftest wallpaper-set/calls-wallpaper-set-function () commit fb8276a17c26b4c2bf8281210ede114ff9e24958 Author: Alan Mackenzie Date: Wed Oct 19 14:52:14 2022 +0000 CC Mode: Cease adding types to found-types too eagerly This fixes bug #58537 and bug #58539. * lisp/progmodes/cc-engine.el (c-forward-type): Remove trailing whitespace from an identifier before passing it to c-add-type. (c-forward-decl-or-cast-1): CASE 3: Do not recognize two consecutive identifiers as type + variable/function unless certain conditions are met. CASE 10: Do not recognize the "type" as a found type unless certain condtions are met. (Near end): Do not recognize the identifier in a cast as a type unless certain conditions are met. * lisp/progmodes/cc-fonts.el (c-get-fontification-context): Recognize being in declaration parens when there is a syntactially wrong "foo ((bar))" preceding the match position. * lisp/progmodes/cc-mode.el (c-update-new-id): Set c-new-id-is-type unconditionally to nil to prevent a second identifier being wrongly marked as a type. diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el index 596cccdf48..e71560fa25 100644 --- a/lisp/progmodes/cc-engine.el +++ b/lisp/progmodes/cc-engine.el @@ -9106,7 +9106,9 @@ multi-line strings (but not C++, for example)." (when (save-excursion (goto-char post-prefix-pos) (looking-at c-self-contained-typename-key)) - (c-add-type pos (point))) + (c-add-type pos (save-excursion + (c-backward-syntactic-ws) + (point)))) (when (and c-record-type-identifiers c-last-identifier-range) (c-record-type-id c-last-identifier-range))) @@ -9191,7 +9193,10 @@ multi-line strings (but not C++, for example)." (goto-char id-end) (if (or res c-promote-possible-types) (progn - (c-add-type id-start id-end) + (c-add-type id-start (save-excursion + (goto-char id-end) + (c-backward-syntactic-ws) + (point))) (when (and c-record-type-identifiers id-range) (c-record-type-id id-range)) (unless res @@ -10762,8 +10767,16 @@ This function might do hidden buffer changes." (setq backup-if-not-cast t) (throw 'at-decl-or-cast t))) - (setq backup-if-not-cast t) - (throw 'at-decl-or-cast t))) + ;; If we're in declaration or template delimiters, or one + ;; of a certain set of characters follows, we've got a + ;; type and variable. + (if (or (memq context '(decl <>)) + (memq (char-after) '(?\; ?, ?= ?\( ?{ ?:))) + (progn + (setq backup-if-not-cast t) + (throw 'at-decl-or-cast t)) + ;; We're probably just typing a statement. + (throw 'at-decl-or-cast nil)))) ;; CASE 4 (when (and got-suffix @@ -10879,8 +10892,13 @@ This function might do hidden buffer changes." ;; CASE 10 (when at-decl-or-cast - ;; By now we've located the type in the declaration that we know - ;; we're in. + ;; By now we've located the type in the declaration that we think + ;; we're in. Do we have enough evidence to promote the putative + ;; type to a found type? The user may be halfway through typing + ;; a statement beginning with an identifier. + (when (and (eq at-type 'maybe) + (not (eq context 'top))) + (setq c-record-type-identifiers nil)) (throw 'at-decl-or-cast t)) ;; CASE 11 @@ -11123,7 +11141,10 @@ This function might do hidden buffer changes." (not (c-on-identifier))))))))) ;; Handle the cast. - (when (and c-record-type-identifiers at-type (not (eq at-type t))) + (when (and c-record-type-identifiers + at-type + (not (memq at-type '(t maybe)))) ; 'maybe isn't strong enough + ; evidence to promote the type. (let ((c-promote-possible-types t)) (goto-char type-start) (c-forward-type))) diff --git a/lisp/progmodes/cc-fonts.el b/lisp/progmodes/cc-fonts.el index b4ff32b907..aa16da7070 100644 --- a/lisp/progmodes/cc-fonts.el +++ b/lisp/progmodes/cc-fonts.el @@ -1197,8 +1197,21 @@ casts and declarations are fontified. Used on level 2 and higher." ;; arguments lists (i.e. lists enclosed by <...>) is more strict about what ;; characters it allows within the list. (let ((type (and (> match-pos (point-min)) - (c-get-char-property (1- match-pos) 'c-type)))) - (cond ((not (memq (char-before match-pos) '(?\( ?, ?\[ ?< ?{))) + (c-get-char-property (1- match-pos) 'c-type))) + id-pos) + (cond + ;; Are we just after something like "(foo((bar))" ? + ((and (eq (char-before match-pos) ?\)) + (c-go-list-backward match-pos) + (progn + (c-backward-syntactic-ws) + (and (setq id-pos (c-on-identifier)) + (goto-char id-pos) + (progn + (c-backward-syntactic-ws) + (eq (char-before) ?\())))) + (c-get-fontification-context (point) not-front-decl toplev)) + ((not (memq (char-before match-pos) '(?\( ?, ?\[ ?< ?{))) (cons (and toplev 'top) nil)) ;; A control flow expression or a decltype ((and (eq (char-before match-pos) ?\() diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el index dce300f33c..2aa6b90dea 100644 --- a/lisp/progmodes/cc-mode.el +++ b/lisp/progmodes/cc-mode.el @@ -2080,13 +2080,14 @@ with // and /*, not more generic line and block comments." (defun c-update-new-id (end) ;; Note the bounds of any identifier that END is in or just after, in ;; `c-new-id-start' and `c-new-id-end'. Otherwise set these variables to - ;; nil. + ;; nil. Set `c-new-id-is-type' unconditionally to nil. (save-excursion (goto-char end) (let ((id-beg (c-on-identifier))) (setq c-new-id-start id-beg c-new-id-end (and id-beg - (progn (c-end-of-current-token) (point))))))) + (progn (c-end-of-current-token) (point))) + c-new-id-is-type nil)))) (defun c-post-command () ;; If point was inside of a new identifier and no longer is, record that commit b96f441139e09d48880e1f20ad4237400529ac5f Author: Stefan Kangas Date: Wed Oct 19 16:15:02 2022 +0200 ; Delete file after wallpaper test * test/lisp/image/wallpaper-tests.el (wallpaper-set/calls-init-action): Don't leave temp file behind. diff --git a/test/lisp/image/wallpaper-tests.el b/test/lisp/image/wallpaper-tests.el index cb6818f8c1..ab980a11bb 100644 --- a/test/lisp/image/wallpaper-tests.el +++ b/test/lisp/image/wallpaper-tests.el @@ -99,9 +99,16 @@ ("touch" "touch" fil :init-action (lambda () (setq called t))))) (wallpaper-command (wallpaper--find-command)) - (wallpaper-command-args (wallpaper--find-command-args))) + (wallpaper-command-args (wallpaper--find-command-args)) + (start (time-convert nil 'integer)) + (timeout 3) process) (should (functionp (wallpaper-setter-init-action wallpaper--current-setter))) - (wallpaper-set fil-jpg) + (setq process (wallpaper-set fil-jpg)) + ;; Wait for "touch" process to exit so temp file is removed. + (while (and (< (- (time-convert nil 'integer) start) + timeout) + (process-live-p process)) + (sit-for 0.01)) (should called))))) (ert-deftest wallpaper-set/calls-wallpaper-set-function () commit 6b82958b9fad5fcf784cf93e44dc118cf554d927 Author: Po Lu Date: Wed Oct 19 21:31:54 2022 +0800 Fix various builds * src/xterm.c (x_handle_selection_monitor_event): Adjust for build without XInput2. (x_maybe_clear_preedit, xim_destroy_callback): Make conditional on Release 6 XIM. (x_get_keyboard_modifiers): Adjust for build without XCB. diff --git a/src/xterm.c b/src/xterm.c index 04247bc302..ade5600f4d 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -17857,7 +17857,7 @@ x_handle_wm_state (struct frame *f, struct input_event *ie) static bool x_handle_selection_monitor_event (struct x_display_info *dpyinfo, - XEvent *event) + const XEvent *event) { XFixesSelectionNotifyEvent *notify; int i; @@ -25698,6 +25698,14 @@ x_new_font (struct frame *f, Lisp_Object font_object, int fontset) #ifdef HAVE_X11R6 +/* HAVE_X11R6 means Xlib conforms to the R6 specification or later. + HAVE_X11R6_XIM, OTOH, means that Emacs should try to use R6-style + callback driven input method initialization. They are separate + because Sun apparently ships buggy Xlib with some versions of + Solaris... */ + +#ifdef HAVE_X11R6_XIM + /* If preedit text is set on F, cancel preedit, free the text, and generate the appropriate events to cancel the preedit display. @@ -25763,6 +25771,8 @@ xim_destroy_callback (XIM xim, XPointer client_data, XPointer call_data) unblock_input (); } +#endif + #endif /* HAVE_X11R6 */ /* Open the connection to the XIM server on display DPYINFO. @@ -30512,8 +30522,14 @@ x_get_keyboard_modifiers (struct x_display_info *dpyinfo) /* This sometimes happens when the function is called during display initialization, which can happen while obtaining vendor specific keysyms. */ + +#ifdef HAVE_XKB if (!dpyinfo->xkb_desc && !dpyinfo->modmap) x_find_modifier_meanings (dpyinfo); +#else + if (!dpyinfo->modmap) + x_find_modifier_meanings (dpyinfo); +#endif return list5 (make_uint (dpyinfo->hyper_mod_mask), make_uint (dpyinfo->super_mod_mask), commit ccd0ad72f2fb2ccb96f826ecbefe495cb2bffc98 Author: Po Lu Date: Wed Oct 19 21:19:08 2022 +0800 Fix build warning without XKB, Xmb, and XInput 2 * src/xterm.c (handle_one_xevent): Avoid defining USE_SAFE_ALLOCA when SAFE_ALLOCA is not actually used. diff --git a/src/xterm.c b/src/xterm.c index 3075b5af23..04247bc302 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -17940,7 +17940,11 @@ handle_one_xevent (struct x_display_info *dpyinfo, GdkDisplay *gdpy = gdk_x11_lookup_xdisplay (dpyinfo->display); #endif int dx, dy; + + /* Avoid warnings when SAFE_ALLOCA is not actually used. */ +#if defined HAVE_XINPUT2 || defined HAVE_XKB || defined HAVE_X_I18N USE_SAFE_ALLOCA; +#endif /* This function is not reentrant, so input should be blocked before it is called. */ @@ -24220,7 +24224,10 @@ handle_one_xevent (struct x_display_info *dpyinfo, count++; } +#if defined HAVE_XINPUT2 || defined HAVE_XKB || defined HAVE_X_I18N SAFE_FREE (); +#endif + return count; } commit 4b2c83eeaf25dc2e95b0265d2e3013ad0d16aa25 Author: Eli Zaretskii Date: Wed Oct 19 14:50:23 2022 +0300 ; * doc/lispref/modes.texi (Defining Minor Modes): Explain TURN-ON. diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi index ad46708f02..72b4a6fb4f 100644 --- a/doc/lispref/modes.texi +++ b/doc/lispref/modes.texi @@ -1839,7 +1839,9 @@ to enable or disable the buffer-local minor mode @var{mode} in all (or some; see below) buffers. It also executes the @var{body} forms. To turn on the minor mode in a buffer, it uses the function @var{turn-on}; to turn off the minor mode, it calls @var{mode} with -@minus{}1 as argument. +@minus{}1 as argument. (The function @var{turn-on} is a separate +function so it could determine whether to enable the minor mode or not +when it is not a priori clear that it should always be enabled.) Globally enabling the mode also affects buffers subsequently created by visiting files, and buffers that use a major mode other than commit 084ac1e5147558b448af41fbfebc0a99a578819c Author: Eli Zaretskii Date: Wed Oct 19 14:40:11 2022 +0300 ; Fix last change * lisp/leim/quail/indian.el ("tamil99"): * etc/NEWS: Minor copyedits of the tamil99 documentation. diff --git a/etc/NEWS b/etc/NEWS index 2f7746b7f0..a378b5acbb 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1358,7 +1358,9 @@ change the input method's translation rules, customize the user option 'tamil-translation-rules'. --- -*** New tamil99 input method for the Tamil language +*** New tamil99 input method for the Tamil language. +This supports the keyboard layout specifically designed for the Tamil +language. * Changes in Specialized Modes and Packages in Emacs 29.1 diff --git a/lisp/leim/quail/indian.el b/lisp/leim/quail/indian.el index 17af8356bb..31a34bc1de 100644 --- a/lisp/leim/quail/indian.el +++ b/lisp/leim/quail/indian.el @@ -704,7 +704,7 @@ is." ;; Tamil99 input method ;; ;; Tamil99 is a keyboard layout and input method that is specifically -;; designed for the Tamil language. Vowels and vowel modifiers are +;; designed for the Tamil language. Vowels and vowel modifiers are ;; input with your left hand, and consonants are input with your right ;; hand. See https://en.wikipedia.org/wiki/Tamil_99 ;; commit 45ca261c98af5ff29c16b911bee357081c559cf6 Author: Arun Isaac Date: Tue Oct 18 23:30:59 2022 +0530 Add tamil99 input method (bug#58070) * lisp/leim/quail/indian.el: Require pcase and seq. ("tamil99"): New input method. * etc/NEWS: Mention new tamil99 input method. diff --git a/etc/NEWS b/etc/NEWS index dbc8971e41..2f7746b7f0 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1357,6 +1357,9 @@ The default input method for the Tamil language environment is now change the input method's translation rules, customize the user option 'tamil-translation-rules'. +--- +*** New tamil99 input method for the Tamil language + * Changes in Specialized Modes and Packages in Emacs 29.1 diff --git a/lisp/leim/quail/indian.el b/lisp/leim/quail/indian.el index 048e16e8d8..17af8356bb 100644 --- a/lisp/leim/quail/indian.el +++ b/lisp/leim/quail/indian.el @@ -30,6 +30,8 @@ ;;; Code: +(require 'pcase) +(require 'seq) (require 'quail) (require 'ind-util) @@ -699,6 +701,165 @@ is." "tamil-inscript-digits" "Tamil" "TmlISD" "Tamil keyboard Inscript with Tamil digits support.") +;; Tamil99 input method +;; +;; Tamil99 is a keyboard layout and input method that is specifically +;; designed for the Tamil language. Vowels and vowel modifiers are +;; input with your left hand, and consonants are input with your right +;; hand. See https://en.wikipedia.org/wiki/Tamil_99 +;; +;; தமிழ்99 உள்ளீட்டு முறை +;; +;; தமிழ்99 தமிழுக்கென்றே உருவாக்கப்பட்ட விசைப்பலகை அமைப்பும் உள்ளீட்டு முறையும் +;; ஆகும். உயிர்களை இடக்கையுடனும் மெய்களை வலக்கையுடனும் தட்டச்சிடும்படி +;; அமைக்கப்பட்டது. https://ta.wikipedia.org/wiki/%E0%AE%A4%E0%AE%AE%E0%AE%BF%E0%AE%B4%E0%AF%8D_99 +;; காண்க. + +(quail-define-package + "tamil99" "Tamil" "தமிழ்99" + t "Tamil99 input method" + nil t t t t nil nil nil nil nil t) + +(defconst tamil99-vowels + '(("q" "ஆ") + ("w" "ஈ") + ("e" "ஊ") + ("r" "ஐ") + ("t" "ஏ") + ("a" "அ") + ("s" "இ") + ("d" "உ") + ("g" "எ") + ("z" "ஔ") + ("x" "ஓ") + ("c" "ஒ")) + "Mapping for vowels.") + +(defconst tamil99-vowel-modifiers + '(("q" "ா") + ("w" "ீ") + ("e" "ூ") + ("r" "ை") + ("t" "ே") + ("a" "") + ("s" "ி") + ("d" "ு") + ("g" "ெ") + ("z" "ௌ") + ("x" "ோ") + ("c" "ொ") + ("f" "்")) + "Mapping for vowel modifiers.") + +(defconst tamil99-hard-consonants + '(("h" "க") + ("[" "ச") + ("o" "ட") + ("l" "த") + ("j" "ப") + ("u" "ற")) + "Mapping for hard consonants (வல்லினம்).") + +(defconst tamil99-soft-consonants + '(("b" "ங") + ("]" "ஞ") + ("p" "ண") + (";" "ந") + ("k" "ம") + ("i" "ன")) + "Mapping for soft consonants (மெல்லினம்).") + +(defconst tamil99-medium-consonants + '(("'" "ய") + ("m" "ர") + ("n" "ல") + ("v" "வ") + ("/" "ழ") + ("y" "ள")) + "Mapping for medium consonants (இடையினம்).") + +(defconst tamil99-grantham-consonants + '(("Q" "ஸ") + ("W" "ஷ") + ("E" "ஜ") + ("R" "ஹ")) + "Mapping for grantham consonants (கிரந்தம்).") + +(defconst tamil99-consonants + (append tamil99-hard-consonants + tamil99-soft-consonants + tamil99-medium-consonants + tamil99-grantham-consonants) + "Mapping for all consonants.") + +(defconst tamil99-other + `(("T" ,(vector "க்ஷ")) + ("Y" ,(vector "ஶஂரீ")) + ("O" "[") + ("P" "]") + ("A" "௹") + ("S" "௺") + ("D" "௸") + ("F" "ஃ") + ("K" "\"") + ("L" ":") + (":" ";") + ("\"" "'") + ("Z" "௳") + ("X" "௴") + ("C" "௵") + ("V" "௶") + ("B" "௷") + ("M" "/")) + "Mapping for miscellaneous characters.") + +;; உயிர் +;; vowel +(mapc (pcase-lambda (`(,vowel-key ,vowel)) + (quail-defrule vowel-key vowel)) + tamil99-vowels) + +(mapc (pcase-lambda (`(,consonant-key ,consonant)) + ;; அகர உயிர்மெய் + ;; consonant symbol (consonant combined with the first vowel அ) + (quail-defrule consonant-key consonant) + ;; மெய்யொற்று பின் அகர உயிர்மெய் + ;; pulli on double consonant + (quail-defrule (concat consonant-key consonant-key) + (vector (concat consonant "்" consonant))) + (mapc (pcase-lambda (`(,vowel-key ,vowel-modifier)) + ;; உயிர்மெய் + ;; vowelised consonant + (quail-defrule (concat consonant-key vowel-key) + (vector (concat consonant vowel-modifier))) + ;; மெய்யொற்று பின் பிற உயிர்மெய் + ;; vowelised consonant after double consonant + (quail-defrule (concat consonant-key consonant-key vowel-key) + (vector (concat consonant "்" consonant vowel-modifier)))) + tamil99-vowel-modifiers)) + tamil99-consonants) + +(seq-mapn (pcase-lambda (`(,soft-consonant-key ,soft-consonant) + `(,hard-consonant-key ,hard-consonant)) + ;; மெல்லினம் பின் வல்லினம் + ;; hard consonant after soft consonant + (quail-defrule (concat soft-consonant-key hard-consonant-key) + (vector (concat soft-consonant "்" hard-consonant))) + (mapc (pcase-lambda (`(,vowel-key ,vowel-modifier)) + ;; மெல்லின ஒற்றொட்டிய வல்லினம் பின் உயிர்மெய் + ;; vowelised consonant after soft-hard consonant pair + (quail-defrule (concat soft-consonant-key hard-consonant-key vowel-key) + (vector (concat soft-consonant "்" hard-consonant vowel-modifier)))) + tamil99-vowel-modifiers)) + tamil99-soft-consonants + tamil99-hard-consonants) + +;; பிற வரியுருக்கள் +;; other characters +(mapc (pcase-lambda (`(,key ,translation)) + (quail-defrule key translation)) + tamil99-other) + ;; Probhat Input Method (quail-define-package "bengali-probhat" "Bengali" "BngPB" t commit a9111d8670b48f473e968a0e75d83782dbf74425 Author: Stefan Kangas Date: Wed Oct 19 13:26:54 2022 +0200 Add admin/emacs-shell-lib for shared bash code * admin/emacs-shell-lib: New file for shared bash code. * admin/automerge: * admin/diff-tar-files: * admin/emacs-shell-lib: * admin/make-manuals: * admin/update_autogen: * admin/upload-manuals: Simplify and improve using above new library. diff --git a/admin/automerge b/admin/automerge index c7c17dfb5e..d2c92948e1 100755 --- a/admin/automerge +++ b/admin/automerge @@ -35,18 +35,7 @@ ## it with the -d option in the repository directory, in case a pull ## updates this script while it is working. -set -o nounset - -die () # write error to stderr and exit -{ - [ $# -gt 0 ] && echo "$PN: $*" >&2 - exit 1 -} - -PN=${0##*/} # basename of script -PD=${0%/*} - -[ "$PD" = "$0" ] && PD=. # if PATH includes PWD +source "${0%/*}/emacs-shell-lib" usage () { @@ -129,13 +118,7 @@ OPTIND=1 [ "$test" ] && build=1 -if [ -x "$(command -v mktemp)" ]; then - tempfile=$(mktemp "/tmp/$PN.XXXXXXXXXX") -else - tempfile=/tmp/$PN.$$ -fi - -trap 'rm -f $tempfile 2> /dev/null' EXIT +tempfile="$(emacs_mktemp)" [ -e Makefile ] && [ "$build" ] && { @@ -263,5 +246,3 @@ git push || die "push error" exit 0 - -### automerge ends here diff --git a/admin/diff-tar-files b/admin/diff-tar-files index 6ab39eab2f..869c942150 100755 --- a/admin/diff-tar-files +++ b/admin/diff-tar-files @@ -1,4 +1,4 @@ -#! /bin/sh +#!/bin/bash # Copyright (C) 2001-2022 Free Software Foundation, Inc. @@ -17,6 +17,7 @@ # You should have received a copy of the GNU General Public License # along with GNU Emacs. If not, see . +source "${0%/*}/emacs-shell-lib" if [ $# != 2 ]; then cat < $old_tmp tar tf "$new_tar" | sed -e 's,^[^/]*,,' | sort > $new_tmp diff --git a/admin/emacs-shell-lib b/admin/emacs-shell-lib new file mode 100644 index 0000000000..750f81e057 --- /dev/null +++ b/admin/emacs-shell-lib @@ -0,0 +1,87 @@ +#!/bin/bash +### emacs-shell-lib - shared code for Emacs shell scripts + +## Copyright (C) 2022 Free Software Foundation, Inc. + +## Author: Stefan Kangas + +## This file is part of GNU Emacs. + +## GNU Emacs is free software: you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation, either version 3 of the License, or +## (at your option) any later version. + +## GNU Emacs is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. + +## You should have received a copy of the GNU General Public License +## along with GNU Emacs. If not, see . + +### Code: + +# Set an explicit umask. +umask 077 + +# Treat unset variables as an error. +set -o nounset + +# Exit immediately on error. +set -o errexit + +# Avoid non-standard command output from non-C locales. +unset LANG LC_ALL LC_MESSAGES + +PN=${0##*/} # basename of script +PD=${0%/*} # script directory + +[ "$PD" = "$0" ] && PD=. # if PATH includes PWD + +die () # write error to stderr and exit +{ + [ $# -gt 0 ] && echo "$PN: $@" >&2 + exit 1 +} + +emacs_tempfiles=() + +emacs_tempfiles_cleanup () +{ + for file in ${emacs_tempfiles[@]}; do + rm -f "${file}" 2> /dev/null + done +} + +trap ' + ret=$? + emacs_tempfiles_cleanup + exit $ret +' EXIT + +emacs_mktemp () +{ + local readonly file="${1-}" + local tempfile + local prefix + + if [ -z "$file" ]; then + prefix="$PN" + else + prefix="$1" + fi + + if [ -x "$(command -v mktemp)" ]; then + tempfile=$(mktemp "${TMPDIR-/tmp}/${prefix}.XXXXXXXXXX") + else + tempfile="${TMPDIR-/tmp}/${prefix}.$RANDOM$$" + (umask 077 && touch "$tempfile") + fi + + [ -z "${tempfile}" ] && die "Creating temporary file failed" + + emacs_tempfiles+=("${tempfile}") + + echo "$tempfile" +} diff --git a/admin/make-manuals b/admin/make-manuals index cb0c00a423..a252bf20f1 100755 --- a/admin/make-manuals +++ b/admin/make-manuals @@ -33,15 +33,7 @@ ### Code: -set -o nounset - -die () # write error to stderr and exit -{ - [ $# -gt 0 ] && echo "$PN: $@" >&2 - exit 1 -} - -PN=${0##*/} # basename of script +source "${0%/*}/emacs-shell-lib" usage () { @@ -96,8 +88,7 @@ OPTIND=1 [ -e admin/admin.el ] || die "admin/admin.el not found" -tempfile=/tmp/$PN.$$ -trap "rm -f $tempfile 2> /dev/null" EXIT +tempfile="$(emacs_mktemp)" [ "$continue" ] || rm -rf $outdir diff --git a/admin/update_autogen b/admin/update_autogen index d1f49d9f25..55e11be95c 100755 --- a/admin/update_autogen +++ b/admin/update_autogen @@ -32,18 +32,7 @@ ### Code: -set -o nounset - -die () # write error to stderr and exit -{ - [ $# -gt 0 ] && echo "$PN: $@" >&2 - exit 1 -} - -PN=${0##*/} # basename of script -PD=${0%/*} - -[ "$PD" = "$0" ] && PD=. # if PATH includes PWD +source "${0%/*}/emacs-shell-lib" ## This should be the admin directory. cd $PD || exit @@ -102,10 +91,7 @@ done [ "$basegen" ] || die "internal error" -tempfile=/tmp/$PN.$$ - -trap 'rm -f $tempfile 2> /dev/null' EXIT - +tempfile="$(emacs_mktemp)" while getopts ":hcfqA:CL" option ; do case $option in @@ -312,5 +298,3 @@ commit "loaddefs" $modified || die "commit error" exit 0 - -### update_autogen ends here diff --git a/admin/upload-manuals b/admin/upload-manuals index 50336ee64c..04f7c3acc7 100755 --- a/admin/upload-manuals +++ b/admin/upload-manuals @@ -36,15 +36,7 @@ ### Code: -set -o nounset - -die () # write error to stderr and exit -{ - [ $# -gt 0 ] && echo "$PN: $@" >&2 - exit 1 -} - -PN=${0##*/} # basename of script +source "${0%/*}/emacs-shell-lib" usage () {