From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: master 47e313e9805: Unbind 'C-M-i' in Text mode Date: Wed, 6 Dec 2023 01:26:41 +0200 Message-ID: <75c363c1-0dfd-c223-74f1-d98af65b3094@gutov.dev> References: <170099515102.15929.4538081255360222923@vcs2.savannah.gnu.org> <20231126103911.6CEAFC25D5B@vcs2.savannah.gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39899"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 To: emacs-devel@gnu.org, Eshel Yaron Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Dec 06 00:27:14 2023 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rAeor-000AD9-Bh for ged-emacs-devel@m.gmane-mx.org; Wed, 06 Dec 2023 00:27:14 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rAeoZ-0005LR-VP; Tue, 05 Dec 2023 18:26:55 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rAeoY-0005Ks-3o for emacs-devel@gnu.org; Tue, 05 Dec 2023 18:26:54 -0500 Original-Received: from wout1-smtp.messagingengine.com ([64.147.123.24]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rAeoV-0002zR-5p for emacs-devel@gnu.org; Tue, 05 Dec 2023 18:26:53 -0500 Original-Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.west.internal (Postfix) with ESMTP id E70F63200201; Tue, 5 Dec 2023 18:26:47 -0500 (EST) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Tue, 05 Dec 2023 18:26:48 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm3; t= 1701818807; x=1701905207; bh=ADP3HqQE3lfa6hJVVm8RFodXzh/osTW5BWL K6UquYQU=; b=yszxsSmvtsoM4w3ZSy9Hn1XYInjw/oJduvRqbDWWjDizyk1Jb23 Ko/ZeVDtyaSbBxx0IKnb0k6CJtH4E5zdWhtrZhfdUu6Jksho8uo0x1v5FZ7aUBSi qj6iCvPxud2zQQJ+DCAxsyAJjGZt4hYV6PbM5T7rK3OMMiVG8yoUHNb8cHlDcV15 q05wOgl7VRp+fIsCjwRUhOL3CJxiaGbSbnRdqbhd1miwk3LH4Hsc+81fVdArrDA9 2Z1RG0ozlG9dV/DGvMhRxDlA8quQdk8xtA4ey/Ij4PDKF6ZHUYylFuwRML0o94nX PkGln1pREK/CQBOAlM1rwlDFMboiUEvw+9w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1701818807; x= 1701905207; bh=ADP3HqQE3lfa6hJVVm8RFodXzh/osTW5BWLK6UquYQU=; b=g QMnElKSNM9LD2ifEEfebTmpbF43rQE6PrGWg1+LSdW1wUsiNZGXI3iZJas7V+ejZ s7VPslZKNsIdBx51b0ITGSci01SvIw7Mghpqs7/JUXiBPr6jaZFRy0bRVqyuuvVU hIDzr7ONrJ0htF7ptIg1zXc9Agd4cATx+/epCFYqIVwTyKh0HxINrRl5BFVv1GnC RCtcCwbtTbYLIOfEq987rGhOjBxZT3GRC+8s/XNy3kAxiMHIXSEkwmtUnLAdQyh8 f1apTwwIHYfCQwh8PhRoeR7tM+QMCP6F/o18/6Uf4nbzFPbOv17s5+97Hp7rY8xc uSHElRAvY2Onnipgngm5Q== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudejledgudduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefkffggfgfuvfhfhfgjtgfgsehtje ertddtfeejnecuhfhrohhmpeffmhhithhrhicuifhuthhovhcuoegumhhithhrhiesghhu thhovhdruggvvheqnecuggftrfgrthhtvghrnhepgeehtdehudejieetuedttdejkeehje etueekheffuddtjeeuvdefveeuveeiuddunecuvehluhhsthgvrhfuihiivgeptdenucfr rghrrghmpehmrghilhhfrhhomhepughmihhtrhihsehguhhtohhvrdguvghv X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 5 Dec 2023 18:26:46 -0500 (EST) Content-Language: en-US In-Reply-To: <20231126103911.6CEAFC25D5B@vcs2.savannah.gnu.org> Received-SPF: pass client-ip=64.147.123.24; envelope-from=dmitry@gutov.dev; helo=wout1-smtp.messagingengine.com X-Spam_score_int: -67 X-Spam_score: -6.8 X-Spam_bar: ------ X-Spam_report: (-6.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, NICE_REPLY_A=-4.02, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:313544 Archived-At: Hi, On 26/11/2023 12:39, Eli Zaretskii wrote: > +;;;###autoload > +(defun ispell-completion-at-point () > + "Word completion function for use in `completion-at-point-functions'." > + (pcase (bounds-of-thing-at-point 'word) > + (`(,beg . ,end) > + (when (and (< beg (point)) (<= (point) end)) > + (let* ((word (buffer-substring-no-properties beg end)) > + (len (length word)) > + (inhibit-message t) > + (all (cons word (ispell-lookup-words word))) > + (cur all)) > + (while cur > + (unless (string-prefix-p word (car cur)) > + (setcar cur (concat word (substring (car cur) len)))) > + (while (when-let ((next (cadr cur))) > + (not (string-prefix-p word next t))) > + (setcdr cur (cddr cur))) > + (setq cur (cdr cur))) > + (list beg end (cdr all) > + :annotation-function (lambda (_) " Dictionary word") I have to say that "Dictionary word" is not a great annotation: it's long, longer than most of the completions coming from that backend, so these words, repeated, constitute most of the text inside the Completions buffer. And it's the same string for all completions.