]> code.delx.au - gnu-emacs-elpa/blobdiff - packages/ada-mode/gpr-skel.el
Merge commit 'affdc4611d859e6f643e38c2ed9ad83debb92633'
[gnu-emacs-elpa] / packages / ada-mode / gpr-skel.el
old mode 100755 (executable)
new mode 100644 (file)
index 2ddc5d1..08a8d6d
@@ -1,6 +1,6 @@
-;;; gpr-skel.el --- an extension to Gpr mode for inserting statement skeletons
+;;; gpr-skel.el --- an extension to Gpr mode for inserting statement skeletons  -*- lexical-binding:t -*-
 
-;; Copyright (C) 2013, 2014 Free Software Foundation, Inc.
+;; Copyright (C) 2013-2015 Free Software Foundation, Inc.
 
 ;; Authors: Stephen Leake <stephen_leake@stephe-leake.org>
 
 ;;;;; user variables, example skeletons intended to be overwritten
 
 (defcustom gpr-skel-initial-string "{header}\n{project}"
-  "*String to insert in empty buffer.
+  "String to insert in empty buffer.
 This could end in a token recognized by `gpr-skel-expand'."
   :type 'string
-  :group 'gpr
-  :safe 'stringp)
+  :group 'gpr                           ;FIXME: Unknown!
+  :safe #'stringp)
 
 (define-skeleton gpr-skel-user-restricted
   "Example copyright/license skeleton, with automatic year and owner."
@@ -213,15 +213,15 @@ it is a name, and use the word before that as the token."
       ;; hippie is asking us to try the "next" completion; we don't have one
       nil
     (let ((pos (point))
-         (undo-len (length pending-undo-list)))
+         (undo-len (if (sequencep pending-undo-list) (length pending-undo-list) 0)))
       (undo-boundary)
       (condition-case nil
          (progn
            (skeleton-expand)
            t)
-       ('error
+       (error
         ;; undo hook action if any
-        (unless (= undo-len (length pending-undo-list))
+        (unless (= undo-len (if (sequencep pending-undo-list) (length pending-undo-list) 0))
           (undo))
 
         ;; undo motion
@@ -264,8 +264,8 @@ it is a name, and use the word before that as the token."
 (provide 'gpr-skeletons)
 (provide 'gpr-skel)
 
-(setq gpr-expand 'skeleton-expand)
+(setq gpr-expand #'skeleton-expand)
 
-(add-hook 'gpr-mode-hook 'gpr-skel-setup)
+(add-hook 'gpr-mode-hook #'gpr-skel-setup)
 
 ;;; end of file