]> code.delx.au - gnu-emacs-elpa/commitdiff
* packages/ada-mode: Miscellaneous tweaks to fix warnings
authorStefan Monnier <monnier@iro.umontreal.ca>
Fri, 19 Jun 2015 01:51:39 +0000 (21:51 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Fri, 19 Jun 2015 01:51:39 +0000 (21:51 -0400)
* 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.

packages/ada-mode/ada-mode.el
packages/ada-mode/ada-skel.el
packages/ada-mode/ada-wisi.el
packages/ada-mode/gnat-inspect.el
packages/ada-mode/gpr-query.el

index 57e5ebc6afad94909c68eabf207ad070c340055b..fc3552efde0917cc9cb393c18598aa805ce31f1d 100644 (file)
@@ -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)
index 95442226ea7d1af88cc3b531ca68e6048de0dd08..e6c5430405ef93a3ea819a233900f8af6c4eb44f 100644 (file)
@@ -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
index a325b0f48e5fb6f0c8d89a4e0cb0349a97614c0b..7bb3bd9e54ad9ecffad9b30e33bb9de6a580c7b9 100644 (file)
@@ -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
index 5fb2d4ba577fe7cfcce11df7ebe42dd32cf3d6d4..eb1c4884500833ccdf623faee569b39b85c3461d 100644 (file)
@@ -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.
index 06ebbb029c70452ded12e2c8870bd1e42dd4e767..7fa91bdcdce35e689b13b8cf90772addbeb36fe9 100644 (file)
@@ -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.