diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2021-08-19 16:48:59 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2021-08-19 16:48:59 -0700 |
commit | 07fcbb558d797272b9f43547da60beda485873a3 (patch) | |
tree | 77d5da14e9f9d9d8b1d877c70c01296fd3893796 /lisp/cedet/srecode/insert.el | |
parent | c9bdeff3e45a7ac84a74a81bb048046f82dddc91 (diff) | |
parent | fb81c8c3adf8633f2f617c82f6019aef630860c7 (diff) | |
download | emacs-07fcbb558d797272b9f43547da60beda485873a3.tar.gz |
Merge remote-tracking branch 'origin/master' into athena/unstable
Diffstat (limited to 'lisp/cedet/srecode/insert.el')
-rw-r--r-- | lisp/cedet/srecode/insert.el | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/lisp/cedet/srecode/insert.el b/lisp/cedet/srecode/insert.el index ab0503c8d36..f20842b1d8a 100644 --- a/lisp/cedet/srecode/insert.el +++ b/lisp/cedet/srecode/insert.el @@ -89,6 +89,8 @@ DICT-ENTRIES are additional dictionary values to add." ;; for this insertion step. )) +(eieio-declare-slots (point :allocation :class)) + (defun srecode-insert-fcn (template dictionary &optional stream skipresolver) "Insert TEMPLATE using DICTIONARY into STREAM. Optional SKIPRESOLVER means to avoid refreshing the tag list, @@ -134,13 +136,13 @@ has set everything up already." ) (srecode-insert-method template dictionary)) ;; Handle specialization of the POINT inserter. - (when (and (bufferp standard-output) - (slot-boundp 'srecode-template-inserter-point 'point) - ) - (set-buffer standard-output) - (setq end-mark (point-marker)) - (goto-char (oref-default 'srecode-template-inserter-point point))) - (oset-default 'srecode-template-inserter-point point eieio-unbound) + (when (bufferp standard-output) + (let ((point (oref-default 'srecode-template-inserter-point point))) + (when point + (set-buffer standard-output) + (setq end-mark (point-marker)) + (goto-char point)))) + (oset-default 'srecode-template-inserter-point point nil) ;; Return the end-mark. (or end-mark (point))) @@ -733,6 +735,7 @@ DEPTH.") "The character code used to identify inserters of this style.") (point :type (or null marker) :allocation :class + :initform nil :documentation "Record the value of (point) in this class slot. It is the responsibility of the inserter algorithm to clear this |