emacs-diffs
[Top][All Lists]
Advanced

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

master e2abb95b6b: Merge from origin/emacs-29


From: Stefan Kangas
Subject: master e2abb95b6b: Merge from origin/emacs-29
Date: Thu, 12 Jan 2023 00:45:00 -0500 (EST)

branch: master
commit e2abb95b6b03d13e60609ee85ea00bbf44a0bd6b
Merge: c51bfef34a f4f30ff4c4
Author: Stefan Kangas <stefankangas@gmail.com>
Commit: Stefan Kangas <stefankangas@gmail.com>

    Merge from origin/emacs-29
    
    f4f30ff4c44 Update to Org 9.6.1
    09f7a920644 Add support for annotation_type_declaration
    4a8891a462e * etc/NEWS: Mention incompatible changes in 'outline-mino...
    384504edf35 Ensure VC package names are not empty
    70947da708c Handle missing package description when unpacking vc pack...
    
    # Conflicts:
    #       etc/NEWS
---
 etc/NEWS.29                    |  9 +++++++++
 etc/refcards/orgcard.tex       |  2 +-
 lisp/emacs-lisp/package-vc.el  |  8 +++++++-
 lisp/org/org-version.el        |  4 ++--
 lisp/org/org.el                |  2 +-
 lisp/outline.el                | 22 ++++++++++++++++------
 lisp/progmodes/java-ts-mode.el |  8 ++++++--
 7 files changed, 42 insertions(+), 13 deletions(-)

diff --git a/etc/NEWS.29 b/etc/NEWS.29
index a28f5c9a65..16d17821b7 100644
--- a/etc/NEWS.29
+++ b/etc/NEWS.29
@@ -350,6 +350,15 @@ next button, even if the mode has bound it to something 
else.  This
 also means that 'TAB' on a button in an 'outline-minor-mode' heading
 will move point instead of collapsing the outline.
 
+---
+** 'outline-minor-mode-cycle-map' is now parent of 'outline-minor-mode'.
+Instead of adding text property 'keymap' with 'outline-minor-mode-cycle'
+on outline headings in 'outline-minor-mode', the keymap
+'outline-minor-mode-cycle' is now active in the whole buffer.
+But keybindings in 'outline-minor-mode-cycle' still take effect
+only on outline headings because they are bound with the help of
+'outline-minor-mode-cycle--bind' that checks if point is on a heading.
+
 ---
 ** 'Info-default-directory-list' is no longer populated at Emacs startup.
 If you have code in your init file that removes directories from
diff --git a/etc/refcards/orgcard.tex b/etc/refcards/orgcard.tex
index 04d4675615..093dfceafa 100644
--- a/etc/refcards/orgcard.tex
+++ b/etc/refcards/orgcard.tex
@@ -1,5 +1,5 @@
 % Reference Card for Org Mode
-\def\orgversionnumber{9.6}
+\def\orgversionnumber{9.6.1}
 \def\versionyear{2021}          % latest update
 \input emacsver.tex
 
diff --git a/lisp/emacs-lisp/package-vc.el b/lisp/emacs-lisp/package-vc.el
index ddcfe57928..b5b8a6746a 100644
--- a/lisp/emacs-lisp/package-vc.el
+++ b/lisp/emacs-lisp/package-vc.el
@@ -600,10 +600,14 @@ PKG-SPEC is a package specification, a property list 
describing
 how to fetch and build the package.  See `package-vc--archive-spec-alist'
 for details.  The optional argument REV specifies a specific revision to
 checkout.  This overrides the `:branch' attribute in PKG-SPEC."
+  (unless pkg-desc
+    (package-desc-create :name (car pkg-spec) :kind 'vc))
   (pcase-let* (((map :lisp-dir) pkg-spec)
                (name (package-desc-name pkg-desc))
                (dirname (package-desc-full-name pkg-desc))
                (pkg-dir (expand-file-name dirname package-user-dir)))
+    (when (string-empty-p name)
+      (user-error "Empty package name"))
     (setf (package-desc-dir pkg-desc) pkg-dir)
     (when (file-exists-p pkg-dir)
       (if (yes-or-no-p (format "Overwrite previous checkout for package `%s'?" 
name))
@@ -771,7 +775,9 @@ regular package, but it will not remove a VC package.
      (package-vc--archives-initialize)
      (let* ((name-or-url (package-vc--read-package-name
                           "Fetch and install package: " t))
-            (name (file-name-base name-or-url)))
+            (name (file-name-base (directory-file-name name-or-url))))
+       (when (string-empty-p name)
+         (user-error "Empty package name"))
        (list name-or-url
              (and current-prefix-arg :last-release)
              nil
diff --git a/lisp/org/org-version.el b/lisp/org/org-version.el
index 942cc4eae8..43d50e4387 100644
--- a/lisp/org/org-version.el
+++ b/lisp/org/org-version.el
@@ -5,13 +5,13 @@
 (defun org-release ()
   "The release version of Org.
 Inserted by installing Org mode or when a release is made."
-   (let ((org-release "9.6"))
+   (let ((org-release "9.6.1"))
      org-release))
 ;;;###autoload
 (defun org-git-version ()
   "The Git version of Org mode.
 Inserted by installing Org or when a release is made."
-   (let ((org-git-version "release_9.6-90-ga6523f"))
+   (let ((org-git-version "release_9.6.1"))
      org-git-version))
 
 (provide 'org-version)
diff --git a/lisp/org/org.el b/lisp/org/org.el
index 8d226c2c5a..869ff16a6d 100644
--- a/lisp/org/org.el
+++ b/lisp/org/org.el
@@ -9,7 +9,7 @@
 ;; URL: https://orgmode.org
 ;; Package-Requires: ((emacs "25.1"))
 
-;; Version: 9.6
+;; Version: 9.6.1
 
 ;; This file is part of GNU Emacs.
 ;;
diff --git a/lisp/outline.el b/lisp/outline.el
index 91f6040687..0bfda8388e 100644
--- a/lisp/outline.el
+++ b/lisp/outline.el
@@ -209,8 +209,14 @@ This option is only in effect when 
`outline-minor-mode-cycle' is non-nil."
   :version "28.1")
 
 (defvar outline-minor-mode-cycle)
+(defvar outline-minor-mode-cycle-map)
 (defun outline-minor-mode-cycle--bind (map key binding &optional filter)
-  (define-key map key
+  "Define KEY as BINDING in MAP using FILTER.
+The key takes effect only on the following conditions:
+`outline-minor-mode-cycle' is non-nil, point is located on the heading line,
+FILTER or `outline-minor-mode-cycle-filter' is nil or returns non-nil.
+The argument MAP is optional and defaults to `outline-minor-mode-cycle-map'."
+  (define-key (or map outline-minor-mode-cycle-map) key
     `(menu-item
       "" ,binding
       ;; Filter out specific positions on the heading.
@@ -227,8 +233,16 @@ This option is only in effect when 
`outline-minor-mode-cycle' is non-nil."
   (let ((map (make-sparse-keymap)))
     (outline-minor-mode-cycle--bind map (kbd "TAB") #'outline-cycle)
     (outline-minor-mode-cycle--bind map (kbd "<backtab>") 
#'outline-cycle-buffer)
+    (keymap-set map "<left-margin> <mouse-1>" 'outline-cycle)
+    (keymap-set map "<right-margin> <mouse-1>" 'outline-cycle)
+    (keymap-set map "<left-margin> S-<mouse-1>" 'outline-cycle-buffer)
+    (keymap-set map "<right-margin> S-<mouse-1>" 'outline-cycle-buffer)
     map)
-  "Keymap used by `outline-minor-mode-cycle'.")
+  "Keymap used as a parent of the `outline-minor-mode' keymap.
+It contains key bindings that can be used to cycle visibility.
+The recommended way to bind keys is with `outline-minor-mode-cycle--bind'
+when the key should be enabled only when `outline-minor-mode-cycle' is
+non-nil and point is located on the heading line.")
 
 (defvar outline-mode-map
   (let ((map (make-sparse-keymap)))
@@ -518,10 +532,6 @@ See the command `outline-mode' for more information on 
this mode."
   :keymap (define-keymap
             :parent outline-minor-mode-cycle-map
             "<menu-bar>" outline-minor-mode-menu-bar-map
-            "<left-margin> <mouse-1>" 'outline-cycle
-            "<right-margin> <mouse-1>" 'outline-cycle
-            "<left-margin> S-<mouse-1>" 'outline-cycle-buffer
-            "<right-margin> S-<mouse-1>" 'outline-cycle-buffer
             (key-description outline-minor-mode-prefix) 
outline-mode-prefix-map)
   (if outline-minor-mode
       (progn
diff --git a/lisp/progmodes/java-ts-mode.el b/lisp/progmodes/java-ts-mode.el
index 87a4e2b90f..8d432f1774 100644
--- a/lisp/progmodes/java-ts-mode.el
+++ b/lisp/progmodes/java-ts-mode.el
@@ -122,7 +122,8 @@
     "provides" "public" "requires" "return" "sealed"
     "static" "strictfp" "switch" "synchronized"
     "throw" "throws" "to" "transient" "transitive"
-    "try" "uses" "volatile" "while" "with" "record")
+    "try" "uses" "volatile" "while" "with" "record"
+    "@interface")
   "Java keywords for tree-sitter font-locking.")
 
 (defvar java-ts-mode--operators
@@ -183,7 +184,10 @@
    :language 'java
    :override t
    :feature 'type
-   '((interface_declaration
+   '((annotation_type_declaration
+      name: (identifier) @font-lock-type-face)
+
+     (interface_declaration
       name: (identifier) @font-lock-type-face)
 
      (class_declaration



reply via email to

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