+(defvar hi-lock-string-serialize-hash
+ (make-hash-table :test 'equal)
+ "Hash table used to assign unique numbers to strings.")
+
+(defvar hi-lock-string-serialize-serial 1
+ "Number assigned to last new string in call to `hi-lock-string-serialize'.
+A string is considered new if it had not previously been used in a call to
+`hi-lock-string-serialize'.")
+
+(defun hi-lock-string-serialize (string)
+ "Return unique serial number for STRING."
+ (interactive)
+ (let ((val (gethash string hi-lock-string-serialize-hash)))
+ (if val val
+ (puthash string
+ (setq hi-lock-string-serialize-serial
+ (1+ hi-lock-string-serialize-serial))
+ hi-lock-string-serialize-hash)
+ hi-lock-string-serialize-serial)))
+
+(defun hi-lock-unload-function ()
+ "Unload the Hi-Lock library."
+ (global-hi-lock-mode -1)
+ ;; continue standard unloading
+ nil)
+