From: Michael Albinus Date: Sat, 5 Feb 2022 10:30:20 +0000 (+0100) Subject: Remove superfluous `font-lock-add-keywords' calls in Tramp X-Git-Tag: emacs-29.0.90~2510 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=49192d14189a4abcf8f8e125adb8dab8c5064392;p=emacs.git Remove superfluous `font-lock-add-keywords' calls in Tramp * lisp/net/tramp.el (with-parsed-tramp-file-name) (with-tramp-progress-reporter, with-tramp-file-property) (with-tramp-connection-property, with-tramp-locked-connection): * lisp/net/tramp-gvfs.el (with-tramp-dbus-call-method) (with-tramp-dbus-get-all-properties): Do not call `font-lock-add-keywords' for macros, it isn't needed anymore. --- diff --git a/lisp/net/tramp-gvfs.el b/lisp/net/tramp-gvfs.el index 763a9e849fa..d3af9f4769a 100644 --- a/lisp/net/tramp-gvfs.el +++ b/lisp/net/tramp-gvfs.el @@ -916,8 +916,6 @@ or `dbus-call-method-asynchronously'." ;; when loading. (dbus-ignore-errors (tramp-dbus-function ,vec func args)))) -(font-lock-add-keywords 'emacs-lisp-mode '("\\")) - (defmacro with-tramp-dbus-get-all-properties (vec bus service path interface) "Return all properties of INTERFACE. @@ -932,8 +930,6 @@ The call will be traced by Tramp with trace level 6." (tramp-dbus-function ,vec #'dbus-get-all-properties (list ,bus ,service ,path ,interface)))) -(font-lock-add-keywords 'emacs-lisp-mode '("\\")) - (defvar tramp-gvfs-dbus-event-vector nil "Current Tramp file name to be used, as vector. It is needed when D-Bus signals or errors arrive, because there diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 9caeffc5aa7..6d8f267ddf4 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -2302,8 +2302,6 @@ If VAR is nil, then we bind `v' to the structure and `method', `user', (ignore ,@(mapcar #'car bindings)) ,@body))) -(font-lock-add-keywords 'emacs-lisp-mode '("\\")) - (defun tramp-progress-reporter-update (reporter &optional value suffix) "Report progress of an operation for Tramp." (let* ((parameters (cdr reporter)) @@ -2340,9 +2338,6 @@ without a visible progress reporter." (if tm (cancel-timer tm)) (tramp-message ,vec ,level "%s...%s" ,message cookie))))) -(font-lock-add-keywords - 'emacs-lisp-mode '("\\")) - (defmacro with-tramp-file-property (vec file property &rest body) "Check in Tramp cache for PROPERTY, otherwise execute BODY and set cache. FILE must be a local file name on a connection identified via VEC." @@ -2359,8 +2354,6 @@ FILE must be a local file name on a connection identified via VEC." value) ,@body)) -(font-lock-add-keywords 'emacs-lisp-mode '("\\")) - (defmacro with-tramp-connection-property (key property &rest body) "Check in Tramp for property PROPERTY, otherwise execute BODY and set." (declare (indent 2) (debug t)) @@ -2374,9 +2367,6 @@ FILE must be a local file name on a connection identified via VEC." (tramp-set-connection-property ,key ,property value)) value)) -(font-lock-add-keywords - 'emacs-lisp-mode '("\\")) - (defun tramp-drop-volume-letter (name) "Cut off unnecessary drive letter from file NAME. The functions `tramp-*-handle-expand-file-name' call `expand-file-name' @@ -5027,10 +5017,6 @@ Mostly useful to protect BODY from being interrupted by timers." ,@body) (tramp-flush-connection-property ,proc "locked")))) -;; FIXME: This call is redundant in current Emacsen. -(font-lock-add-keywords - 'emacs-lisp-mode '("\\")) - (defun tramp-accept-process-output (proc &optional timeout) "Like `accept-process-output' for Tramp processes. This is needed in order to hide `last-coding-system-used', which is set