unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: master 8fd97b1 1/2: Fix warning generated by indian.el + quail.el
       [not found] ` <20210224193217.F016720B28@vcs0.savannah.gnu.org>
@ 2021-02-24 20:57   ` Stefan Monnier
  2021-02-24 21:02     ` Lars Ingebrigtsen
  0 siblings, 1 reply; 4+ messages in thread
From: Stefan Monnier @ 2021-02-24 20:57 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: emacs-devel

> +  ;; This is a funcall to avoid `quail-update-leim-list-file'
> +  ;; determining that this is a quail definition (it searches for
> +  ;; "(quail-define-package").
> +  (funcall #'quail-define-package pkgname lang title nil docstring

Would the patch below fix this problem more directly?


        Stefan


diff --git a/lisp/international/quail.el b/lisp/international/quail.el
index 5cfa79203d..576189a7de 100644
--- a/lisp/international/quail.el
+++ b/lisp/international/quail.el
@@ -3081,7 +3081,7 @@ quail-update-leim-list-file
 	    (insert-file-contents (car pkg-list))
 	    (goto-char (point-min))
 	    ;; Don't get fooled by commented-out code.
-	    (while (re-search-forward "^[ \t]*(quail-define-package" nil t)
+	    (while (re-search-forward "^[ \t]*(quail-define-package[ \t\n]*\"" nil t)
 	      (goto-char (match-beginning 0))
 	      (condition-case nil
 		  (let ((form (read (current-buffer))))




^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: master 8fd97b1 1/2: Fix warning generated by indian.el + quail.el
  2021-02-24 20:57   ` master 8fd97b1 1/2: Fix warning generated by indian.el + quail.el Stefan Monnier
@ 2021-02-24 21:02     ` Lars Ingebrigtsen
  2021-02-24 21:19       ` Stefan Monnier
  0 siblings, 1 reply; 4+ messages in thread
From: Lars Ingebrigtsen @ 2021-02-24 21:02 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

Stefan Monnier <monnier@iro.umontreal.ca> writes:

> Would the patch below fix this problem more directly?

[...]

> -	    (while (re-search-forward "^[ \t]*(quail-define-package" nil t)
> +	    (while (re-search-forward "^[ \t]*(quail-define-package[ \t\n]*\"" nil t)

I'm not sure?  This all ends up as a (register-input-method ...) call,
which is a function, from which I inferred that literal strings aren't
necessarily required here (i.e., that you can quail-define-package with
a variable name as the first element).  

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: master 8fd97b1 1/2: Fix warning generated by indian.el + quail.el
  2021-02-24 21:02     ` Lars Ingebrigtsen
@ 2021-02-24 21:19       ` Stefan Monnier
  2021-02-24 22:20         ` Lars Ingebrigtsen
  0 siblings, 1 reply; 4+ messages in thread
From: Stefan Monnier @ 2021-02-24 21:19 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: emacs-devel

>> Would the patch below fix this problem more directly?
>
> [...]
>
>> -	    (while (re-search-forward "^[ \t]*(quail-define-package" nil t)
>> +	    (while (re-search-forward "^[ \t]*(quail-define-package[ \t\n]*\"" nil t)
>
> I'm not sure?  This all ends up as a (register-input-method ...) call,
> which is a function, from which I inferred that literal strings aren't
> necessarily required here (i.e., that you can quail-define-package with
> a variable name as the first element).  

But IIRC those that we want to extract are specifically those that
are already "fully computed".  In theory we could miss some things like

    (let ((name "foo"))
      (quail-define-package name ...))

but that seems very unlikely.


        Stefan




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: master 8fd97b1 1/2: Fix warning generated by indian.el + quail.el
  2021-02-24 21:19       ` Stefan Monnier
@ 2021-02-24 22:20         ` Lars Ingebrigtsen
  0 siblings, 0 replies; 4+ messages in thread
From: Lars Ingebrigtsen @ 2021-02-24 22:20 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

Stefan Monnier <monnier@iro.umontreal.ca> writes:

> But IIRC those that we want to extract are specifically those that
> are already "fully computed".  In theory we could miss some things like
>
>     (let ((name "foo"))
>       (quail-define-package name ...))
>
> but that seems very unlikely.

It seems kinda fragile either way...  but I have no opinion here,
really.  If you think fixing this via the regexp in quail.el instead is
better as a long-term solution, I have no objections to that.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-02-24 22:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20210224193216.21758.72611@vcs0.savannah.gnu.org>
     [not found] ` <20210224193217.F016720B28@vcs0.savannah.gnu.org>
2021-02-24 20:57   ` master 8fd97b1 1/2: Fix warning generated by indian.el + quail.el Stefan Monnier
2021-02-24 21:02     ` Lars Ingebrigtsen
2021-02-24 21:19       ` Stefan Monnier
2021-02-24 22:20         ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).