]> code.delx.au - gnu-emacs/blobdiff - lisp/cedet/srecode/insert.el
Update copyright year to 2016
[gnu-emacs] / lisp / cedet / srecode / insert.el
index 426e07839829b3569815f499e7fa1d5fcfa306fc..19999a6fd993888906d9e80c1339b4f27b10fece 100644 (file)
@@ -1,6 +1,6 @@
 ;;; srecode/insert.el --- Insert srecode templates to an output stream.
 
-;; Copyright (C) 2005, 2007-2015 Free Software Foundation, Inc.
+;; Copyright (C) 2005, 2007-2016 Free Software Foundation, Inc.
 
 ;; Author: Eric M. Ludlam <zappo@gnu.org>
 
@@ -35,7 +35,6 @@
 (require 'srecode/args)
 (require 'srecode/filters)
 
-(defvar srecode-template-inserter-point)
 (declare-function srecode-overlaid-activate "srecode/fields")
 (declare-function srecode-template-inserted-region "srecode/fields")
 
@@ -46,9 +45,9 @@
 Only the ASK style inserter will query the user for a value.
 Dictionary value references that ask begin with the ? character.
 Possible values are:
-  'ask   - Prompt in the minibuffer as the value is inserted.
-  'field - Use the dictionary macro name as the inserted value,
-           and place a field there.  Matched fields change together.
+  `ask'   - Prompt in the minibuffer as the value is inserted.
+  `field' - Use the dictionary macro name as the inserted value,
+            and place a field there.  Matched fields change together.
 
 NOTE: The field feature does not yet work with XEmacs."
   :group 'srecode
@@ -145,7 +144,7 @@ has set everything up already."
               )
       (set-buffer standard-output)
       (setq end-mark (point-marker))
-      (goto-char  (oref srecode-template-inserter-point point)))
+      (goto-char  (oref-default 'srecode-template-inserter-point point)))
     (oset-default 'srecode-template-inserter-point point eieio-unbound)
 
     ;; Return the end-mark.
@@ -217,7 +216,7 @@ insertions."
     (data-debug-insert-thing dictionary "" "> ")
     ;; Show the error message.
     (insert (propertize "Error" 'face '(:weight bold)) "\n")
-    (insert (apply #'format format args))
+    (insert (apply #'format-message format args))
     (pop-to-buffer (current-buffer))))
 
 (defun srecode-insert-report-error (dictionary format &rest args)
@@ -378,9 +377,9 @@ Can't be blank, or it might be used by regular variable insertion.")
     (where :initform 'begin
           :initarg :where
           :documentation
-          "This should be 'begin or 'end, indicating where to insert a CR.
-When set to 'begin, it will insert a CR if we are not at 'bol'.
-When set to 'end it will insert a CR if we are not at 'eol'.")
+          "This should be `begin' or `end', indicating where to insert a CR.
+When `begin', insert a CR if not at 'bol'.
+When `end', insert a CR if not at 'eol'.")
     ;; @TODO - Add slot and control for the number of blank
     ;;         lines before and after point.
    )
@@ -763,7 +762,7 @@ Arguments ESCAPE-START and ESCAPE-END are the current escape sequences in use."
 (cl-defmethod srecode-insert-method ((sti srecode-template-inserter-point)
                                  dictionary)
   "Insert the STI inserter.
-Save point in the class allocated 'point' slot.
+Save point in the class allocated `point' slot.
 If `srecode-template-inserter-point-override' non-nil then this
 generalized marker will do something else.  See
 `srecode-template-inserter-include-wrap' as an example."