-
Notifications
You must be signed in to change notification settings - Fork 0
/
ar-thingatpt-markup.el
3961 lines (3144 loc) · 154 KB
/
ar-thingatpt-markup.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
;;; ar-thingatpt-markup.el --- th-at-point edit functions -*- lexical-binding: t; -*-
;; Copyright (C) 2010-2024 Andreas Röhler, unless
;; indicated otherwise
;; Author: Andreas Röhler <[email protected]>, unless
;; indicated otherwise
;; Version: 0.1
;; Keywords: convenience
;; This file is free software; you can redistribute it
;; and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version.
;; This file is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs; see the file COPYING. If not, write to
;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.
;;; Commentary:
;;; Code:
(require 'ar-thingatpt-utils-core)
(require 'ar-thingatpt-basic-definitions)
;; ar-thingatpt-utils-markup ar-atpt-markup-list start
(defun ar-un-beginendquote-atpt (&optional arg)
"Remove markups provided by beginendquote. "
(interactive "P*")
(ar-th-un-ml 'beginendquote arg arg))
(defun ar-un-blok-atpt (&optional arg)
"Remove markups provided by blok. "
(interactive "P*")
(ar-th-un-ml 'blok arg arg))
(defun ar-un-doublebackslashed-atpt (&optional arg)
"Remove markups provided by doublebackslashed. "
(interactive "P*")
(ar-th-un-ml 'doublebackslashed arg arg))
(defun ar-un-doublebackslashedparen-atpt (&optional arg)
"Remove markups provided by doublebackslashedparen. "
(interactive "P*")
(ar-th-un-ml 'doublebackslashedparen arg arg))
(defun ar-un-doubleslashed-atpt (&optional arg)
"Remove markups provided by doubleslashed. "
(interactive "P*")
(ar-th-un-ml 'doubleslashed arg arg))
(defun ar-un-tabledata-atpt (&optional arg)
"Remove markups provided by tabledata. "
(interactive "P*")
(ar-th-un-ml 'tabledata arg arg))
;; ar-thingatpt-utils-markup: ar-atpt-markup-list end
;; ar-thingatpt-utils-delimiters-core ar-atpt-markup-list start
(defun ar-beginendquote-atpt (&optional no-delimiters)
"Returns beginendquote at point if any, nil otherwise.
Optional \\[universal-argument], from a programm '(4), returns objects without delimiters"
(interactive "p")
(ar-th 'beginendquote no-delimiters))
(defun ar-bounds-of-beginendquote-atpt (&optional no-delimiters)
"Returns a list, borders of beginendquote if any, nil otherwise.
Optional \\[universal-argument], from a programm '(4), returns bounds without delimiters"
(interactive "p")
(ar-th-bounds 'beginendquote no-delimiters))
(defun ar-beginendquote-beginning-position-atpt (&optional no-delimiters)
"Returns a number, beginning position BEGINENDQUOTE at point if any, nil otherwise.
Optional \\[universal-argument], from a programm '(4), returns start position after delimiter "
(interactive "p")
(ar-th-beg 'beginendquote no-delimiters))
(defun ar-beginendquote-end-position-atpt (&optional no-delimiters)
"Returns a number, end position of BEGINENDQUOTE at point if any, nil otherwise.
Optional \\[universal-argument], from a programm '(4), returns end position at delimiter "
(interactive "p")
(ar-th-end 'beginendquote no-delimiters))
(defun ar-beginning-of-beginendquote-atpt (&optional no-delimiters)
"Goto beginning of symbol or char-class BEGINENDQUOTE at point if any, nil otherwise.
Optional \\[universal-argument], from a programm '(4), returns start position after delimiter "
(interactive "p")
(ar-th-gotobeg 'beginendquote no-delimiters))
(defun ar-end-of-beginendquote-atpt (&optional no-delimiters)
"Goto end of symbol or char-class BEGINENDQUOTE at point if any, nil otherwise. "
(interactive "p")
(ar-th-gotoend 'beginendquote no-delimiters))
(defun ar-in-beginendquote-p-atpt (&optional no-delimiters)
"Returns bounds of BEGINENDQUOTE at point, a list, if inside, nil otherwise. "
(interactive "p")
(ar-th-bounds 'beginendquote no-delimiters))
(defun ar-length-of-beginendquote-atpt (&optional no-delimiters)
"Returns beginning of symbol or char-class BEGINENDQUOTE at point if any, nil otherwise. "
(interactive "p")
(ar-th-length 'beginendquote no-delimiters))
(defun ar-copy-beginendquote-atpt (&optional no-delimiters)
"Returns a copy of BEGINENDQUOTE at point if any, nil otherwise. "
(interactive "p")
(ar-th-copy 'beginendquote no-delimiters))
(defun ar-delete-beginendquote-atpt (&optional no-delimiters)
"Deletes BEGINENDQUOTE at point if any. "
(interactive "*P")
(ar-th-delete 'beginendquote no-delimiters))
(defun ar-delete-beginendquote-in-region (beg end)
"Deletes BEGINENDQUOTE at point if any. "
(interactive "*r")
(ar-th-delete-in-region 'beginendquote beg end))
(defun ar-blok-beginendquote-atpt (&optional no-delimiters)
"Puts ‘blok-startstring-atpt’, ‘blok-endstring-atpt’ around beginendquote.
Returns blok or nil if no BEGINENDQUOTE at cursor-position. "
(interactive "*P")
(ar-th-blok 'beginendquote no-delimiters))
(defun ar-backslashparen-beginendquote-atpt (&optional no-delimiters)
"Provides doubleslashed parentheses around beginendquote at point if any.
With optional \\[universal-argument] NO-DELIMITERS resp. to inner position of delimiting char or string "
(interactive "*P")
(ar-th-backslashparen 'beginendquote no-delimiters))
(defun ar-doublebackslash-beginendquote-atpt (&optional no-delimiters)
"Puts doubled backslashes around BEGINENDQUOTE at point if any. "
(interactive "*P")
(ar-th-doublebackslash 'beginendquote no-delimiters))
(defun ar-doubleslash-beginendquote-atpt (&optional no-delimiters)
"Puts doubled slashes around BEGINENDQUOTE at point if any. "
(interactive "*P")
(ar-th-doubleslash 'beginendquote no-delimiters))
(defun ar-doublebackslashparen-beginendquote-atpt (&optional no-delimiters)
"Provides doubleslashed parentheses around BEGINENDQUOTE at point if any. "
(interactive "*P")
(ar-th-doublebackslashparen 'beginendquote no-delimiters))
(defun ar-doublebacktick-beginendquote-atpt (&optional no-delimiters)
"Provides double backticks around BEGINENDQUOTE at point if any. "
(interactive "*P")
(ar-th-doublebacktick 'beginendquote no-delimiters))
(defun ar-slashparen-beginendquote-atpt (&optional no-delimiters)
"Provides slashed parentheses around BEGINENDQUOTE at point if any. "
(interactive "*P")
(ar-th-slashparen 'beginendquote no-delimiters))
(defun ar-slashparen-beginendquote-atpt (&optional no-delimiters)
"Provides slashed parentheses around BEGINENDQUOTE at point if any. "
(interactive "*P")
(ar-th-slashparen 'beginendquote no-delimiters))
(defun ar-comment-beginendquote-atpt (&optional no-delimiters)
"Comments BEGINENDQUOTE at point if any. "
(interactive "*P")
(ar-th-comment 'beginendquote no-delimiters))
(defun ar-commatize-beginendquote-atpt (&optional no-delimiters)
"Put a comma after BEGINENDQUOTE at point if any. "
(interactive "*P")
(ar-th-commatize 'beginendquote no-delimiters))
(defun ar-quote-beginendquote-atpt (&optional no-delimiters)
"Put a singlequote before BEGINENDQUOTE at point if any. "
(interactive "*P")
(ar-th-quote 'beginendquote no-delimiters))
(defun ar-mark-beginendquote-atpt (&optional no-delimiters)
"Marks BEGINENDQUOTE at point if any. "
(interactive "p")
(ar-th-mark 'beginendquote))
(defun ar-hide-beginendquote-atpt (&optional no-delimiters)
"Hides BEGINENDQUOTE at point. "
(interactive "p")
(ar-th-hide 'beginendquote))
(defun ar-show-beginendquote-atpt (&optional no-delimiters)
"Shows hidden BEGINENDQUOTE at point. "
(interactive "p")
(ar-th-show 'beginendquote))
(defun ar-hide-show-beginendquote-atpt (&optional no-delimiters)
"Alternatively hides or shows BEGINENDQUOTE at point. "
(interactive "p")
(ar-th-hide-show 'beginendquote))
(defun ar-highlight-beginendquote-atpt-mode (&optional no-delimiters)
"Toggles beginendquote-highlight-atpt-mode "
(interactive "p")
(ar-th-highlight 'beginendquote no-delimiters))
(defun ar-kill-beginendquote-atpt (&optional no-delimiters)
"Kills BEGINENDQUOTE at point if any. "
(interactive "*P")
(ar-th-kill 'beginendquote no-delimiters))
(defun ar-curvedsinglequote-beginendquote-atpt (&optional no-delimiters)
"Singlequotes alnum at point if any. "
(interactive "*P")
(ar-th-curvedsinglequote 'beginendquote no-delimiters))
(defun ar-separate-beginendquote-atpt (&optional no-delimiters)
"Separates BEGINENDQUOTE at point if any, does nothing otherwise
inserts newlines, borders are the beginning or the end of buffer "
(interactive "*P")
(ar-th-separate 'beginendquote no-delimiters))
(defun ar-triplequotedq-beginendquote-atpt (&optional no-delimiters)
"Put triplequotes composed of doublequotes around beginendquote. "
(interactive "*P")
(ar-th-triplequotedq 'beginendquote no-delimiters))
(defun ar-triplequotesq-beginendquote-atpt (&optional no-delimiters)
"Put triplequotes composed of singlequotes around beginendquote. "
(interactive "*P")
(ar-th-triplequotesq 'beginendquote no-delimiters))
(defun ar-triplebacktick-beginendquote-atpt (&optional no-delimiters)
"Deletes beginendquote at point if any.
With optional \\[universal-argument] NO-DELIMITERS resp. to inner position of delimiting char or string "
(interactive "*P")
(ar-th-triplebacktick 'beginendquote no-delimiters))
(defun ar-trim-beginendquote-atpt (&optional no-delimiters)
"Removes leading and trailing char. "
(interactive "*")
(ar-th-trim 'beginendquote no-delimiters t t))
(defun ar-left-trim-beginendquote-atpt (&optional no-delimiters)
"Removes leading char. "
(interactive "*")
(ar-th-trim 'beginendquote no-delimiters t))
(defun ar-right-trim-beginendquote-atpt (&optional no-delimiters)
"Removes trailing char. "
(interactive "*")
(ar-th-trim 'beginendquote n no-delimiters nil t))
(defun ar-underscore-beginendquote-atpt (&optional no-delimiters)
"Put underscore char around BEGINENDQUOTE. "
(interactive "*P")
(ar-th-underscore 'beginendquote no-delimiters))
(defun ar-forward-beginendquote-atpt (&optional no-delimiters)
"Moves forward over BEGINENDQUOTE at point if any, does nothing otherwise.
Returns end position of BEGINENDQUOTE "
(interactive "p")
(ar-th-forward 'beginendquote no-delimiters))
(defun ar-backward-beginendquote-atpt (&optional no-delimiters)
"Moves backward over BEGINENDQUOTE before point if any, does nothing otherwise.
Returns beginning position of BEGINENDQUOTE "
(interactive "p")
(ar-th-backward 'beginendquote no-delimiters))
(defun ar-transpose-beginendquote-atpt (&optional no-delimiters)
"Transposes BEGINENDQUOTE with BEGINENDQUOTE before point if any. "
(interactive "*P")
(ar-th-transpose 'beginendquote no-delimiters))
(defun ar-sort-beginendquote-atpt (reverse beg end &optional startkeyfun endkeyfun predicate)
"Sorts beginendquotes in region, with ARG in reverse order.
STARTKEYFUN may be replaced by a function which stops at an alternative beginning.
ENDKEYFUN might be a function specifying THING's end when sorting.
With PREDICATE define a the function to compare. Defaults are `<' for numbers, otherwise `string<'.
See doku from ‘sort-subr’, for details.
"
(interactive "*P\nr")
(let ((reverse (when reverse)) startkeyfun endkeyfun predicate)
(unless (use-region-p) (message "%s" "Region must be active!"))
(ar-th-sort 'beginendquote reverse beg end startkeyfun endkeyfun predicate)))
(defun ar-check-beginendquote-atpt (&optional arg)
"Return t if a BEGINENDQUOTE at point exists, nil otherwise "
(interactive "p")
(let* ((beg (funcall (intern-soft (concat "ar-beginendquote-beginning-position-atpt"))))
(end (funcall (intern-soft (concat "ar-beginendquote-end-position-atpt"))))
(erg (ignore-errors (< beg end))))
(when arg (message "%s" erg))
erg))
(defun ar-blok-atpt (&optional no-delimiters)
"Returns blok at point if any, nil otherwise.
Optional \\[universal-argument], from a programm '(4), returns objects without delimiters"
(interactive "p")
(ar-th 'blok no-delimiters))
(defun ar-bounds-of-blok-atpt (&optional no-delimiters)
"Returns a list, borders of blok if any, nil otherwise.
Optional \\[universal-argument], from a programm '(4), returns bounds without delimiters"
(interactive "p")
(ar-th-bounds 'blok no-delimiters))
(defun ar-blok-beginning-position-atpt (&optional no-delimiters)
"Returns a number, beginning position BLOK at point if any, nil otherwise.
Optional \\[universal-argument], from a programm '(4), returns start position after delimiter "
(interactive "p")
(ar-th-beg 'blok no-delimiters))
(defun ar-blok-end-position-atpt (&optional no-delimiters)
"Returns a number, end position of BLOK at point if any, nil otherwise.
Optional \\[universal-argument], from a programm '(4), returns end position at delimiter "
(interactive "p")
(ar-th-end 'blok no-delimiters))
(defun ar-beginning-of-blok-atpt (&optional no-delimiters)
"Goto beginning of symbol or char-class BLOK at point if any, nil otherwise.
Optional \\[universal-argument], from a programm '(4), returns start position after delimiter "
(interactive "p")
(ar-th-gotobeg 'blok no-delimiters))
(defun ar-end-of-blok-atpt (&optional no-delimiters)
"Goto end of symbol or char-class BLOK at point if any, nil otherwise. "
(interactive "p")
(ar-th-gotoend 'blok no-delimiters))
(defun ar-in-blok-p-atpt (&optional no-delimiters)
"Returns bounds of BLOK at point, a list, if inside, nil otherwise. "
(interactive "p")
(ar-th-bounds 'blok no-delimiters))
(defun ar-length-of-blok-atpt (&optional no-delimiters)
"Returns beginning of symbol or char-class BLOK at point if any, nil otherwise. "
(interactive "p")
(ar-th-length 'blok no-delimiters))
(defun ar-copy-blok-atpt (&optional no-delimiters)
"Returns a copy of BLOK at point if any, nil otherwise. "
(interactive "p")
(ar-th-copy 'blok no-delimiters))
(defun ar-delete-blok-atpt (&optional no-delimiters)
"Deletes BLOK at point if any. "
(interactive "*P")
(ar-th-delete 'blok no-delimiters))
(defun ar-delete-blok-in-region (beg end)
"Deletes BLOK at point if any. "
(interactive "*r")
(ar-th-delete-in-region 'blok beg end))
(defun ar-blok-blok-atpt (&optional no-delimiters)
"Puts ‘blok-startstring-atpt’, ‘blok-endstring-atpt’ around blok.
Returns blok or nil if no BLOK at cursor-position. "
(interactive "*P")
(ar-th-blok 'blok no-delimiters))
(defun ar-backslashparen-blok-atpt (&optional no-delimiters)
"Provides doubleslashed parentheses around blok at point if any.
With optional \\[universal-argument] NO-DELIMITERS resp. to inner position of delimiting char or string "
(interactive "*P")
(ar-th-backslashparen 'blok no-delimiters))
(defun ar-doublebackslash-blok-atpt (&optional no-delimiters)
"Puts doubled backslashes around BLOK at point if any. "
(interactive "*P")
(ar-th-doublebackslash 'blok no-delimiters))
(defun ar-doubleslash-blok-atpt (&optional no-delimiters)
"Puts doubled slashes around BLOK at point if any. "
(interactive "*P")
(ar-th-doubleslash 'blok no-delimiters))
(defun ar-doublebackslashparen-blok-atpt (&optional no-delimiters)
"Provides doubleslashed parentheses around BLOK at point if any. "
(interactive "*P")
(ar-th-doublebackslashparen 'blok no-delimiters))
(defun ar-doublebacktick-blok-atpt (&optional no-delimiters)
"Provides double backticks around BLOK at point if any. "
(interactive "*P")
(ar-th-doublebacktick 'blok no-delimiters))
(defun ar-slashparen-blok-atpt (&optional no-delimiters)
"Provides slashed parentheses around BLOK at point if any. "
(interactive "*P")
(ar-th-slashparen 'blok no-delimiters))
(defun ar-slashparen-blok-atpt (&optional no-delimiters)
"Provides slashed parentheses around BLOK at point if any. "
(interactive "*P")
(ar-th-slashparen 'blok no-delimiters))
(defun ar-comment-blok-atpt (&optional no-delimiters)
"Comments BLOK at point if any. "
(interactive "*P")
(ar-th-comment 'blok no-delimiters))
(defun ar-commatize-blok-atpt (&optional no-delimiters)
"Put a comma after BLOK at point if any. "
(interactive "*P")
(ar-th-commatize 'blok no-delimiters))
(defun ar-quote-blok-atpt (&optional no-delimiters)
"Put a singlequote before BLOK at point if any. "
(interactive "*P")
(ar-th-quote 'blok no-delimiters))
(defun ar-mark-blok-atpt (&optional no-delimiters)
"Marks BLOK at point if any. "
(interactive "p")
(ar-th-mark 'blok))
(defun ar-hide-blok-atpt (&optional no-delimiters)
"Hides BLOK at point. "
(interactive "p")
(ar-th-hide 'blok))
(defun ar-show-blok-atpt (&optional no-delimiters)
"Shows hidden BLOK at point. "
(interactive "p")
(ar-th-show 'blok))
(defun ar-hide-show-blok-atpt (&optional no-delimiters)
"Alternatively hides or shows BLOK at point. "
(interactive "p")
(ar-th-hide-show 'blok))
(defun ar-highlight-blok-atpt-mode (&optional no-delimiters)
"Toggles blok-highlight-atpt-mode "
(interactive "p")
(ar-th-highlight 'blok no-delimiters))
(defun ar-kill-blok-atpt (&optional no-delimiters)
"Kills BLOK at point if any. "
(interactive "*P")
(ar-th-kill 'blok no-delimiters))
(defun ar-curvedsinglequote-blok-atpt (&optional no-delimiters)
"Singlequotes alnum at point if any. "
(interactive "*P")
(ar-th-curvedsinglequote 'blok no-delimiters))
(defun ar-separate-blok-atpt (&optional no-delimiters)
"Separates BLOK at point if any, does nothing otherwise
inserts newlines, borders are the beginning or the end of buffer "
(interactive "*P")
(ar-th-separate 'blok no-delimiters))
(defun ar-triplequotedq-blok-atpt (&optional no-delimiters)
"Put triplequotes composed of doublequotes around blok. "
(interactive "*P")
(ar-th-triplequotedq 'blok no-delimiters))
(defun ar-triplequotesq-blok-atpt (&optional no-delimiters)
"Put triplequotes composed of singlequotes around blok. "
(interactive "*P")
(ar-th-triplequotesq 'blok no-delimiters))
(defun ar-triplebacktick-blok-atpt (&optional no-delimiters)
"Deletes blok at point if any.
With optional \\[universal-argument] NO-DELIMITERS resp. to inner position of delimiting char or string "
(interactive "*P")
(ar-th-triplebacktick 'blok no-delimiters))
(defun ar-trim-blok-atpt (&optional no-delimiters)
"Removes leading and trailing char. "
(interactive "*")
(ar-th-trim 'blok no-delimiters t t))
(defun ar-left-trim-blok-atpt (&optional no-delimiters)
"Removes leading char. "
(interactive "*")
(ar-th-trim 'blok no-delimiters t))
(defun ar-right-trim-blok-atpt (&optional no-delimiters)
"Removes trailing char. "
(interactive "*")
(ar-th-trim 'blok n no-delimiters nil t))
(defun ar-underscore-blok-atpt (&optional no-delimiters)
"Put underscore char around BLOK. "
(interactive "*P")
(ar-th-underscore 'blok no-delimiters))
(defun ar-forward-blok-atpt (&optional no-delimiters)
"Moves forward over BLOK at point if any, does nothing otherwise.
Returns end position of BLOK "
(interactive "p")
(ar-th-forward 'blok no-delimiters))
(defun ar-backward-blok-atpt (&optional no-delimiters)
"Moves backward over BLOK before point if any, does nothing otherwise.
Returns beginning position of BLOK "
(interactive "p")
(ar-th-backward 'blok no-delimiters))
(defun ar-transpose-blok-atpt (&optional no-delimiters)
"Transposes BLOK with BLOK before point if any. "
(interactive "*P")
(ar-th-transpose 'blok no-delimiters))
(defun ar-sort-blok-atpt (reverse beg end &optional startkeyfun endkeyfun predicate)
"Sorts bloks in region, with ARG in reverse order.
STARTKEYFUN may be replaced by a function which stops at an alternative beginning.
ENDKEYFUN might be a function specifying THING's end when sorting.
With PREDICATE define a the function to compare. Defaults are `<' for numbers, otherwise `string<'.
See doku from ‘sort-subr’, for details.
"
(interactive "*P\nr")
(let ((reverse (when reverse)) startkeyfun endkeyfun predicate)
(unless (use-region-p) (message "%s" "Region must be active!"))
(ar-th-sort 'blok reverse beg end startkeyfun endkeyfun predicate)))
(defun ar-check-blok-atpt (&optional arg)
"Return t if a BLOK at point exists, nil otherwise "
(interactive "p")
(let* ((beg (funcall (intern-soft (concat "ar-blok-beginning-position-atpt"))))
(end (funcall (intern-soft (concat "ar-blok-end-position-atpt"))))
(erg (ignore-errors (< beg end))))
(when arg (message "%s" erg))
erg))
(defun ar-doublebackslashed-atpt (&optional no-delimiters)
"Returns doublebackslashed at point if any, nil otherwise.
Optional \\[universal-argument], from a programm '(4), returns objects without delimiters"
(interactive "p")
(ar-th 'doublebackslashed no-delimiters))
(defun ar-bounds-of-doublebackslashed-atpt (&optional no-delimiters)
"Returns a list, borders of doublebackslashed if any, nil otherwise.
Optional \\[universal-argument], from a programm '(4), returns bounds without delimiters"
(interactive "p")
(ar-th-bounds 'doublebackslashed no-delimiters))
(defun ar-doublebackslashed-beginning-position-atpt (&optional no-delimiters)
"Returns a number, beginning position DOUBLEBACKSLASHED at point if any, nil otherwise.
Optional \\[universal-argument], from a programm '(4), returns start position after delimiter "
(interactive "p")
(ar-th-beg 'doublebackslashed no-delimiters))
(defun ar-doublebackslashed-end-position-atpt (&optional no-delimiters)
"Returns a number, end position of DOUBLEBACKSLASHED at point if any, nil otherwise.
Optional \\[universal-argument], from a programm '(4), returns end position at delimiter "
(interactive "p")
(ar-th-end 'doublebackslashed no-delimiters))
(defun ar-beginning-of-doublebackslashed-atpt (&optional no-delimiters)
"Goto beginning of symbol or char-class DOUBLEBACKSLASHED at point if any, nil otherwise.
Optional \\[universal-argument], from a programm '(4), returns start position after delimiter "
(interactive "p")
(ar-th-gotobeg 'doublebackslashed no-delimiters))
(defun ar-end-of-doublebackslashed-atpt (&optional no-delimiters)
"Goto end of symbol or char-class DOUBLEBACKSLASHED at point if any, nil otherwise. "
(interactive "p")
(ar-th-gotoend 'doublebackslashed no-delimiters))
(defun ar-in-doublebackslashed-p-atpt (&optional no-delimiters)
"Returns bounds of DOUBLEBACKSLASHED at point, a list, if inside, nil otherwise. "
(interactive "p")
(ar-th-bounds 'doublebackslashed no-delimiters))
(defun ar-length-of-doublebackslashed-atpt (&optional no-delimiters)
"Returns beginning of symbol or char-class DOUBLEBACKSLASHED at point if any, nil otherwise. "
(interactive "p")
(ar-th-length 'doublebackslashed no-delimiters))
(defun ar-copy-doublebackslashed-atpt (&optional no-delimiters)
"Returns a copy of DOUBLEBACKSLASHED at point if any, nil otherwise. "
(interactive "p")
(ar-th-copy 'doublebackslashed no-delimiters))
(defun ar-delete-doublebackslashed-atpt (&optional no-delimiters)
"Deletes DOUBLEBACKSLASHED at point if any. "
(interactive "*P")
(ar-th-delete 'doublebackslashed no-delimiters))
(defun ar-delete-doublebackslashed-in-region (beg end)
"Deletes DOUBLEBACKSLASHED at point if any. "
(interactive "*r")
(ar-th-delete-in-region 'doublebackslashed beg end))
(defun ar-blok-doublebackslashed-atpt (&optional no-delimiters)
"Puts ‘blok-startstring-atpt’, ‘blok-endstring-atpt’ around doublebackslashed.
Returns blok or nil if no DOUBLEBACKSLASHED at cursor-position. "
(interactive "*P")
(ar-th-blok 'doublebackslashed no-delimiters))
(defun ar-backslashparen-doublebackslashed-atpt (&optional no-delimiters)
"Provides doubleslashed parentheses around doublebackslashed at point if any.
With optional \\[universal-argument] NO-DELIMITERS resp. to inner position of delimiting char or string "
(interactive "*P")
(ar-th-backslashparen 'doublebackslashed no-delimiters))
(defun ar-doublebackslash-doublebackslashed-atpt (&optional no-delimiters)
"Puts doubled backslashes around DOUBLEBACKSLASHED at point if any. "
(interactive "*P")
(ar-th-doublebackslash 'doublebackslashed no-delimiters))
(defun ar-doubleslash-doublebackslashed-atpt (&optional no-delimiters)
"Puts doubled slashes around DOUBLEBACKSLASHED at point if any. "
(interactive "*P")
(ar-th-doubleslash 'doublebackslashed no-delimiters))
(defun ar-doublebackslashparen-doublebackslashed-atpt (&optional no-delimiters)
"Provides doubleslashed parentheses around DOUBLEBACKSLASHED at point if any. "
(interactive "*P")
(ar-th-doublebackslashparen 'doublebackslashed no-delimiters))
(defun ar-doublebacktick-doublebackslashed-atpt (&optional no-delimiters)
"Provides double backticks around DOUBLEBACKSLASHED at point if any. "
(interactive "*P")
(ar-th-doublebacktick 'doublebackslashed no-delimiters))
(defun ar-slashparen-doublebackslashed-atpt (&optional no-delimiters)
"Provides slashed parentheses around DOUBLEBACKSLASHED at point if any. "
(interactive "*P")
(ar-th-slashparen 'doublebackslashed no-delimiters))
(defun ar-slashparen-doublebackslashed-atpt (&optional no-delimiters)
"Provides slashed parentheses around DOUBLEBACKSLASHED at point if any. "
(interactive "*P")
(ar-th-slashparen 'doublebackslashed no-delimiters))
(defun ar-comment-doublebackslashed-atpt (&optional no-delimiters)
"Comments DOUBLEBACKSLASHED at point if any. "
(interactive "*P")
(ar-th-comment 'doublebackslashed no-delimiters))
(defun ar-commatize-doublebackslashed-atpt (&optional no-delimiters)
"Put a comma after DOUBLEBACKSLASHED at point if any. "
(interactive "*P")
(ar-th-commatize 'doublebackslashed no-delimiters))
(defun ar-quote-doublebackslashed-atpt (&optional no-delimiters)
"Put a singlequote before DOUBLEBACKSLASHED at point if any. "
(interactive "*P")
(ar-th-quote 'doublebackslashed no-delimiters))
(defun ar-mark-doublebackslashed-atpt (&optional no-delimiters)
"Marks DOUBLEBACKSLASHED at point if any. "
(interactive "p")
(ar-th-mark 'doublebackslashed))
(defun ar-hide-doublebackslashed-atpt (&optional no-delimiters)
"Hides DOUBLEBACKSLASHED at point. "
(interactive "p")
(ar-th-hide 'doublebackslashed))
(defun ar-show-doublebackslashed-atpt (&optional no-delimiters)
"Shows hidden DOUBLEBACKSLASHED at point. "
(interactive "p")
(ar-th-show 'doublebackslashed))
(defun ar-hide-show-doublebackslashed-atpt (&optional no-delimiters)
"Alternatively hides or shows DOUBLEBACKSLASHED at point. "
(interactive "p")
(ar-th-hide-show 'doublebackslashed))
(defun ar-highlight-doublebackslashed-atpt-mode (&optional no-delimiters)
"Toggles doublebackslashed-highlight-atpt-mode "
(interactive "p")
(ar-th-highlight 'doublebackslashed no-delimiters))
(defun ar-kill-doublebackslashed-atpt (&optional no-delimiters)
"Kills DOUBLEBACKSLASHED at point if any. "
(interactive "*P")
(ar-th-kill 'doublebackslashed no-delimiters))
(defun ar-curvedsinglequote-doublebackslashed-atpt (&optional no-delimiters)
"Singlequotes alnum at point if any. "
(interactive "*P")
(ar-th-curvedsinglequote 'doublebackslashed no-delimiters))
(defun ar-separate-doublebackslashed-atpt (&optional no-delimiters)
"Separates DOUBLEBACKSLASHED at point if any, does nothing otherwise
inserts newlines, borders are the beginning or the end of buffer "
(interactive "*P")
(ar-th-separate 'doublebackslashed no-delimiters))
(defun ar-triplequotedq-doublebackslashed-atpt (&optional no-delimiters)
"Put triplequotes composed of doublequotes around doublebackslashed. "
(interactive "*P")
(ar-th-triplequotedq 'doublebackslashed no-delimiters))
(defun ar-triplequotesq-doublebackslashed-atpt (&optional no-delimiters)
"Put triplequotes composed of singlequotes around doublebackslashed. "
(interactive "*P")
(ar-th-triplequotesq 'doublebackslashed no-delimiters))
(defun ar-triplebacktick-doublebackslashed-atpt (&optional no-delimiters)
"Deletes doublebackslashed at point if any.
With optional \\[universal-argument] NO-DELIMITERS resp. to inner position of delimiting char or string "
(interactive "*P")
(ar-th-triplebacktick 'doublebackslashed no-delimiters))
(defun ar-trim-doublebackslashed-atpt (&optional no-delimiters)
"Removes leading and trailing char. "
(interactive "*")
(ar-th-trim 'doublebackslashed no-delimiters t t))
(defun ar-left-trim-doublebackslashed-atpt (&optional no-delimiters)
"Removes leading char. "
(interactive "*")
(ar-th-trim 'doublebackslashed no-delimiters t))
(defun ar-right-trim-doublebackslashed-atpt (&optional no-delimiters)
"Removes trailing char. "
(interactive "*")
(ar-th-trim 'doublebackslashed n no-delimiters nil t))
(defun ar-underscore-doublebackslashed-atpt (&optional no-delimiters)
"Put underscore char around DOUBLEBACKSLASHED. "
(interactive "*P")
(ar-th-underscore 'doublebackslashed no-delimiters))
(defun ar-forward-doublebackslashed-atpt (&optional no-delimiters)
"Moves forward over DOUBLEBACKSLASHED at point if any, does nothing otherwise.
Returns end position of DOUBLEBACKSLASHED "
(interactive "p")
(ar-th-forward 'doublebackslashed no-delimiters))
(defun ar-backward-doublebackslashed-atpt (&optional no-delimiters)
"Moves backward over DOUBLEBACKSLASHED before point if any, does nothing otherwise.
Returns beginning position of DOUBLEBACKSLASHED "
(interactive "p")
(ar-th-backward 'doublebackslashed no-delimiters))
(defun ar-transpose-doublebackslashed-atpt (&optional no-delimiters)
"Transposes DOUBLEBACKSLASHED with DOUBLEBACKSLASHED before point if any. "
(interactive "*P")
(ar-th-transpose 'doublebackslashed no-delimiters))
(defun ar-sort-doublebackslashed-atpt (reverse beg end &optional startkeyfun endkeyfun predicate)
"Sorts doublebackslasheds in region, with ARG in reverse order.
STARTKEYFUN may be replaced by a function which stops at an alternative beginning.
ENDKEYFUN might be a function specifying THING's end when sorting.
With PREDICATE define a the function to compare. Defaults are `<' for numbers, otherwise `string<'.
See doku from ‘sort-subr’, for details.
"
(interactive "*P\nr")
(let ((reverse (when reverse)) startkeyfun endkeyfun predicate)
(unless (use-region-p) (message "%s" "Region must be active!"))
(ar-th-sort 'doublebackslashed reverse beg end startkeyfun endkeyfun predicate)))
(defun ar-check-doublebackslashed-atpt (&optional arg)
"Return t if a DOUBLEBACKSLASHED at point exists, nil otherwise "
(interactive "p")
(let* ((beg (funcall (intern-soft (concat "ar-doublebackslashed-beginning-position-atpt"))))
(end (funcall (intern-soft (concat "ar-doublebackslashed-end-position-atpt"))))
(erg (ignore-errors (< beg end))))
(when arg (message "%s" erg))
erg))
(defun ar-doublebackticked-atpt (&optional no-delimiters)
"Returns doublebackticked at point if any, nil otherwise.
Optional \\[universal-argument], from a programm '(4), returns objects without delimiters"
(interactive "p")
(ar-th 'doublebackticked no-delimiters))
(defun ar-bounds-of-doublebackticked-atpt (&optional no-delimiters)
"Returns a list, borders of doublebackticked if any, nil otherwise.
Optional \\[universal-argument], from a programm '(4), returns bounds without delimiters"
(interactive "p")
(ar-th-bounds 'doublebackticked no-delimiters))
(defun ar-doublebackticked-beginning-position-atpt (&optional no-delimiters)
"Returns a number, beginning position DOUBLEBACKTICKED at point if any, nil otherwise.
Optional \\[universal-argument], from a programm '(4), returns start position after delimiter "
(interactive "p")
(ar-th-beg 'doublebackticked no-delimiters))
(defun ar-doublebackticked-end-position-atpt (&optional no-delimiters)
"Returns a number, end position of DOUBLEBACKTICKED at point if any, nil otherwise.
Optional \\[universal-argument], from a programm '(4), returns end position at delimiter "
(interactive "p")
(ar-th-end 'doublebackticked no-delimiters))
(defun ar-beginning-of-doublebackticked-atpt (&optional no-delimiters)
"Goto beginning of symbol or char-class DOUBLEBACKTICKED at point if any, nil otherwise.
Optional \\[universal-argument], from a programm '(4), returns start position after delimiter "
(interactive "p")
(ar-th-gotobeg 'doublebackticked no-delimiters))
(defun ar-end-of-doublebackticked-atpt (&optional no-delimiters)
"Goto end of symbol or char-class DOUBLEBACKTICKED at point if any, nil otherwise. "
(interactive "p")
(ar-th-gotoend 'doublebackticked no-delimiters))
(defun ar-in-doublebackticked-p-atpt (&optional no-delimiters)
"Returns bounds of DOUBLEBACKTICKED at point, a list, if inside, nil otherwise. "
(interactive "p")
(ar-th-bounds 'doublebackticked no-delimiters))
(defun ar-length-of-doublebackticked-atpt (&optional no-delimiters)
"Returns beginning of symbol or char-class DOUBLEBACKTICKED at point if any, nil otherwise. "
(interactive "p")
(ar-th-length 'doublebackticked no-delimiters))
(defun ar-copy-doublebackticked-atpt (&optional no-delimiters)
"Returns a copy of DOUBLEBACKTICKED at point if any, nil otherwise. "
(interactive "p")
(ar-th-copy 'doublebackticked no-delimiters))
(defun ar-delete-doublebackticked-atpt (&optional no-delimiters)
"Deletes DOUBLEBACKTICKED at point if any. "
(interactive "*P")
(ar-th-delete 'doublebackticked no-delimiters))
(defun ar-delete-doublebackticked-in-region (beg end)
"Deletes DOUBLEBACKTICKED at point if any. "
(interactive "*r")
(ar-th-delete-in-region 'doublebackticked beg end))
(defun ar-blok-doublebackticked-atpt (&optional no-delimiters)
"Puts ‘blok-startstring-atpt’, ‘blok-endstring-atpt’ around doublebackticked.
Returns blok or nil if no DOUBLEBACKTICKED at cursor-position. "
(interactive "*P")
(ar-th-blok 'doublebackticked no-delimiters))
(defun ar-backslashparen-doublebackticked-atpt (&optional no-delimiters)
"Provides doubleslashed parentheses around doublebackticked at point if any.
With optional \\[universal-argument] NO-DELIMITERS resp. to inner position of delimiting char or string "
(interactive "*P")
(ar-th-backslashparen 'doublebackticked no-delimiters))
(defun ar-doublebackslash-doublebackticked-atpt (&optional no-delimiters)
"Puts doubled backslashes around DOUBLEBACKTICKED at point if any. "
(interactive "*P")
(ar-th-doublebackslash 'doublebackticked no-delimiters))
(defun ar-doubleslash-doublebackticked-atpt (&optional no-delimiters)
"Puts doubled slashes around DOUBLEBACKTICKED at point if any. "
(interactive "*P")
(ar-th-doubleslash 'doublebackticked no-delimiters))
(defun ar-doublebackslashparen-doublebackticked-atpt (&optional no-delimiters)
"Provides doubleslashed parentheses around DOUBLEBACKTICKED at point if any. "
(interactive "*P")
(ar-th-doublebackslashparen 'doublebackticked no-delimiters))
(defun ar-doublebacktick-doublebackticked-atpt (&optional no-delimiters)
"Provides double backticks around DOUBLEBACKTICKED at point if any. "
(interactive "*P")
(ar-th-doublebacktick 'doublebackticked no-delimiters))
(defun ar-slashparen-doublebackticked-atpt (&optional no-delimiters)
"Provides slashed parentheses around DOUBLEBACKTICKED at point if any. "
(interactive "*P")
(ar-th-slashparen 'doublebackticked no-delimiters))
(defun ar-slashparen-doublebackticked-atpt (&optional no-delimiters)
"Provides slashed parentheses around DOUBLEBACKTICKED at point if any. "
(interactive "*P")
(ar-th-slashparen 'doublebackticked no-delimiters))
(defun ar-comment-doublebackticked-atpt (&optional no-delimiters)
"Comments DOUBLEBACKTICKED at point if any. "
(interactive "*P")
(ar-th-comment 'doublebackticked no-delimiters))
(defun ar-commatize-doublebackticked-atpt (&optional no-delimiters)
"Put a comma after DOUBLEBACKTICKED at point if any. "
(interactive "*P")
(ar-th-commatize 'doublebackticked no-delimiters))
(defun ar-quote-doublebackticked-atpt (&optional no-delimiters)
"Put a singlequote before DOUBLEBACKTICKED at point if any. "
(interactive "*P")
(ar-th-quote 'doublebackticked no-delimiters))
(defun ar-mark-doublebackticked-atpt (&optional no-delimiters)
"Marks DOUBLEBACKTICKED at point if any. "
(interactive "p")
(ar-th-mark 'doublebackticked))
(defun ar-hide-doublebackticked-atpt (&optional no-delimiters)
"Hides DOUBLEBACKTICKED at point. "
(interactive "p")
(ar-th-hide 'doublebackticked))
(defun ar-show-doublebackticked-atpt (&optional no-delimiters)
"Shows hidden DOUBLEBACKTICKED at point. "
(interactive "p")
(ar-th-show 'doublebackticked))
(defun ar-hide-show-doublebackticked-atpt (&optional no-delimiters)
"Alternatively hides or shows DOUBLEBACKTICKED at point. "
(interactive "p")
(ar-th-hide-show 'doublebackticked))
(defun ar-highlight-doublebackticked-atpt-mode (&optional no-delimiters)
"Toggles doublebackticked-highlight-atpt-mode "
(interactive "p")
(ar-th-highlight 'doublebackticked no-delimiters))
(defun ar-kill-doublebackticked-atpt (&optional no-delimiters)
"Kills DOUBLEBACKTICKED at point if any. "
(interactive "*P")
(ar-th-kill 'doublebackticked no-delimiters))
(defun ar-curvedsinglequote-doublebackticked-atpt (&optional no-delimiters)
"Singlequotes alnum at point if any. "
(interactive "*P")
(ar-th-curvedsinglequote 'doublebackticked no-delimiters))
(defun ar-separate-doublebackticked-atpt (&optional no-delimiters)
"Separates DOUBLEBACKTICKED at point if any, does nothing otherwise
inserts newlines, borders are the beginning or the end of buffer "
(interactive "*P")
(ar-th-separate 'doublebackticked no-delimiters))
(defun ar-triplequotedq-doublebackticked-atpt (&optional no-delimiters)
"Put triplequotes composed of doublequotes around doublebackticked. "
(interactive "*P")
(ar-th-triplequotedq 'doublebackticked no-delimiters))
(defun ar-triplequotesq-doublebackticked-atpt (&optional no-delimiters)
"Put triplequotes composed of singlequotes around doublebackticked. "
(interactive "*P")
(ar-th-triplequotesq 'doublebackticked no-delimiters))
(defun ar-triplebacktick-doublebackticked-atpt (&optional no-delimiters)
"Deletes doublebackticked at point if any.
With optional \\[universal-argument] NO-DELIMITERS resp. to inner position of delimiting char or string "
(interactive "*P")
(ar-th-triplebacktick 'doublebackticked no-delimiters))
(defun ar-trim-doublebackticked-atpt (&optional no-delimiters)
"Removes leading and trailing char. "
(interactive "*")
(ar-th-trim 'doublebackticked no-delimiters t t))
(defun ar-left-trim-doublebackticked-atpt (&optional no-delimiters)
"Removes leading char. "
(interactive "*")
(ar-th-trim 'doublebackticked no-delimiters t))
(defun ar-right-trim-doublebackticked-atpt (&optional no-delimiters)
"Removes trailing char. "
(interactive "*")
(ar-th-trim 'doublebackticked n no-delimiters nil t))
(defun ar-underscore-doublebackticked-atpt (&optional no-delimiters)
"Put underscore char around DOUBLEBACKTICKED. "
(interactive "*P")
(ar-th-underscore 'doublebackticked no-delimiters))
(defun ar-forward-doublebackticked-atpt (&optional no-delimiters)
"Moves forward over DOUBLEBACKTICKED at point if any, does nothing otherwise.
Returns end position of DOUBLEBACKTICKED "
(interactive "p")
(ar-th-forward 'doublebackticked no-delimiters))
(defun ar-backward-doublebackticked-atpt (&optional no-delimiters)
"Moves backward over DOUBLEBACKTICKED before point if any, does nothing otherwise.
Returns beginning position of DOUBLEBACKTICKED "
(interactive "p")
(ar-th-backward 'doublebackticked no-delimiters))
(defun ar-transpose-doublebackticked-atpt (&optional no-delimiters)
"Transposes DOUBLEBACKTICKED with DOUBLEBACKTICKED before point if any. "