Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions flag.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -203,13 +203,12 @@
(export ',flag +flags-package+))))
',flag)))))

(defun* no-prefix-p (name &key (start 0))
(declare (self (string &key fixnum) boolean))
"True if flag NAME starts with the 'no' prefix.
START is the index on the NAME to look for the prefix."
(and (string:prefixp "no" name :start1 start)
(> (length name) (+ 2 start))
(alpha-char-p (char name (+ 2 start)))))
(defun no-prefix-p (name)
(declare (string name))
"True if flag NAME starts with the 'no' prefix."
(and (> (length name) 2) ; the whole flag name can't be just "no"
(string:prefixp "no" name)
(alpha-char-p (char name 2))))

(defun* register (flag names nullablep registry)
"Registers the FLAG and checks for flag name clashes.
Expand Down