From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Hongyi Zhao Newsgroups: gmane.emacs.help Subject: Re: The function naming convention used by Emacs. Date: Sun, 26 Sep 2021 20:18:49 +0800 Message-ID: References: <87sfxrtv50.fsf@zoho.eu> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17241"; mail-complaints-to="usenet@ciao.gmane.io" To: Emanuel Berg , help-gnu-emacs Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sun Sep 26 14:20:28 2021 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 1mUT8u-0004JT-FR for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 26 Sep 2021 14:20:28 +0200 Original-Received: from localhost ([::1]:59106 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mUT8r-0008TE-Tg for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 26 Sep 2021 08:20:27 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47558) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mUT7W-0008OW-I5 for help-gnu-emacs@gnu.org; Sun, 26 Sep 2021 08:19:04 -0400 Original-Received: from mail-ua1-x92a.google.com ([2607:f8b0:4864:20::92a]:33284) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mUT7V-00013O-1k for help-gnu-emacs@gnu.org; Sun, 26 Sep 2021 08:19:02 -0400 Original-Received: by mail-ua1-x92a.google.com with SMTP id r8so10156525uap.0 for ; Sun, 26 Sep 2021 05:19:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=XZifm5zhVEJjp6dexS5c0NcjamGclPoaJ06r/iEw8co=; b=iNvaJUR8uhX6bv+8vNh0ahCNHcqgvIyrra1IgHaY+tWpPEVg5APzaN83NiGw7RWwbE WoK2S41iE/yYWunHpqfl5T2s5aqosc2wPdv9qM7OnlwJtw8VzENnFBgC7eBUo+wOl2rr G0fI0ccA5TiC3Lwx+wTplw431tzP8VzxWDDaCVNb5uYoJ4+6uDBbpaxFwWZQUyk2SLI1 yKR5t7gk0Dh0Xe4uCs883DX6iDTdQcEchnwTRRY1A1zqX9Hc4yHIA7+a5Q1Eu2RX9lo3 st15CjkReSzQfEIY1joKHQPTcBNx3juXLopigVPT3UzKmIIKrMAR38MxNJNzhm0XQ6Jh j++A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=XZifm5zhVEJjp6dexS5c0NcjamGclPoaJ06r/iEw8co=; b=XS+2WkV0cKgkujWUAGcixhHm2bANe39owhKFAp0kwWRn9Hd1JwEIo8ewcjid9592lK 1IufnYNLuwyuRXTVfPe4KZya9gI016WEb5WvZYsQjpAiUg8fXs1NCAwO7wNSkGNqecX3 Zcd8X+nUuFSd/tNc9SZ63Av9Xfta72t4BUTJfExq5FlP5EzA4n/DHtpdJNW5sNoSgPaG 1nMFzaJuEQch65K0nu/EcK7I5KkEkMnJ5CY8SCwaYmveLzGTr/J85NCptAVLs2v0bfBX VOFJgm7wD537eJRM8ZGBoclhgQN11iWwTne+oPj+XGwCb2JBazCwilJiHHfWNTgwKX4v DZng== X-Gm-Message-State: AOAM533t9ihmXswrEIZuJJLed2TYvCzxBe9Ge4aGBA0/qHxWvV7MFspj /4Mq/Z3DGr7biacC03GGWosQDwDBzJtHbnrZ6hg= X-Google-Smtp-Source: ABdhPJz+jg/bv8HrisKCkD/19NBp+u3WnlRJlOim6t4njkr6M1uwZCEKDEKigAbzAw1xaI6IUTdaV0BzYRJHoD6N+yM= X-Received: by 2002:a05:6130:392:: with SMTP id az18mr16651587uab.71.1632658740043; Sun, 26 Sep 2021 05:19:00 -0700 (PDT) In-Reply-To: <87sfxrtv50.fsf@zoho.eu> Received-SPF: pass client-ip=2607:f8b0:4864:20::92a; envelope-from=hongyi.zhao@gmail.com; helo=mail-ua1-x92a.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.23 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" Xref: news.gmane.io gmane.emacs.help:133260 Archived-At: On Sun, Sep 26, 2021 at 7:49 PM Emanuel Berg via Users list for the GNU Emacs text editor wrote: > > Hongyi Zhao wrote: > > > As far as function names are concerned, are there some > > established conventions used by Emacs? For example, > > I noticed that there are so many functions in Emacs named by > > the suffix `-p', say, `file-exists-p', `ht-equal-p', and so > > on. But I still can't figure out the meaning of this suffix. > > Any tips will be appreciated. > > It stands for "predicate", such a function returns t or nil. > > there is also the "f" suffix for "function", e.g. `cl-incf' > and `cl-decf' ... and a couple of other conventions I can't > remember right now. > > Speaking of CL, the convention for *global-variables* is not > encouraged in Elisp. > > Other than that do this > > (require 'checkdoc) > > (setq checkdoc-permit-comma-termination-flag t) > > (defun check-package-style () > (interactive) > (let ((msg "Style check...")) > (message msg) > (checkdoc-current-buffer t) ; TAKE-NOTES > (message "%sdone" msg) )) > (defalias 'check-style #'check-package-style) Do you mean and suggest adding the above code snippets into the init file? > and do byte-compile for more pointers ... I now use the `--with-native-compilation' option to configure Emacs for compilation. So, the thing you mentioned above should have been done automatically by Emacs. HZ