@@ -1123,11 +1123,10 @@ with UNIVERSAL ARGUMENT, search both side."
1123
1123
(forward-char 1 )
1124
1124
(point ))))))
1125
1125
1126
- (defun meow-find (n &optional prompt expand )
1126
+ (defun meow-find (n ch &optional expand )
1127
1127
" Find the next N char read from minibuffer."
1128
- (interactive " p" )
1128
+ (interactive " p\n cFind: " )
1129
1129
(let* ((case-fold-search nil )
1130
- (ch (read-char (or prompt (message " Find(%d ): " n))))
1131
1130
(ch-str (if (eq ch 13 ) " \n " (char-to-string ch)))
1132
1131
(beg (point ))
1133
1132
end)
@@ -1143,15 +1142,14 @@ with UNIVERSAL ARGUMENT, search both side."
1143
1142
(meow--maybe-highlight-num-positions
1144
1143
'(meow--find-continue-backward . meow--find-continue-forward)))))
1145
1144
1146
- (defun meow-find-expand (n )
1147
- (interactive " p" )
1148
- (meow-find n ( message " Expand find( %d ): " n) t ))
1145
+ (defun meow-find-expand (n ch )
1146
+ (interactive " p\n cExpand find: " )
1147
+ (meow-find n ch t ))
1149
1148
1150
- (defun meow-till (n &optional prompt expand )
1149
+ (defun meow-till (n ch &optional expand )
1151
1150
" Forward till the next N char read from minibuffer."
1152
- (interactive " p" )
1151
+ (interactive " p\n cTill: " )
1153
1152
(let* ((case-fold-search nil )
1154
- (ch (read-char (message (or prompt " Till(%d):" ) n)))
1155
1153
(ch-str (if (eq ch 13 ) " \n " (char-to-string ch)))
1156
1154
(beg (point ))
1157
1155
(fix-pos (if (< n 0 ) 1 -1 ))
@@ -1169,9 +1167,9 @@ with UNIVERSAL ARGUMENT, search both side."
1169
1167
(meow--maybe-highlight-num-positions
1170
1168
'(meow--till-continue-backward . meow--till-continue-forward)))))
1171
1169
1172
- (defun meow-till-expand (n )
1173
- (interactive " p" )
1174
- (meow-till n ( message " Expand till( %d ): " n) t ))
1170
+ (defun meow-till-expand (n ch )
1171
+ (interactive " p\n cExpand till: " )
1172
+ (meow-till n ch t ))
1175
1173
1176
1174
; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1177
1175
; ;; VISIT and SEARCH
@@ -1288,41 +1286,25 @@ To search backward, use \\[negative-argument]."
1288
1286
(alist-get cmd meow-thing-selection-directions)
1289
1287
'forward ))
1290
1288
1291
- (defun meow--parse-or-prompt-for-thing (prompt inner thing )
1292
- (if thing
1293
- (meow--parse-range-of-thing thing inner)
1294
- (let ((ch (meow-thing-prompt prompt)))
1295
- (if inner
1296
- (meow--parse-inner-of-thing-char ch)
1297
- (meow--parse-bounds-of-thing-char ch)))))
1298
-
1299
- (defun meow-beginning-of-thing (&optional thing )
1300
- " Select to the beginning of THING represented by CH.
1301
- If THING is not supplied, prompt for selection.
1302
-
1303
- Prefix argument is not allowed for this command."
1304
- (interactive )
1289
+ (defun meow-beginning-of-thing (thing )
1290
+ " Select to the beginning of THING."
1291
+ (interactive (list (meow-thing-prompt " Beginning of: " )))
1305
1292
(save-window-excursion
1306
1293
(let ((back (equal 'backward (meow--thing-get-direction 'beginning )))
1307
- (bounds (meow--parse-or-prompt-for-thing
1308
- " Beginning of: " t thing)))
1294
+ (bounds (meow--parse-inner-of-thing-char thing)))
1309
1295
(when bounds
1310
1296
(thread-first
1311
1297
(meow--make-selection '(select . transient)
1312
1298
(if back (point ) (car bounds))
1313
1299
(if back (car bounds) (point )))
1314
1300
(meow--select))))))
1315
1301
1316
- (defun meow-end-of-thing (&optional thing )
1317
- " Select to the end of THING represented by CH.
1318
- If THING is not supplied, then prompt for selection
1319
-
1320
- Prefix argument is not allowed for this command."
1321
- (interactive )
1302
+ (defun meow-end-of-thing (thing )
1303
+ " Select to the end of THING."
1304
+ (interactive (list (meow-thing-prompt " End of: " )))
1322
1305
(save-window-excursion
1323
1306
(let ((back (equal 'backward (meow--thing-get-direction 'end )))
1324
- (bounds (meow--parse-or-prompt-for-thing
1325
- " End of: " t thing)))
1307
+ (bounds (meow--parse-inner-of-thing-char thing)))
1326
1308
(when bounds
1327
1309
(thread-first
1328
1310
(meow--make-selection '(select . transient)
@@ -1338,24 +1320,20 @@ Prefix argument is not allowed for this command."
1338
1320
(if back (car bounds) (cdr bounds)))
1339
1321
(meow--select))))
1340
1322
1341
- (defun meow-inner-of-thing (&optional thing )
1342
- " Select inner (excluding delimeters) of THING. If THING is not
1343
- supplied then prompt for selection."
1344
- (interactive )
1323
+ (defun meow-inner-of-thing (thing )
1324
+ " Select inner (excluding delimeters) of THING."
1325
+ (interactive (list (meow-thing-prompt " Inner of: " )))
1345
1326
(save-window-excursion
1346
1327
(let ((back (equal 'backward (meow--thing-get-direction 'inner )))
1347
- (bounds (meow--parse-or-prompt-for-thing
1348
- " Inner of: " t thing)))
1328
+ (bounds (meow--parse-inner-of-thing-char thing)))
1349
1329
(meow--select-range back bounds))))
1350
1330
1351
- (defun meow-bounds-of-thing (&optional thing )
1352
- " Select bounds (including delimiters) of THING. If THING is not
1353
- supplied then prompt for selection."
1354
- (interactive )
1331
+ (defun meow-bounds-of-thing (thing )
1332
+ " Select bounds (including delimiters) of THING."
1333
+ (interactive (list (meow-thing-prompt " Bounds of: " )))
1355
1334
(save-window-excursion
1356
1335
(let ((back (equal 'backward (meow--thing-get-direction 'bounds )))
1357
- (bounds (meow--parse-or-prompt-for-thing
1358
- " Bounds of: " nil thing)))
1336
+ (bounds (meow--parse-bounds-of-thing-char thing)))
1359
1337
(meow--select-range back bounds))))
1360
1338
1361
1339
(defun meow-indent ()
0 commit comments