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

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

[elpa] externals/ada-mode fa4f86a75b 1/6: Release ada-mode 7.2.1; minor


From: Stephen Leake
Subject: [elpa] externals/ada-mode fa4f86a75b 1/6: Release ada-mode 7.2.1; minor bug fixes
Date: Sun, 10 Jul 2022 12:58:52 -0400 (EDT)

branch: externals/ada-mode
commit fa4f86a75b54d30fdc4f9bbf3ceeac24d2ab5e0b
Author: Stephen Leake <stephen_leake@stephe-leake.org>
Commit: Stephen Leake <stephen_leake@stephe-leake.org>

    Release ada-mode 7.2.1; minor bug fixes
    
    * ada-gnat-xref.el (ada-gnat-xref-refs): Fix 'oref' syntax.
    * gpr-query.el (gpr-query-tree-refs):
    
    * ada-mode.el: Bump version.
    (ada-find-file): Use (if (boundp project-read-file-name-function)) rather
    than emacs-major-version. Bind project-read-file-name-function here.
    
    * NEWS: Version.
    
    * README: Version.
    
    * ada-mode.texi: Version.
---
 NEWS             | 14 ++++++++++++++
 README           |  2 +-
 ada-gnat-xref.el | 12 ++++++------
 ada-mode.el      | 40 ++++++++++++++++++++--------------------
 ada-mode.texi    |  6 +++---
 gpr-query.el     | 12 ++++++------
 6 files changed, 50 insertions(+), 36 deletions(-)

diff --git a/NEWS b/NEWS
index fe3e518f11..e46c3e3650 100644
--- a/NEWS
+++ b/NEWS
@@ -6,6 +6,20 @@ Please send ada-mode bug reports to bug-gnu-emacs@gnu.org, with
 'ada-mode' in the subject. If possible, use M-x report-emacs-bug.
 
 
+* Ada Mode 7.2.1
+
+** More fixes for xref-file-location syntax, required by Emacs 28.
+
+** Adapt to change in uniquify-files.
+   uniquify-files no longer sets project-read-file-name-function by
+   default.  ada-find-file (C-c C-t) will still use this package's
+   completion style, but project-find-file (C-x p f) will not by
+   default.
+
+   Set project-read-file-name-function to uniq-file-read if you would
+   like to keep using uniquify-files's completion style outside of
+   ada-find-file.
+
 * Ada Mode 7.2.0
 21 Nov 2021
 
diff --git a/README b/README
index 00bd1a9df5..2ef27e3595 100644
--- a/README
+++ b/README
@@ -1,4 +1,4 @@
-Emacs Ada mode version 7.2.0
+Emacs Ada mode version 7.2.1
 
 Ada mode provides auto-casing, fontification, navigation, and
 indentation for Ada source code files.
diff --git a/ada-gnat-xref.el b/ada-gnat-xref.el
index a48338f173..6ddb49de95 100644
--- a/ada-gnat-xref.el
+++ b/ada-gnat-xref.el
@@ -5,7 +5,7 @@
 ;;
 ;; GNAT is provided by AdaCore; see http://libre.adacore.com/
 ;;
-;;; Copyright (C) 2012 - 2021  Free Software Foundation, Inc.
+;;; Copyright (C) 2012 - 2022  Free Software Foundation, Inc.
 ;;
 ;; Author: Stephen Leake <stephen_leake@member.fsf.org>
 ;; Maintainer: Stephen Leake <stephen_leake@member.fsf.org>
@@ -142,17 +142,17 @@ elements of the result may be nil."
 (defun ada-gnat-xref-refs (project item all)
   ;; WORKAROUND: xref 1.3.2 xref-location changed from defclass to cl-defstruct
   (with-no-warnings ;; "unknown slot"
-    (let ((summary (if (functionp 'xref-item-summary) (xref-item-summary item) 
(oref item :summary)))
-         (location (if (functionp 'xref-item-location) (xref-item-location 
item) (oref item :location))))
+    (let ((summary (if (functionp 'xref-item-summary) (xref-item-summary item) 
(oref item summary)))
+         (location (if (functionp 'xref-item-location) (xref-item-location 
item) (oref item location))))
       (let ((file (if (functionp 'xref-file-location-file)
                      (xref-file-location-file location)
-                   (oref location :file)))
+                   (oref location file)))
            (line (if (functionp 'xref-file-location-line)
                      (xref-file-location-line location)
-                   (oref location :line)))
+                   (oref location line)))
            (column (if (functionp 'xref-file-location-column)
                        (xref-file-location-column location)
-                     (oref location :column))))
+                     (oref location column))))
        (let* ((wisi-xref-full-path t)
               (args (cons "-r" (ada-gnat-xref-common-args project summary file 
line column)))
               (result nil))
diff --git a/ada-mode.el b/ada-mode.el
index a65c7b47da..5b655e5fca 100644
--- a/ada-mode.el
+++ b/ada-mode.el
@@ -1,13 +1,13 @@
 ;;; ada-mode.el --- major-mode for editing Ada sources  -*- lexical-binding:t 
-*-
 ;;
-;; Copyright (C) 1994, 1995, 1997 - 2021  Free Software Foundation, Inc.
+;; Copyright (C) 1994, 1995, 1997 - 2022  Free Software Foundation, Inc.
 ;;
 ;; Author: Stephen Leake <stephen_leake@stephe-leake.org>
 ;; Maintainer: Stephen Leake <stephen_leake@stephe-leake.org>
 ;; Keywords: languages
 ;;  ada
-;; Version: 7.2.0
-;; package-requires: ((uniquify-files "1.0.1") (wisi "3.1.5") (emacs "25.3"))
+;; Version: 7.2.1
+;; package-requires: ((uniquify-files "1.0.1") (wisi "3.1.8") (emacs "25.3"))
 ;; url: http://www.nongnu.org/ada-mode/
 ;;
 ;; This file is part of GNU Emacs.
@@ -1462,24 +1462,24 @@ For `wisi-indent-calculate-functions'.
   "Find a file in the current project.
 Prompts with completion, defaults to filename at point."
   (interactive)
-  ;; In emacs 27, we can just call 'project-find-file;
-  ;; project-read-file-name-function handles the uniquify-files alist
+  ;; In emacs 27, we can set project-read-file-name-function to
+  ;; tell 'project-find-file to use the uniquify-files alist
   ;; completion table. In emacs 26, we must do that ourselves.
-  (cl-ecase emacs-major-version
-    (27
-     (project-find-file))
-
-    (26
-     (let* ((def (thing-at-point 'filename))
-           (project (project-current))
-           (all-files (project-files project nil))
-           (alist (uniq-file-uniquify all-files))
-           (table (apply-partially #'uniq-file-completion-table alist))
-            (file (project--completing-read-strict
-                   "Find file" table nil nil def)))
-       (if (string= file "")
-           (user-error "You didn't specify the file")
-        (find-file (cdr (assoc file alist))))))
+  (require 'project)
+  (if (boundp 'project-read-file-name-function)
+      (let ((project-read-file-name-function #'uniq-file-read))
+        (project-find-file))
+
+    (let* ((def (thing-at-point 'filename))
+          (project (project-current))
+          (all-files (project-files project nil))
+          (alist (uniq-file-uniquify all-files))
+          (table (apply-partially #'uniq-file-completion-table alist))
+           (file (project--completing-read-strict
+                  "Find file" table nil nil def)))
+      (if (string= file "")
+          (user-error "You didn't specify the file")
+       (find-file (cdr (assoc file alist)))))
     ))
 
 ;;;; compatibility with previous ada-mode versions
diff --git a/ada-mode.texi b/ada-mode.texi
index a5a1dbcc29..3612878443 100644
--- a/ada-mode.texi
+++ b/ada-mode.texi
@@ -2,7 +2,7 @@
 @settitle Ada Mode
 
 @copying
-Copyright @copyright{} 1999 - 2021  Free Software Foundation, Inc.
+Copyright @copyright{} 1999 - 2022  Free Software Foundation, Inc.
 
 @quotation
 Permission is granted to copy, distribute and/or modify this document
@@ -25,7 +25,7 @@ developing GNU and promoting software freedom.''
 
 @titlepage
 @sp 10
-@title Ada Mode Version 7.2.0
+@title Ada Mode Version 7.2.1
 @page
 @vskip 0pt plus 1filll
 @insertcopying
@@ -37,7 +37,7 @@ developing GNU and promoting software freedom.''
 @node Top, Overview, (dir), (dir)
 @top Top
 
-Ada Mode Version 7.2.0
+Ada Mode Version 7.2.1
 @end ifnottex
 
 @menu
diff --git a/gpr-query.el b/gpr-query.el
index da3a8e4932..c6dbad49fa 100644
--- a/gpr-query.el
+++ b/gpr-query.el
@@ -3,7 +3,7 @@
 ;; gpr-query supports Ada and any gcc language that supports the
 ;; AdaCore -fdump-xref switch (which includes C, C++).
 ;;
-;; Copyright (C) 2013 - 2021  Free Software Foundation, Inc.
+;; Copyright (C) 2013 - 2022  Free Software Foundation, Inc.
 
 ;; Author: Stephen Leake <stephen_leake@member.fsf.org>
 ;; Maintainer: Stephen Leake <stephen_leake@member.fsf.org>
@@ -722,18 +722,18 @@ FILE is from gpr-query."
   "Run gpr_query tree command OP on ITEM (an xref-item), return list of 
xref-items."
   ;; WORKAROUND: xref 1.3.2 xref-location changed from defclass to cl-defstruct
   (with-no-warnings ;; "unknown slot"
-    (let ((summary (if (functionp 'xref-item-summary) (xref-item-summary item) 
(oref item :summary)))
-         (location (if (functionp 'xref-item-location) (xref-item-location 
item) (oref item :location)))
+    (let ((summary (if (functionp 'xref-item-summary) (xref-item-summary item) 
(oref item summary)))
+         (location (if (functionp 'xref-item-location) (xref-item-location 
item) (oref item location)))
          (eieio-skip-typecheck t)) ;; 'location' may have line, column nil
       (let ((file (if (functionp 'xref-file-location-file)
                      (xref-file-location-file location)
-                   (oref location :file)))
+                   (oref location file)))
            (line (if (functionp 'xref-file-location-line)
                      (xref-file-location-line location)
-                   (oref location :line)))
+                   (oref location line)))
            (column (if (functionp 'xref-file-location-column)
                        (xref-file-location-column location)
-                     (oref location :column))))
+                     (oref location column))))
 
        (when (eq ?\" (aref summary 0))
          ;; gpr_query wants the quotes stripped



reply via email to

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