[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[AUCTeX-diffs] [elpa] externals/auctex 5696f07 08/17: Reduce byte compil

From: Tassilo Horn
Subject: [AUCTeX-diffs] [elpa] externals/auctex 5696f07 08/17: Reduce byte compiler warning
Date: Fri, 2 Apr 2021 04:13:19 -0400 (EDT)

branch: externals/auctex
commit 5696f07ad37bb3cf5250fe7c2e0a2471933fe041
Author: Ikumi Keita <>
Commit: Ikumi Keita <>

    Reduce byte compiler warning
    * tex.el (): Move `(eval-when-compile (require 'dbus))' before
    `declare-function's of dbus related functions because otherwise they
    seem ineffective.
    Both NOERROR optional argument for `(require 'dbus)' and `(featurep
    'dbusbind)' test are removed deliberately because
    (1) Now all supported emacsen have dbus.el.
    (2) Even if emacs is built with configure option "--without-dbus", it
        doesn't cause error to load dbus.el just to get macro definition
        of `dbus-ignore-errors'.
    This way, it works fine even when
    (a) Emacs used for byte-compiling lacks D-Bus support.
    (b) Emacs at run time has D-Bus support.
    without relying on `TeX--if-macro-fboundp'.
    (): Remove `declare-function' for `dbus-ignore-errors' because it's
    now guaranteed that the macro is expanded away at byte compile time.
    (): Remove `defvar' for `dbus-debug' because `dbus.el' provides a
    suitable defvar.
 tex.el | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/tex.el b/tex.el
index 0ede5dd..4aa55c0 100644
--- a/tex.el
+++ b/tex.el
@@ -38,10 +38,11 @@
   (require 'cl-lib))
 (require 'texmathp)
+;; Require dbus at compile time to get macro definition of
+;; `dbus-ignore-errors'.
+(eval-when-compile (require 'dbus))
 ;; Silence the compiler for functions:
-(declare-function dbus-ignore-errors "ext:dbus"
-                  (&rest body))
 (declare-function dbus-get-unique-name "ext:dbusbind.c"
 (declare-function dbus-ping "ext:dbus"
@@ -98,7 +99,6 @@
 ;; Others:
 (defvar tex--prettify-symbols-alist)    ; tex-mode.el
 (defvar Info-file-list-for-emacs)       ; info.el
-(defvar dbus-debug)                     ; dbus.el
 (defvar ispell-parser)                  ; ispell.el
 (defgroup TeX-file nil
@@ -1115,10 +1115,6 @@ The following built-in predicates are available:
 ;; program and the desktop environment, that will be used to set up
 ;; DBUS communication.
-;; Require dbus at compile time to prevent errors due to `dbus-ignore-errors'
-;; not being defined.
-(eval-when-compile (and (featurep 'dbusbind)
-                        (require 'dbus nil :no-error)))
 (defun TeX-evince-dbus-p (de app &rest options)
   "Return non-nil, if an evince-compatible reader is accessible via DBUS.
 Additional OPTIONS may be given to extend the check.  If none are

reply via email to

[Prev in Thread] Current Thread [Next in Thread]