From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Nikolay Kudryavtsev Newsgroups: gmane.emacs.help Subject: Re: How to modify a function of a package Date: Sat, 28 Oct 2023 16:18:39 +0300 Message-ID: References: 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="7875"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird To: Maske , help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sat Oct 28 15:19:51 2023 Return-path: Envelope-to: geh-help-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 1qwjEF-0001xT-Df for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 28 Oct 2023 15:19:51 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qwjDZ-0008P0-4h; Sat, 28 Oct 2023 09:19:09 -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 1qwjDX-0008OU-Ok for help-gnu-emacs@gnu.org; Sat, 28 Oct 2023 09:19:07 -0400 Original-Received: from mail-lf1-x12b.google.com ([2a00:1450:4864:20::12b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qwjDW-00084V-4Y for help-gnu-emacs@gnu.org; Sat, 28 Oct 2023 09:19:07 -0400 Original-Received: by mail-lf1-x12b.google.com with SMTP id 2adb3069b0e04-5079f3f3d7aso4574241e87.1 for ; Sat, 28 Oct 2023 06:19:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1698499143; x=1699103943; darn=gnu.org; h=content-transfer-encoding:in-reply-to:content-language:references :to:subject:user-agent:mime-version:date:message-id:from:from:to:cc :subject:date:message-id:reply-to; bh=CzZn/RReIgwgq+GEp4cPcgeEgI3RTBxQTMGOE+M1zko=; b=LHuTLu1pCou/I+wMmp+NT2RW/1c49K0IB7qi1l5UL7x4Upl9lBUsMt8M8LzYzEaGq4 z5MreDLQKeXO6c8jYBAg02EoLXiVKnONQQRHhZlVFP+cP1SA9A10VLCcAJLUxdjDglEk 7klMbuDHClhHNO7nMXa3+Da74+w+Zqz1c2s+hiY+hO/uLJVXCCeDj+jFG/03+Haup9rx cgktbn5QWan2ALTA9IRCwbfiJpoPJbSK43aGR1jpOuyXulMZaXaeAnCc7MpPeeqeVen2 /fykfH3sLZGCqLiJosGWEscZrvudpaDlejnQXIPSMkmB3T1W9xopJkmnXxoKKD1CzjtL +1Cg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698499143; x=1699103943; h=content-transfer-encoding:in-reply-to:content-language:references :to:subject:user-agent:mime-version:date:message-id:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=CzZn/RReIgwgq+GEp4cPcgeEgI3RTBxQTMGOE+M1zko=; b=XcXbqC6lKFk0hmvGHXtM95uV1x0E78IwpRDqdHX3nIlo/WqtYLVcDHAWz3SH6oDYJB OuXYENz3aNB2RT1PbOud3EVxINdztCCwvBwvF1HfTYydY813UsQrdTAEFPtQcR0Oay0s MYRYqPhoUt9LBh3Y/HDnVezylpoGJlazNQvbCCkDT7Tye/W/pgC/uXswo7cqVZA7DOAY h80Gr9sIp572GxIEPwVN47j86IOzG0E9w4w2E85yNDGYcSWSevxGMaQRbhWbFq5DUB2G Kr3GdcstHHjCa1ZFn2lO47GD6owcv4idYOdWNA+Vuw2aMfWAxxV4Bi9gmfFom2nzf1at d7iw== X-Gm-Message-State: AOJu0YyBhW+wopUICcYp40XoSOQJNBquY/lhEDgrKNeU2snc3Yt+HFPD ry8nsBAnsSGEGyy4Vgap5PsoKiJ7D1k= X-Google-Smtp-Source: AGHT+IEcGyAg9n7Yfteqp6n8M+a7qbPzaaqisrGrBWTwLWg8o+Dqw0mw7Yta8jDyMVt0Urcnl9I7uA== X-Received: by 2002:ac2:446d:0:b0:4ff:7602:5879 with SMTP id y13-20020ac2446d000000b004ff76025879mr3333060lfl.55.1698499143379; Sat, 28 Oct 2023 06:19:03 -0700 (PDT) Original-Received: from [192.168.199.2] (broadband-90-154-73-8.ip.moscow.rt.ru. [90.154.73.8]) by smtp.gmail.com with ESMTPSA id i14-20020a056512340e00b00502ae64f46asm652802lfr.126.2023.10.28.06.19.02 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 28 Oct 2023 06:19:02 -0700 (PDT) X-Google-Original-From: Nikolay Kudryavtsev Content-Language: en-US In-Reply-To: Received-SPF: pass client-ip=2a00:1450:4864:20::12b; envelope-from=nikolay.kudryavtsev@gmail.com; helo=mail-lf1-x12b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:145406 Archived-At: Since everyone gave you only the more advanced answers, here's also the simple ones: 1. You do (require 'package) before redefining a function in it. Won't always work, a package may do something really sneaky with it's functions, but should suffice for most cases. 2. If you use use-package, put your function redefinition into the :config form and that's it.