Merged.

Pascal J. Bourguignon [2019-08-27 13:35]
Merged.
Filename
pjb-hash-table.el
pjb-xresources.el
diff --git a/pjb-hash-table.el b/pjb-hash-table.el
deleted file mode 100644
index 50e47d2..0000000
--- a/pjb-hash-table.el
+++ /dev/null
@@ -1,56 +0,0 @@
-;;;; -*- mode:emacs-lisp;coding:utf-8 -*-
-;;;;**************************************************************************
-;;;;FILE:               pjb-hash-table.el
-;;;;LANGUAGE:           emacs lisp
-;;;;SYSTEM:             POSIX
-;;;;USER-INTERFACE:     NONE
-;;;;DESCRIPTION
-;;;;
-;;;;    Implements hash table functions.
-;;;;
-;;;;AUTHORS
-;;;;    <PJB> Pascal J. Bourguignon <pjb@informatimago.com>
-;;;;MODIFICATIONS
-;;;;    2017-01-25 <PJB> Added this header.
-;;;;BUGS
-;;;;LEGAL
-;;;;    AGPL3
-;;;;
-;;;;    Copyright Pascal J. Bourguignon 2017 - 2017
-;;;;
-;;;;    This program is free software: you can redistribute it and/or modify
-;;;;    it under the terms of the GNU Affero General Public License as published by
-;;;;    the Free Software Foundation, either version 3 of the License, or
-;;;;    (at your option) any later version.
-;;;;
-;;;;    This program is distributed in the hope that it will be useful,
-;;;;    but WITHOUT ANY WARRANTY; without even the implied warranty of
-;;;;    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-;;;;    GNU Affero General Public License for more details.
-;;;;
-;;;;    You should have received a copy of the GNU Affero General Public License
-;;;;    along with this program.  If not, see <http://www.gnu.org/licenses/>.
-;;;;**************************************************************************
-(require 'cl)
-
-(defun* hashtable (&key (test (function eql))
-                        (size nil sizep)
-                        (rehash-size nil rehash-size-p)
-                        (rehash-threshold nil rehash-threshold-p)
-                        elements)
-  "Creates a new hash-table, filled with the given ELEMENTS.
-ELEMENTS must be a list of lists of two items, the key and the value.
-Note: we use the name HASHTABLE to avoid name collision."
-  (let ((table (apply (function make-hash-table)
-                      :test test
-                      (append (when sizep
-                                (list :size size))
-                              (when rehash-size-p
-                                (list :rehash-size rehash-size))
-                              (when rehash-threshold-p
-                                (list :rehash-threshold rehash-threshold))))))
-    (dolist (item elements table)
-      (setf (gethash (first item) table) (second item)))))
-
-
-(provide 'pjb-hash-tabl)
diff --git a/pjb-xresources.el b/pjb-xresources.el
index 785cd94..de5dfde 100644
--- a/pjb-xresources.el
+++ b/pjb-xresources.el
@@ -42,7 +42,7 @@ RETURN: The current frame.


 (defmacro define-frame-parameter (name)
-  `(defun ,(intern (format "pjb-frame-%s" name)) (&optional frame)
+  `(defun* ,(intern (format "pjb-frame-%s" name)) (&optional frame)
      (frame-parameter (or frame (selected-frame)) ',name)))

 ;; (dolist (p (frame-parameters)) (insert (format "(define-frame-parameter %s)\n" (car p))))
ViewGit