You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As a long-term follow up to Issue#61, it would be best to go through all regexps in this mode and set case-fold-search nil, or perhaps to define a version of looking-at which will always be case-sensitive regardless of the value of case-fold-search.
(In this particular case, the behavior with case-folding is a little more convenient, because if a user attempts to use a lowercase letter as a flag, he can correct his mistake using beancount-transaction-clear or beancount-transaction-flag, which would not be possible if the regexp match failed.
That said, in general, the code would be more precise if every regexp match were case-sensitive.
(defun beancount-transaction-clear (&optional arg)
"Clear transaction at point. With a prefix argument set the
transaction as pending."
(interactive "P")
(save-excursion
(save-match-data
(let ((case-fold-search nil))
(let ((flag (if arg "!" "*")))
(beancount-goto-transaction-begin)
(if (looking-at beancount-transaction-regexp)
(replace-match flag t t nil 2)))))))
The text was updated successfully, but these errors were encountered:
As a long-term follow up to Issue#61, it would be best to go through all regexps in this mode and set
case-fold-search nil
, or perhaps to define a version oflooking-at
which will always be case-sensitive regardless of the value ofcase-fold-search
.(In this particular case, the behavior with case-folding is a little more convenient, because if a user attempts to use a lowercase letter as a flag, he can correct his mistake using
beancount-transaction-clear
orbeancount-transaction-flag
, which would not be possible if the regexp match failed.That said, in general, the code would be more precise if every regexp match were case-sensitive.
The text was updated successfully, but these errors were encountered: