From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#71716: [PATCH] Add new completion-preview-insert-{word, sexp} commands Date: Mon, 24 Jun 2024 14:49:10 +0300 Message-ID: <86zfrablxl.fsf@gnu.org> References: <87a5jd8hqh.fsf@gmail.com> <877ceg9546.fsf@gmail.com> <874j9k8wpo.fsf@gmail.com> <87r0cn5n2s.fsf@gmail.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31484"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 71716@debbugs.gnu.org, me@eshelyaron.com To: Jules Tamagnan Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jun 24 13:50:20 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1sLiDD-0007uA-Rr for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 24 Jun 2024 13:50:19 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sLiCv-0006iM-SD; Mon, 24 Jun 2024 07:50:01 -0400 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 1sLiCv-0006iA-42 for bug-gnu-emacs@gnu.org; Mon, 24 Jun 2024 07:50:01 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sLiCu-0003RZ-Sb for bug-gnu-emacs@gnu.org; Mon, 24 Jun 2024 07:50:00 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sLiCv-0008Gl-Rc for bug-gnu-emacs@gnu.org; Mon, 24 Jun 2024 07:50:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 24 Jun 2024 11:50:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71716 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 71716-submit@debbugs.gnu.org id=B71716.171922976131698 (code B ref 71716); Mon, 24 Jun 2024 11:50:01 +0000 Original-Received: (at 71716) by debbugs.gnu.org; 24 Jun 2024 11:49:21 +0000 Original-Received: from localhost ([127.0.0.1]:53917 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sLiCG-0008FB-OH for submit@debbugs.gnu.org; Mon, 24 Jun 2024 07:49:21 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:60536) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sLiCE-0008En-Un for 71716@debbugs.gnu.org; Mon, 24 Jun 2024 07:49:19 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sLiC8-0003Dv-Gu; Mon, 24 Jun 2024 07:49:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=F2+3uTPFrPewcqdAFbSmSdyhkHDNA7TmM3TOQxfAYRs=; b=Z3vBzqYnD9Nw 3jNticZeyOfD4tl+Le4QQfjUoZUlmOdOCn/ZRzgHNajU4lO1t66qhZHcmMNX35YQsh1q9bJbIxQz2 g9kg4rWDHb2SsJvzuY9wV/CPct4ziUjLCTGfzT9HdANIRjQs5GWYceJ6wqn+G1iDjY4fzUTckHmHZ 8LUbc6rfbC3MG7Z0ojaw+KnL6tQRjDGWjkGe/JJd5CwPSPEkbdeyT3UXew8ctbwZPdSDGp4bCMsTg 14GWE3IZ54fzc7+Y+uczwuRFdftbojQTKsPY9gb5xYDRfr5NXXF83dzV87g/lYZVvKkf5c34wMoWj iBIqAfJerTsmDl6l6tI/zw==; In-Reply-To: <87r0cn5n2s.fsf@gmail.com> (message from Jules Tamagnan on Sun, 23 Jun 2024 15:08:43 -0700) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:287828 Archived-At: > Cc: 71716@debbugs.gnu.org > From: Jules Tamagnan > Date: Sun, 23 Jun 2024 15:08:43 -0700 > > +(defcustom completion-preview-context-variables '(char-script-table > + forward-sexp-function > + find-word-boundary-function-table > + inhibit-field-text-motion) > + "List of variables which can change the functionality of `forward-word' > +or `forward-sexp'." > + :type '(repeat (variable :tag "Variable" :value char-script-table)) > + :version "30.1") I don't think we will install new features on the emacs-30 branch, so this :version tag should be updated. And the previous one as well, I guess. > +(defun completion-preview--determine-substring (command string) > + "A helper function to determine what parts of a STRING come before and > +after the point when a certain COMMAND has been performed on that STRING" The first line of a doc string should be a single complete sentence. That's because some help commands, like "M-x apropos", show only the first line of the doc strings.