+(defun hexl-options (&optional test)
+ "Combine `hexl-bits' with `hexl-options', altering `hexl-options' as needed
+to produce the command line options to pass to the hexl command."
+ (let ((opts (or test hexl-options)))
+ (when (memq hexl-bits '(8 16 32 64))
+ (when (string-match "\\(.*\\)-group-by-[0-9]+-bits\\(.*\\)" opts)
+ (setq opts (concat (match-string 1 opts)
+ (match-string 2 opts))))
+ (setq opts (format "%s -group-by-%d-bits " opts hexl-bits)) )
+ opts))
+