6
6
; ; Keywords: extensions, tools
7
7
; ; URL: https://github.com/kaiwk/leetcode.el
8
8
; ; Package-Requires: ((emacs "26.1") (dash "2.16.0") (graphql "0.1.1") (spinner "1.7.3") (aio "1.0") (log4e "0.3.3"))
9
- ; ; Version: 0.1.26
9
+ ; ; Version: 0.1.27
10
10
11
11
; ; This program is free software; you can redistribute it and/or modify
12
12
; ; it under the terms of the GNU General Public License as published by
@@ -1326,8 +1326,6 @@ It will restore the layout based on current buffer's name."
1326
1326
(define-key map " B" #'leetcode-show-problem-in-browser )
1327
1327
(define-key map " c" #'leetcode-solve-current-problem )
1328
1328
(define-key map " C" #'leetcode-solve-problem )
1329
- (define-key map " n" #'next-line )
1330
- (define-key map " p" #'previous-line )
1331
1329
(define-key map " s" #'leetcode-set-filter-regex )
1332
1330
(define-key map " l" #'leetcode-set-prefer-language )
1333
1331
(define-key map " t" #'leetcode-set-filter-tag )
@@ -1348,16 +1346,22 @@ It will restore the layout based on current buffer's name."
1348
1346
:group 'leetcode
1349
1347
:keymap leetcode--problems-mode-map)
1350
1348
1349
+ (defun leetcode--set-evil-local-map (map )
1350
+ " Set `evil-normal-state-local-map' to MAP."
1351
+ (when (and (featurep 'evil ))
1352
+ (setq evil-normal-state-local-map map)))
1353
+
1351
1354
(add-hook 'leetcode--problems-mode-hook #'hl-line-mode )
1355
+ (add-hook 'leetcode--problems-mode-hook
1356
+ (lambda () (leetcode--set-evil-local-map leetcode--problems-mode-map)))
1352
1357
1353
1358
; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Detail Mode ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1354
1359
1355
1360
(defvar leetcode--problem-detail-mode-map
1356
1361
(let ((map (make-sparse-keymap )))
1357
1362
(prog1 map
1358
1363
(suppress-keymap map)
1359
- (define-key map " n" #'next-line )
1360
- (define-key map " p" #'previous-line )))
1364
+ (define-key map " q" #'quit-window )))
1361
1365
" Keymap for `leetcode--problem-detail-mode' ." )
1362
1366
1363
1367
(define-derived-mode leetcode--problem-detail-mode
@@ -1366,6 +1370,9 @@ It will restore the layout based on current buffer's name."
1366
1370
:group 'leetcode
1367
1371
:keymap leetcode--problem-detail-mode-map)
1368
1372
1373
+ (add-hook 'leetcode--problem-detail-mode-hook
1374
+ (lambda () (leetcode--set-evil-local-map leetcode--problem-detail-mode-map)))
1375
+
1369
1376
; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Loading Mode ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1370
1377
1371
1378
; ;; Use spinner.el to show progress indicator
0 commit comments