GNU bug report logs -
#58376
[PATCH] Set the PARENTS argument for language environments
Previous Next
Full log
Message #70 received at 58376 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Looks like, these patches have not yet been merged, it seems like they were
forgotten among other things,
therefore please install them.
Thanks
On Tue, Oct 11, 2022 at 12:08 AM समीर सिंह Sameer Singh <
lumarzeli30 <at> gmail.com> wrote:
> Thanks, it works this way.
> I have created a patch for you, if the ones provided by you do not apply.
>
> I have also created a separate patch adding multiple PARENTs to Kharoshthi
> and Gothic.
>
> On Mon, Oct 10, 2022 at 9:29 PM Visuwesh <visuweshm <at> gmail.com> wrote:
>
>> [திங்கள் அக்டோபர் 10, 2022] समीर सिंह Sameer Singh wrote:
>>
>> > This one says: "error: corrupt patch at line 8"
>> >
>> > The previous one said:
>> > error: patch failed: lisp/international/mule-cmds.el:1208
>> > error: lisp/international/mule-cmds.el: patch does not apply
>> >
>>
>> I have no idea why that is the case, and my network connection is too
>> slow to freshly clone the Emacs repo again. Can you replace the old
>> definition of `set-language-info-alist' with the following two forms
>> instead?
>>
>> (defun set-language-info-setup-keymap (lang-env alist describe-map
>> setup-map)
>> "Setup menu items for LANG-ENV.
>> See `set-language-info-alist' for details of other arguments."
>> (let ((doc (assq 'documentation alist)))
>> (when doc
>> (define-key-after describe-map (vector (intern lang-env))
>> (cons lang-env 'describe-specified-language-support))))
>> (define-key-after setup-map (vector (intern lang-env))
>> (cons lang-env 'setup-specified-language-environment)))
>>
>> (defun set-language-info-alist (lang-env alist &optional parents)
>> "Store ALIST as the definition of language environment LANG-ENV.
>> ALIST is an alist of KEY and INFO values. See the documentation of
>> `language-info-alist' for the meanings of KEY and INFO.
>>
>> Optional arg PARENTS is a list of parent menu names; it specifies
>> where to put this language environment in the
>> Describe Language Environment and Set Language Environment menus.
>> For example, (\"European\") means to put this language environment
>> in the European submenu in each of those two menus."
>> (cond ((symbolp lang-env)
>> (setq lang-env (symbol-name lang-env)))
>> ((stringp lang-env)
>> (setq lang-env (purecopy lang-env))))
>> (if parents
>> (while parents
>> (let (describe-map setup-map parent-symbol parent prompt)
>> (if (symbolp (setq parent-symbol (car parents)))
>> (setq parent (symbol-name parent))
>> (setq parent parent-symbol parent-symbol (intern parent)))
>> (setq describe-map (lookup-key
>> describe-language-environment-map (vector parent-symbol)))
>> ;; This prompt string is for define-prefix-command, so
>> ;; that the map it creates will be suitable for a menu.
>> (or describe-map (setq prompt (format "%s Environment" parent)))
>> (unless describe-map
>> (setq describe-map (intern (format
>> "describe-%s-environment-map"
>> (downcase parent))))
>> (define-prefix-command describe-map nil prompt)
>> (define-key-after describe-language-environment-map (vector
>> parent-symbol)
>> (cons parent describe-map)))
>> (setq setup-map (lookup-key setup-language-environment-map
>> (vector parent-symbol)))
>> (unless setup-map
>> (setq setup-map (intern (format "setup-%s-environment-map"
>> (downcase parent))))
>> (define-prefix-command setup-map nil prompt)
>> (define-key-after setup-language-environment-map (vector
>> parent-symbol)
>> (cons parent setup-map)))
>> (setq parents (cdr parents))
>> (set-language-info-setup-keymap lang-env alist (symbol-value
>> describe-map) (symbol-value setup-map))))
>> (set-language-info-setup-keymap lang-env alist
>> describe-language-environment-map
>> setup-language-environment-map))
>> (dolist (elt alist)
>> (set-language-info-internal lang-env (car elt) (cdr elt)))
>> (if (equal lang-env current-language-environment)
>> (set-language-environment lang-env)))
>>
>
[Message part 2 (text/html, inline)]
This bug report was last modified 2 years and 206 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.