diff --git a/etc/NEWS.29 b/etc/NEWS.29 index a28f5c9a65a..16d17821b78 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 04d46756155..093dfceafa7 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 ddcfe57928b..b5b8a6746a6 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 942cc4eae8b..43d50e4387f 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 8d226c2c5ab..869ff16a6da 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 91f6040687b..0bfda8388ed 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 "") #'outline-cycle-buffer) + (keymap-set map " " 'outline-cycle) + (keymap-set map " " 'outline-cycle) + (keymap-set map " S-" 'outline-cycle-buffer) + (keymap-set map " S-" '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 "" outline-minor-mode-menu-bar-map - " " 'outline-cycle - " " 'outline-cycle - " S-" 'outline-cycle-buffer - " S-" '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 87a4e2b90f8..8d432f1774e 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