The hash table printing code has some oddities: it will print extra spaces sometimes, won't print as many elements as requested under all circumstances, and behave oddly for empty hash tables when print-length is 0. Currently, this code will result in extra spaces in the hash table output: (let ((h (make-hash-table))) (puthash 1 2 h) (puthash 2 3 h) (remhash 1 h) (format "%S" h)) (let ((h (make-hash-table))) (let ((print-length 0)) (format "%S" h))) In the latter case, the output actually includes "data ( ...)", though "data ()" would be shorter and more accurate. Also, the current code contains an oddity that would make it print fewer than print-length hash cells in the data list: (let ((h (make-hash-table))) (dotimes (i 100) (puthash i i h)) (dotimes (i 99) (remhash i h)) (let ((print-length 1)) (format "%S" h))) will produce "data ( ...)", when it should produce "data (99 99)". Proposed patch attached.