diff options
| author | Stefan Monnier | 2024-03-03 22:09:19 -0500 |
|---|---|---|
| committer | Stefan Monnier | 2024-03-03 22:09:19 -0500 |
| commit | 1a37fe3a66930bb8151a29c722dbe3bebc20d033 (patch) | |
| tree | 95f878d79fdf1b1346a909c7969355f758e55e79 | |
| parent | 1d9d07fb00e6b62641c07af68f986e700b5f6cee (diff) | |
| download | emacs-1a37fe3a66930bb8151a29c722dbe3bebc20d033.tar.gz emacs-1a37fe3a66930bb8151a29c722dbe3bebc20d033.zip | |
Revert "Set org-macro-templates more lazily"
This reverts commit 99483e214fdafa76e8001c7009dff13a76c33f32.
| -rw-r--r-- | lisp/org/org-macro.el | 8 | ||||
| -rw-r--r-- | lisp/org/org-macs.el | 4 | ||||
| -rw-r--r-- | lisp/org/org.el | 21 |
3 files changed, 15 insertions, 18 deletions
diff --git a/lisp/org/org-macro.el b/lisp/org/org-macro.el index acc8f5e593b..737eab5d2bb 100644 --- a/lisp/org/org-macro.el +++ b/lisp/org/org-macro.el | |||
| @@ -78,14 +78,12 @@ | |||
| 78 | 78 | ||
| 79 | ;;; Variables | 79 | ;;; Variables |
| 80 | 80 | ||
| 81 | (defvar-local org-macro-templates t | 81 | (defvar-local org-macro-templates nil |
| 82 | "Alist containing all macro templates in current buffer. | 82 | "Alist containing all macro templates in current buffer. |
| 83 | Associations are in the shape of (NAME . TEMPLATE) where NAME | 83 | Associations are in the shape of (NAME . TEMPLATE) where NAME |
| 84 | stands for macro's name and template for its replacement value, | 84 | stands for macro's name and template for its replacement value, |
| 85 | both as strings. | 85 | both as strings. This is an internal variable. Do not set it |
| 86 | `t' means that it has not yet been initialized. | 86 | directly, use instead: |
| 87 | |||
| 88 | This is an internal variable. Do not set it directly, use instead: | ||
| 89 | 87 | ||
| 90 | #+MACRO: name template") | 88 | #+MACRO: name template") |
| 91 | 89 | ||
diff --git a/lisp/org/org-macs.el b/lisp/org/org-macs.el index 53943d343d8..aafbdf0e0aa 100644 --- a/lisp/org/org-macs.el +++ b/lisp/org/org-macs.el | |||
| @@ -132,8 +132,6 @@ Version mismatch is commonly encountered in the following situations: | |||
| 132 | 132 | ||
| 133 | ;; Use `with-silent-modifications' to ignore cosmetic changes and | 133 | ;; Use `with-silent-modifications' to ignore cosmetic changes and |
| 134 | ;; `org-unmodified' to ignore real text modifications. | 134 | ;; `org-unmodified' to ignore real text modifications. |
| 135 | ;; FIXME: Won't "real text modifications" break the undo data if | ||
| 136 | ;; `buffer-undo-list' is let-bound to t? | ||
| 137 | (defmacro org-unmodified (&rest body) | 135 | (defmacro org-unmodified (&rest body) |
| 138 | "Run BODY while preserving the buffer's `buffer-modified-p' state." | 136 | "Run BODY while preserving the buffer's `buffer-modified-p' state." |
| 139 | (declare (debug (body))) | 137 | (declare (debug (body))) |
| @@ -143,7 +141,7 @@ Version mismatch is commonly encountered in the following situations: | |||
| 143 | (let ((buffer-undo-list t) | 141 | (let ((buffer-undo-list t) |
| 144 | (inhibit-modification-hooks t)) | 142 | (inhibit-modification-hooks t)) |
| 145 | ,@body) | 143 | ,@body) |
| 146 | (restore-buffer-modified-p ,was-modified))))) | 144 | (set-buffer-modified-p ,was-modified))))) |
| 147 | 145 | ||
| 148 | (defmacro org-with-base-buffer (buffer &rest body) | 146 | (defmacro org-with-base-buffer (buffer &rest body) |
| 149 | "Run BODY in base buffer for BUFFER. | 147 | "Run BODY in base buffer for BUFFER. |
diff --git a/lisp/org/org.el b/lisp/org/org.el index 3fb8fce78d3..d361408eaca 100644 --- a/lisp/org/org.el +++ b/lisp/org/org.el | |||
| @@ -716,9 +716,8 @@ defined in org-duration.el.") | |||
| 716 | "Load all extensions listed in `org-modules'." | 716 | "Load all extensions listed in `org-modules'." |
| 717 | (when (or force (not org-modules-loaded)) | 717 | (when (or force (not org-modules-loaded)) |
| 718 | (dolist (ext org-modules) | 718 | (dolist (ext org-modules) |
| 719 | (condition-case err (require ext) | 719 | (condition-case nil (require ext) |
| 720 | (error (message "Problems while trying to load feature `%s':\n%S" | 720 | (error (message "Problems while trying to load feature `%s'" ext)))) |
| 721 | ext err)))) | ||
| 722 | (setq org-modules-loaded t))) | 721 | (setq org-modules-loaded t))) |
| 723 | 722 | ||
| 724 | (defun org-set-modules (var value) | 723 | (defun org-set-modules (var value) |
| @@ -856,7 +855,7 @@ depends on, if any." | |||
| 856 | :group 'org-export | 855 | :group 'org-export |
| 857 | :version "26.1" | 856 | :version "26.1" |
| 858 | :package-version '(Org . "9.0") | 857 | :package-version '(Org . "9.0") |
| 859 | :initialize #'custom-initialize-set | 858 | :initialize 'custom-initialize-set |
| 860 | :set (lambda (var val) | 859 | :set (lambda (var val) |
| 861 | (if (not (featurep 'ox)) (set-default-toplevel-value var val) | 860 | (if (not (featurep 'ox)) (set-default-toplevel-value var val) |
| 862 | ;; Any back-end not required anymore (not present in VAL and not | 861 | ;; Any back-end not required anymore (not present in VAL and not |
| @@ -906,9 +905,9 @@ depends on, if any." | |||
| 906 | 905 | ||
| 907 | (eval-after-load 'ox | 906 | (eval-after-load 'ox |
| 908 | '(dolist (backend org-export-backends) | 907 | '(dolist (backend org-export-backends) |
| 909 | (condition-case err (require (intern (format "ox-%s" backend))) | 908 | (condition-case nil (require (intern (format "ox-%s" backend))) |
| 910 | (error (message "Problems while trying to load export back-end `%s':\n%S" | 909 | (error (message "Problems while trying to load export back-end `%s'" |
| 911 | backend err))))) | 910 | backend))))) |
| 912 | 911 | ||
| 913 | (defcustom org-support-shift-select nil | 912 | (defcustom org-support-shift-select nil |
| 914 | "Non-nil means make shift-cursor commands select text when possible. | 913 | "Non-nil means make shift-cursor commands select text when possible. |
| @@ -4773,7 +4772,7 @@ This is for getting out of special buffers like capture.") | |||
| 4773 | (require 'org-pcomplete) | 4772 | (require 'org-pcomplete) |
| 4774 | (require 'org-src) | 4773 | (require 'org-src) |
| 4775 | (require 'org-footnote) | 4774 | (require 'org-footnote) |
| 4776 | ;; (require 'org-macro) | 4775 | (require 'org-macro) |
| 4777 | 4776 | ||
| 4778 | ;; babel | 4777 | ;; babel |
| 4779 | (require 'ob) | 4778 | (require 'ob) |
| @@ -4853,6 +4852,8 @@ The following commands are available: | |||
| 4853 | (when (and org-element-cache-persistent | 4852 | (when (and org-element-cache-persistent |
| 4854 | org-element-use-cache) | 4853 | org-element-use-cache) |
| 4855 | (org-persist-load 'org-element--cache (current-buffer) t)) | 4854 | (org-persist-load 'org-element--cache (current-buffer) t)) |
| 4855 | ;; Initialize macros templates. | ||
| 4856 | (org-macro-initialize-templates) | ||
| 4856 | ;; Initialize radio targets. | 4857 | ;; Initialize radio targets. |
| 4857 | (org-update-radio-target-regexp) | 4858 | (org-update-radio-target-regexp) |
| 4858 | ;; Indentation. | 4859 | ;; Indentation. |
| @@ -10458,7 +10459,7 @@ EXTRA is additional text that will be inserted into the notes buffer." | |||
| 10458 | org-log-note-this-command this-command | 10459 | org-log-note-this-command this-command |
| 10459 | org-log-note-recursion-depth (recursion-depth) | 10460 | org-log-note-recursion-depth (recursion-depth) |
| 10460 | org-log-setup t) | 10461 | org-log-setup t) |
| 10461 | (add-hook 'post-command-hook #'org-add-log-note 'append)) | 10462 | (add-hook 'post-command-hook 'org-add-log-note 'append)) |
| 10462 | 10463 | ||
| 10463 | (defun org-skip-over-state-notes () | 10464 | (defun org-skip-over-state-notes () |
| 10464 | "Skip past the list of State notes in an entry." | 10465 | "Skip past the list of State notes in an entry." |
| @@ -10487,7 +10488,7 @@ EXTRA is additional text that will be inserted into the notes buffer." | |||
| 10487 | "Pop up a window for taking a note, and add this note later." | 10488 | "Pop up a window for taking a note, and add this note later." |
| 10488 | (when (and (equal org-log-note-this-command this-command) | 10489 | (when (and (equal org-log-note-this-command this-command) |
| 10489 | (= org-log-note-recursion-depth (recursion-depth))) | 10490 | (= org-log-note-recursion-depth (recursion-depth))) |
| 10490 | (remove-hook 'post-command-hook #'org-add-log-note) | 10491 | (remove-hook 'post-command-hook 'org-add-log-note) |
| 10491 | (setq org-log-setup nil) | 10492 | (setq org-log-setup nil) |
| 10492 | (setq org-log-note-window-configuration (current-window-configuration)) | 10493 | (setq org-log-note-window-configuration (current-window-configuration)) |
| 10493 | (delete-other-windows) | 10494 | (delete-other-windows) |