33 lines
844 B
EmacsLisp
33 lines
844 B
EmacsLisp
|
;;; packages-funcs.el --- Spacemacs editing Layer packages functions File for Spacemacs
|
|||
|
;;
|
|||
|
;; Copyright (c) 2012-2016 Sylvain Benner & Contributors
|
|||
|
;;
|
|||
|
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
|
|||
|
;; URL: https://github.com/syl20bnr/spacemacs
|
|||
|
;;
|
|||
|
;; This file is not part of GNU Emacs.
|
|||
|
;;
|
|||
|
;;; License: GPLv3
|
|||
|
|
|||
|
|
|||
|
;; uuidgen
|
|||
|
;; TODO spacemacs/uuidgen-3 and spacemacs/uuidgen-5
|
|||
|
|
|||
|
(defun spacemacs/uuidgen-1 (arg)
|
|||
|
"Return a time based UUID (UUIDv1).
|
|||
|
If ARG is non nil then use CID format."
|
|||
|
(interactive "P")
|
|||
|
(let ((uuid (uuidgen-1)))
|
|||
|
(if arg
|
|||
|
(insert-uuid-cid uuid)
|
|||
|
(insert uuid))))
|
|||
|
|
|||
|
(defun spacemacs/uuidgen-4 (arg)
|
|||
|
"Return an UUID from random numbers (UUIDv4).
|
|||
|
If ARG is non nil then use CID format."
|
|||
|
(interactive "P")
|
|||
|
(let ((uuid (uuidgen-4)))
|
|||
|
(if arg
|
|||
|
(insert-uuid-cid uuid)
|
|||
|
(insert uuid))))
|