emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] externals/ada-mode 0a42145 16/48: * packages/ada-mode: Miscellane


From: Stefan Monnier
Subject: [elpa] externals/ada-mode 0a42145 16/48: * packages/ada-mode: Miscellaneous tweaks to fix warnings
Date: Mon, 30 Nov 2020 17:20:39 -0500 (EST)

branch: externals/ada-mode
commit 0a42145fefaa2fbdfc6d350afde6a8cec91fa4a9
Author: Stefan Monnier <monnier@iro.umontreal.ca>
Commit: Stefan Monnier <monnier@iro.umontreal.ca>

    * packages/ada-mode: Miscellaneous tweaks to fix warnings
    
    * packages/ada-mode/ada-mode.el (ada-in-numeric-literal-p): Refine call to
    looking-back.
    (<toplevel>): Fix broken use of cl-case.
    
    * packages/ada-mode/ada-skel.el: Use #' to quote function names.
    
    * packages/ada-mode/ada-wisi.el (ada-wisi-which-function-1): Remove unused 
var
    `region' and avoid unneeded setq.
    
    * packages/ada-mode/gnat-inspect.el (gnat-inspect-compilation):
    * packages/ada-mode/gpr-query.el (gpr-query-compilation): Silence warning.
---
 ada-mode.el     |  6 +++---
 ada-skel.el     | 10 +++++-----
 ada-wisi.el     |  9 +++------
 gnat-inspect.el |  4 ++--
 gpr-query.el    |  2 +-
 5 files changed, 14 insertions(+), 17 deletions(-)

diff --git a/ada-mode.el b/ada-mode.el
index 57e5ebc..fc3552e 100644
--- a/ada-mode.el
+++ b/ada-mode.el
@@ -1071,7 +1071,7 @@ User is prompted to choose a file from project variable 
casing if it is a list."
 (defun ada-in-numeric-literal-p ()
   "Return t if point is after a prefix of a numeric literal."
   ;; FIXME: this is actually a based numeric literal; excludes 1234
-  (looking-back "\\([0-9]+#[0-9a-fA-F_]+\\)"))
+  (looking-back "\\([0-9]+#[0-9a-fA-F_]+\\)" (line-beginning-position)))
 
 (defvar ada-keywords nil
   "List of Ada keywords for current `ada-language-version'.")
@@ -2818,8 +2818,8 @@ The paragraph is indented on the first line."
 
 (unless (featurep 'ada-xref-tool)
   (cl-case ada-xref-tool
-    ((nil 'gnat) (require 'ada-gnat-xref))
-    ('gpr_query (require 'gpr-query))
+    ((nil gnat) (require 'ada-gnat-xref))
+    (gpr_query (require 'gpr-query))
     ))
 
 (unless (featurep 'ada-compiler)
diff --git a/ada-skel.el b/ada-skel.el
index 9544222..e6c5430 100644
--- a/ada-skel.el
+++ b/ada-skel.el
@@ -1,6 +1,6 @@
 ;;; ada-skel.el --- an extension to Ada mode for inserting statement skeletons
 
-;; Copyright (C) 1987, 1993, 1994, 1996-2014  Free Software Foundation, Inc.
+;; Copyright (C) 1987, 1993, 1994, 1996-2015  Free Software Foundation, Inc.
 
 ;; Authors: Stephen Leake <stephen_leake@stephe-leake.org>
 
@@ -453,10 +453,10 @@ it is a name, and use the word before that as the token."
 (provide 'ada-skeletons)
 (provide 'ada-skel)
 
-(setq ada-expand 'ada-skel-expand)
-(setq ada-next-placeholder 'ada-skel-next-placeholder)
-(setq ada-prev-placeholder 'ada-skel-prev-placeholder)
+(setq ada-expand #'ada-skel-expand)
+(setq ada-next-placeholder #'ada-skel-next-placeholder)
+(setq ada-prev-placeholder #'ada-skel-prev-placeholder)
 
-(add-hook 'ada-mode-hook 'ada-skel-setup)
+(add-hook 'ada-mode-hook #'ada-skel-setup)
 
 ;;; ada-skel.el ends here
diff --git a/ada-wisi.el b/ada-wisi.el
index a325b0f..7bb3bd9 100644
--- a/ada-wisi.el
+++ b/ada-wisi.el
@@ -1571,12 +1571,9 @@ Also return cache at start."
     paramlist))
 
 (defun ada-wisi-which-function-1 (keyword add-body)
-  "used in `ada-wisi-which-function'."
-  (let (region
-       result
-       (cache (wisi-forward-find-class 'name (point-max))))
-
-    (setq result (wisi-cache-text cache))
+  "Used in `ada-wisi-which-function'."
+  (let* ((cache (wisi-forward-find-class 'name (point-max)))
+         (result (wisi-cache-text cache)))
 
     (when (not ff-function-name)
       (setq ff-function-name
diff --git a/gnat-inspect.el b/gnat-inspect.el
index 5fb2d4b..eb1c488 100644
--- a/gnat-inspect.el
+++ b/gnat-inspect.el
@@ -4,7 +4,7 @@
 ;;; gnatinspect supports Ada and any gcc language that supports the
 ;;; -fdump-xref switch (which includes C, C++).
 ;;
-;;; Copyright (C) 2013, 2014  Free Software Foundation, Inc.
+;;; Copyright (C) 2013-2015  Free Software Foundation, Inc.
 
 ;; Author: Stephen Leake <stephen_leake@member.fsf.org>
 ;; Maintainer: Stephen Leake <stephen_leake@member.fsf.org>
@@ -215,7 +215,7 @@ set compilation-mode with compilation-error-regexp-alist 
set to COMP-ERR."
       (setq result-count (- (line-number-at-pos) 1))
       (if (fboundp 'font-lock-ensure)
           (font-lock-ensure)
-        (font-lock-fontify-buffer))
+        (with-no-warnings (font-lock-fontify-buffer)))
       ;; font-lock-fontify-buffer applies compilation-message text properties
       ;; NOTE: Won't be needed in 24.5 any more, since compilation-next-error
       ;; will apply compilation-message text properties on the fly.
diff --git a/gpr-query.el b/gpr-query.el
index 06ebbb0..7fa91bd 100644
--- a/gpr-query.el
+++ b/gpr-query.el
@@ -256,7 +256,7 @@ set compilation-mode with compilation-error-regexp-alist 
set to COMP-ERR."
 
       (if (fboundp 'font-lock-ensure)
           (font-lock-ensure)
-        (font-lock-fontify-buffer))
+        (with-no-warnings (font-lock-fontify-buffer)))
       ;; font-lock-fontify-buffer applies compilation-message text properties
       ;; FIXME: Won't be needed in 24.5 any more, since compilation-next-error
       ;; will apply compilation-message text properties on the fly.



reply via email to

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