Skip to content

Commit d62e83f

Browse files
Fredrik Axelssonjobbflykt
authored andcommitted
Name interactive functions consistently.
1 parent 7512d07 commit d62e83f

File tree

2 files changed

+27
-28
lines changed

2 files changed

+27
-28
lines changed

x509-mode-tests.el

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -562,31 +562,31 @@ nested.der should contain:
562562
(let ((result-buffer (x509-viewasn1)))
563563
(unwind-protect
564564
(with-current-buffer result-buffer
565-
(x509--asn1-offset-down)
565+
(x509-asn1-offset-down)
566566
(should
567567
(equal x509--x509-asn1-mode-offset-stack '(("-offset" 2 2 1))))
568568
;; Move point and verify it's restored when going up later
569569
(forward-char 4)
570-
(x509--asn1-offset-down)
570+
(x509-asn1-offset-down)
571571
(should
572572
(equal
573573
x509--x509-asn1-mode-offset-stack
574574
'(("-offset" 4 2 5) ("-offset" 2 2 1))))
575575
(should
576576
(looking-at
577577
" 0:d=0 hl=2 l= 1 prim: INTEGER :-06"))
578-
(x509--asn1-offset-up)
578+
(x509-asn1-offset-up)
579579
(should
580580
(equal x509--x509-asn1-mode-offset-stack '(("-offset" 2 2 1))))
581581
(should (equal (point) 5))
582-
(x509--asn1-offset-up)
582+
(x509-asn1-offset-up)
583583
(should (null x509--x509-asn1-mode-offset-stack))
584584
;; Going up from top does nothing
585-
(x509--asn1-offset-up)
585+
(x509-asn1-offset-up)
586586
(should (looking-at " 0:d=0 hl=2 l= 5 cons: SEQUENCE")))
587587
(kill-buffer result-buffer)))))
588588

589-
(ert-deftest x509--asn1-strparse ()
589+
(ert-deftest x509-asn1-strparse ()
590590
"Verify that going down and up in nested ASN.1 structures works.
591591
nested_bitstrings.bin should contain:
592592
SEQUENCE 30 0C
@@ -604,26 +604,26 @@ SEQUENCE 30 0C
604604
(unwind-protect
605605
(with-current-buffer result-buffer
606606
(forward-line 1)
607-
(x509--asn1-strparse)
607+
(x509-asn1-strparse)
608608
(should
609609
(equal x509--x509-asn1-mode-offset-stack '(("-strparse" 2 3 49))))
610610
;; Move point and verify it's restored when going up later
611611
(forward-char 4)
612-
(x509--asn1-strparse)
612+
(x509-asn1-strparse)
613613
(should
614614
(equal
615615
x509--x509-asn1-mode-offset-stack
616616
'(("-strparse" 5 3 5) ("-strparse" 2 3 49))))
617617
(should
618618
(looking-at " 0:d=0 hl=2 l= 4 prim: BIT STRING "))
619-
(x509--asn1-offset-up)
619+
(x509-asn1-offset-up)
620620
(should
621621
(equal x509--x509-asn1-mode-offset-stack '(("-strparse" 2 3 49))))
622622
(should (equal (point) 5))
623-
(x509--asn1-offset-up)
623+
(x509-asn1-offset-up)
624624
(should (null x509--x509-asn1-mode-offset-stack))
625625
;; Going up from top does nothing
626-
(x509--asn1-offset-up)
626+
(x509-asn1-offset-up)
627627
(should (looking-at " 2:d=1 hl=2 l= 10 prim: BIT STRING")))
628628
(kill-buffer result-buffer)))))
629629

x509-mode.el

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ Skip blank lines and comment lines. Return list."
429429
'x509-hex-string-face)))
430430
"OpenSSL x509 highlighting.")
431431

432-
(defun x509-mode--kill-buffer ()
432+
(defun x509-mode-kill-buffer ()
433433
"Kill current buffer."
434434
(interactive)
435435
(set-buffer-modified-p nil)
@@ -446,9 +446,9 @@ Skip blank lines and comment lines. Return list."
446446
:interactive nil
447447
:group 'x509
448448
(set (make-local-variable 'font-lock-defaults) '(x509-font-lock-keywords t))
449-
(keymap-set x509-mode-map "q" #'x509-mode--kill-buffer)
450-
(keymap-set x509-mode-map "t" #'x509--toggle-mode)
451-
(keymap-set x509-mode-map "e" #'x509--edit-params)
449+
(keymap-set x509-mode-map "q" #'x509-mode-kill-buffer)
450+
(keymap-set x509-mode-map "t" #'x509-toggle-mode)
451+
(keymap-set x509-mode-map "e" #'x509-edit-params)
452452
(x509--mark-browse-http-links)
453453
(x509--mark-browse-oid))
454454

@@ -598,7 +598,6 @@ variables. NO-HOOKS also ensures that process output isn't
598598
decoded, i.e. data is inserted into buffer as binary.
599599
600600
Return output buffer."
601-
(interactive)
602601
(let* ((buf
603602
(or output-buf
604603
(generate-new-buffer
@@ -718,7 +717,7 @@ Switch to resulting buffer and return it."
718717
("asn1parse" 'x509--viewasn1-history)
719718
(_ nil)))
720719

721-
(defun x509--toggle-mode (&optional edit)
720+
(defun x509-toggle-mode (&optional edit)
722721
"Toggle between asn1-mode and `x509-mode'.
723722
724723
If EDIT is non-'nil', edit current command arguments and redisplay."
@@ -741,10 +740,10 @@ If EDIT is non-'nil', edit current command arguments and redisplay."
741740
x509--shadow-buffer
742741
(current-buffer)))))
743742

744-
(defun x509--edit-params ()
743+
(defun x509-edit-params ()
745744
"Edit command parameters in current buffer."
746745
(interactive)
747-
(x509--toggle-mode t))
746+
(x509-toggle-mode t))
748747

749748
;; ---------------------------------------------------------------------------
750749
(defvar x509--viewcert-history nil
@@ -1078,19 +1077,19 @@ to get it right but it can get confusing."
10781077
(current-buffer))
10791078
(x509--asn1-update-mode-line)))
10801079

1081-
(defun x509--asn1-offset-down ()
1080+
(defun x509-asn1-offset-down ()
10821081
"Add -offset N argument to current asn1 command line and redisplay.
10831082
Offset is calculated from offset on current line."
10841083
(interactive)
10851084
(x509--asn1-offset-strparse "-offset"))
10861085

1087-
(defun x509--asn1-strparse ()
1086+
(defun x509-asn1-strparse ()
10881087
"Add -strparse N argument to current asn1 command line and redisplay.
10891088
Offset is calculated from offset on current line."
10901089
(interactive)
10911090
(x509--asn1-offset-strparse "-strparse"))
10921091

1093-
(defun x509--asn1-offset-up ()
1092+
(defun x509-asn1-offset-up ()
10941093
"Pop offset and redisplay."
10951094
(interactive)
10961095
(when (and (boundp 'x509--x509-asn1-mode-offset-stack)
@@ -1419,12 +1418,12 @@ The ASN.1 header uses `x509-asn1-hexl-header' face and the value uses the
14191418
:group 'x509
14201419
(set
14211420
(make-local-variable 'font-lock-defaults) '(x509-asn1-font-lock-keywords t))
1422-
(keymap-set x509-asn1-mode-map "q" #'x509-mode--kill-buffer)
1423-
(keymap-set x509-asn1-mode-map "t" #'x509--toggle-mode)
1424-
(keymap-set x509-asn1-mode-map "e" #'x509--edit-params)
1425-
(keymap-set x509-asn1-mode-map "d" #'x509--asn1-offset-down)
1426-
(keymap-set x509-asn1-mode-map "s" #'x509--asn1-strparse)
1427-
(keymap-set x509-asn1-mode-map "u" #'x509--asn1-offset-up)
1421+
(keymap-set x509-asn1-mode-map "q" #'x509-mode-kill-buffer)
1422+
(keymap-set x509-asn1-mode-map "t" #'x509-toggle-mode)
1423+
(keymap-set x509-asn1-mode-map "e" #'x509-edit-params)
1424+
(keymap-set x509-asn1-mode-map "d" #'x509-asn1-offset-down)
1425+
(keymap-set x509-asn1-mode-map "s" #'x509-asn1-strparse)
1426+
(keymap-set x509-asn1-mode-map "u" #'x509-asn1-offset-up)
14281427
(keymap-set x509-asn1-mode-map "x" #'x509-asn1-toggle-hexl)
14291428
(x509--mark-browse-http-links)
14301429
(x509--mark-browse-oid))

0 commit comments

Comments
 (0)