all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Visuwesh <visuweshm@gmail.com>
To: "समीर सिंह Sameer Singh" <lumarzeli30@gmail.com>
Cc: Eli Zaretskii <eliz@gnu.org>, 58376@debbugs.gnu.org
Subject: bug#58376: [PATCH] Set the PARENTS argument for language environments
Date: Mon, 10 Oct 2022 21:29:03 +0530	[thread overview]
Message-ID: <87bkqjwtyw.fsf@gmail.com> (raw)
In-Reply-To: <CAOR1sLzukREVoKkd29eQyE0Fz_PvRBNVq-jSWey4BbTDUuVuxw@mail.gmail.com> ("समीर सिंह Sameer Singh"'s message of "Mon, 10 Oct 2022 20:08:42 +0530")

[திங்கள் அக்டோபர் 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)))





  reply	other threads:[~2022-10-10 15:59 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-08 11:12 bug#58376: [PATCH] Set the PARENTS argument for language environments समीर सिंह Sameer Singh
2022-10-08 11:15 ` समीर सिंह Sameer Singh
2022-10-08 14:46   ` Eli Zaretskii
2022-10-08 16:18     ` समीर सिंह Sameer Singh
2022-10-08 18:16       ` Eli Zaretskii
2022-10-08 19:16         ` समीर सिंह Sameer Singh
2022-10-09  8:29           ` Eli Zaretskii
2022-10-09 10:28             ` समीर सिंह Sameer Singh
2022-10-09 13:22               ` Eli Zaretskii
2022-10-09 13:59                 ` समीर सिंह Sameer Singh
2022-10-09 14:23                   ` Eli Zaretskii
2022-10-09 14:46                     ` समीर सिंह Sameer Singh
2022-10-09 14:55                       ` Eli Zaretskii
2022-10-09 14:50                 ` Visuwesh
2022-10-09 15:06                   ` Visuwesh
2022-10-09 15:30                     ` Visuwesh
2022-10-10 14:06                       ` समीर सिंह Sameer Singh
2022-10-10 14:32                         ` Visuwesh
2022-10-10 14:38                           ` समीर सिंह Sameer Singh
2022-10-10 15:59                             ` Visuwesh [this message]
2022-10-10 18:38                               ` समीर सिंह Sameer Singh
2022-10-30  8:22                                 ` समीर सिंह Sameer Singh
2022-10-30  8:43                                   ` Eli Zaretskii
2022-10-30  9:30                                     ` समीर सिंह Sameer Singh
2022-10-30 10:20                                       ` Eli Zaretskii
2022-10-30 10:31                                         ` समीर सिंह Sameer Singh
2022-10-30 11:18                                           ` Eli Zaretskii
2022-10-30 11:19                                             ` समीर सिंह Sameer Singh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87bkqjwtyw.fsf@gmail.com \
    --to=visuweshm@gmail.com \
    --cc=58376@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=lumarzeli30@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.