Download
(eval-when-compile (require 'cl))
(unless (and (intern-soft "*IS-MON-OBARRAY*")
(bound-and-true-p *IS-MON-OBARRAY*))
(setq *IS-MON-OBARRAY* (make-vector 17 nil)))
(defvar *mon-special-forms-types*
'(setq quote let let*
and or if cond while
progn prog1 prog2 unwind-protect catch condition-case
defun defmacro function defconst defvar
setq-default
interactive
save-excursion save-restriction save-current-buffer save-window-excursion
with-output-to-temp-buffer
track-mouse
)
"List of Emacs lisp special forms.\n
:NOTE List does not include following symbols:\n
`eval-and-compile' `eval-when-compile' `with-no-warnings'\n
These are defined in :FILE lisp/emacs-lisp/byte-run.el\n
:SEE info node `(elisp)Special Forms'\n
:SEE-ALSO `*mon-function-object-types*',
`*mon-equality-or-predicate-function-types*', `*mon-non-mappable-object-types*',
`*mon-help-subrs*', `*mon-help-side-effect-free*',
`*mon-help-side-effect-and-error-free*', `*mon-help-pure-functions*',
`*mon-help-permanent-locals*', `*mon-function-object-types*',
`*mon-equality-or-predicate-function-types*', `*mon-non-mappable-object-types*',
`*mon-help-risky-local-variables*', `mon-help-symbol-functions'.\n►►►")
(defvar *mon-non-mappable-object-types*
'(compiled-function subr
hash-table char-table
integer marker float
buffer overlay
frame window window-configuration
process
font-entity font-object font-spec
t)
"List of Emacs object types which are not mappable.\n
A \"mappable\" object is one which by can occur as a SEQUENCE arge to:\n
`mapc' `mapcar' `mapconcat'\n
:EXAMPLE\n\n\(memq 'process *mon-non-mappable-object-types*\)\n
\(not \(memq 'cons *mon-non-mappable-object-types*\)\)\n
:NOTE Objects of type `hash-table' are mappable with `maphash'.\n
:NOTE For `nil' and empty list `type-of' returns `symbol' which is why it isn't
provided by the current list.\n
:SEE info node `(elisp)Type Predicates'
:SEE info node `(elisp) Lisp Data Types'\n
:SEE-ALSO `mon-sequence-mappable-p', `mon-hash-or-mappable-p',
`mon-list-proper-p', `mon-booleanp',
`*mon-equality-or-predicate-function-types*', `*mon-function-object-types*',
`*mon-special-forms-types*', `*mon-help-emacs-errors*',
`*mon-help-side-effect-free*', `*mon-help-side-effect-and-error-free*',
`*mon-help-pure-functions*', `*mon-help-permanent-locals*',
`*mon-help-byte-optimizer-vals*', `*mon-help-risky-local-variables*',
`byte-boolean-vars', `mon-map-obarray-symbol-plist-props',
`mon-help-byte-optimizer-find'.\n►►►")
(defcustom *mon-equality-or-predicate-function-types*
'(eq eql equal
memq memql member
member-ignore-case
> < <= >= =
assq assoc rassq rassoc
assoc-default assoc-ignore-representation
string-equal string-lessp
string-match-p string-prefix-p
equal-including-properties
car-less-than-car
char-equal
subregexp-context-p
file-attributes-lessp
file-newer-than-file-p
bw-eqdir
equalp subsetp tailp typep
time-less-p
timer--time-less-p
tramp-equal-remote tramp-time-less-p
customize-version-lessp
version-list-< version-list-=
version-list-<= version< version<= version=
face-equal internal-lisp-face-equal-p
facemenu-color-equal
erc-port-equal
ediff-mark-if-equal
mon-file-older-than-file-p
)
"List of predicates or two argument predicate-like functions.\n
For use with `mon-equality-or-predicate'.\n
:EXAMPLE\n\n\(memq 'equalp *mon-equality-or-predicate-function-types*\)\n
\(not \(memq 'subrp *mon-equality-or-predicate-function-types*\)\)\n
:SEE info node `(elisp)Type Predicates'\n
:SEE-ALSO `mon-equality-for-type',`*mon-function-object-types*',
`*mon-special-forms-types*', `*mon-non-mappable-object-types*',
`*mon-help-side-effect-free*' `*mon-help-side-effect-and-error-free*',
`*mon-help-pure-functions*', `*mon-help-permanent-locals*',
`*mon-help-byte-optimizer-vals*', `*mon-help-permanent-locals*',
`*mon-help-risky-local-variables*', `*mon-help-emacs-errors*', `mon-booleanp',
`byte-boolean-vars', `mon-map-obarray-symbol-plist-props',
`mon-help-byte-optimizer-find'.\n►►►"
:type '(repeat symbol)
:group 'mon-type-utils
:group 'mon-base)
(defvar *mon-function-object-types* '(function compiled-function
subr macro lambda autoload)
"List of return values for `mon-function-object-p' which name function objects.\n
:EXAMPLE\n\n\(memq 'function *mon-function-object-types*\)\n
\(car \(memq \(mon-function-object-p 'mon-function-object-p\)
*mon-function-object-types*\)\)\n
:SEE-ALSO `functionp', `indirect-function', `symbol-function', `apropos-macrop',
`edebug-macrop', `commandp', `*mon-equality-or-predicate-function-types*',
`*mon-non-mappable-object-types*', `*mon-help-emacs-errors*'.\n►►►")
(defvar *mon-ascii-alpha-chars* (make-vector 256 nil)
"A 256 elt simple array with indexes for the ASCII alpha chars 65-90 and 92-122.\n
:EXAMPLE\n\n\(aref *mon-ascii-alpha-chars* ?A\)\n
\(eq \(aref *mon-ascii-alpha-chars* ?A\) ?A\)\n
\(mapcar #'\(lambda \(alpha-char\)
\(char-to-string \(aref *mon-ascii-alpha-chars* alpha-char\)\)\)
\(append \(number-sequence 65 90\) \(number-sequence 97 122\)\)\)\n
\(aref *mon-digit-chars* \(car *mon-digit-registers*\)\)\n
:SEE-ALSO `*mon-digit-chars*', `*mon-whitespace-chars*', `*mon-digit-registers*',
`*mon-cntl-char-registers*', `mon-help-ascii-chars'.\n►►►")
(unless (eq (aref *mon-ascii-alpha-chars* ?A) ?A)
(loop for U from ?A to ?Z
for D from ?a to ?z
do (aset *mon-ascii-alpha-chars* U U)
(aset *mon-ascii-alpha-chars* D D)))
(defvar *mon-whitespace-chars* '(12 11 13 10 9 32)
"List of ASCII whitespace chars.\n
List includes:\n
SPACE \\x20 (32, #o40, #x20)
CHARACTER TABULATION \\x9 ( 9, #o11, #x9)
LINE FEED (LF) \\xa C-j (10, #o12, #xa)
LINE TABULATION \xb C-k (11, #o13, #xb)
FORM FEED (FF) \xc C-l (12, #o14, #xc)
CARRIAGE RETURN (CR) \xd (13, #o15, #xd)\n
:EXAMPLE\n\n\(mapcar #'char-to-string *mon-whitespace-chars*\)\n
\(memq (string-to-char \"\\xb\") *mon-whitespace-chars*\)\n
:NOTE Order of list elements is specified least to most important. This provides
a handle for reductive queries which further filter their return value, e.g.:\n
\(let \(\(some-char-val 10\) wspc-myb\)
\(prog2
\(setq wspc-myb \(memq some-char-val *mon-whitespace-chars*\)\)
\(and wspc-myb \(or \(and \(= \(car wspc-myb\) 32\) 32\)
\(and \(= \(car wspc-myb\) 9\) 9\)
\(car wspc-myb\)\)\)\)\)\n
:ALIASED-BY `*whitespace-chars*'\n
:SEE-ALSO `*mon-digit-chars*', `*mon-ascii-alpha-chars*',
`*regexp-whitespace-chars*', `mon-help-ascii-chars', `mon-spacep',
`mon-spacep-is-bol', `mon-spacep-not-bol', `mon-spacep', `mon-line-bol-is-eol',
`mon-line-next-bol-is-eol', `mon-line-previous-bol-is-eol',
`mon-spacep-is-after-eol', `mon-cln-spc-tab-eol'`mon-skip-whitespace',
`mon-cln-BIG-whitespace' `mon-cln-trail-whitespace', `mon-cln-whitespace',
`mon-insert-whitespace', `mon-kill-whitespace'.\n►►►")
(provide 'mon-type-utils-vars)