summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--lisp/acdw-compat.el69
1 files changed, 34 insertions, 35 deletions
diff --git a/lisp/acdw-compat.el b/lisp/acdw-compat.el index 1d45806..04e42ae 100644 --- a/lisp/acdw-compat.el +++ b/lisp/acdw-compat.el
@@ -42,11 +42,11 @@ Is it necessary? Who knows!!"
42 defvar-local 42 defvar-local
43 defvar-mode-local 43 defvar-mode-local
44 defvaralias)) 44 defvaralias))
45 #'boundp) 45 #'boundp))))
46 (t (error "Don't know how to deal with %S" 46 (push (if test
47 (car form)))))) 47 `(unless (,test ',(cadr form))
48 (push `(unless (,test ',(cadr form)) 48 ,form)
49 ,form) 49 form)
50 output))) 50 output)))
51 `(progn ,@(nreverse output)))) 51 `(progn ,@(nreverse output))))
52 52
@@ -426,6 +426,7 @@ When Repeat mode is enabled, and the command symbol has the property named
426 (define-key map "u" 'undo) 426 (define-key map "u" 'undo)
427 map) 427 map)
428 "Keymap to repeat undo key sequences `C-x u u'. Used in `repeat-mode'.") 428 "Keymap to repeat undo key sequences `C-x u u'. Used in `repeat-mode'.")
429 (put 'undo 'repeat-map 'undo-repeat-map)
429 430
430 (defvar next-error-repeat-map 431 (defvar next-error-repeat-map
431 (let ((map (make-sparse-keymap))) 432 (let ((map (make-sparse-keymap)))
@@ -435,13 +436,17 @@ When Repeat mode is enabled, and the command symbol has the property named
435 (define-key map "\M-p" 'previous-error) 436 (define-key map "\M-p" 'previous-error)
436 map) 437 map)
437 "Keymap to repeat next-error key sequences. Used in `repeat-mode'.") 438 "Keymap to repeat next-error key sequences. Used in `repeat-mode'.")
439 (put 'next-error 'repeat-map 'next-error-repeat-map)
440 (put 'previous-error 'repeat-map 'next-error-repeat-map)
438 441
439 (defvar page-navigation-repeat-map 442 (defvar page-navigation-repeat-map
440 (let ((map (make-sparse-keymap))) 443 (let ((map (make-sparse-keymap)))
441 (define-key map "]" #'forward-page) 444 (define-key map "]" #'forward-page)
442 (define-key map "[" #'backward-page) 445 (define-key map "[" #'backward-page)
443 map) 446 map)
444 "Keymap to repeat page navigation key sequences. Used in `repeat-mode'.") 447 "Keymap to repeat page navigation key sequences. Used in `repeat-mode'.")
448 (put 'forward-page 'repeat-map 'page-navigation-repeat-map)
449 (put 'backward-page 'repeat-map 'page-navigation-repeat-map)
445 450
446 (defvar tab-bar-switch-repeat-map 451 (defvar tab-bar-switch-repeat-map
447 (let ((map (make-sparse-keymap))) 452 (let ((map (make-sparse-keymap)))
@@ -450,6 +455,8 @@ When Repeat mode is enabled, and the command symbol has the property named
450 map) 455 map)
451 "Keymap to repeat tab switch key sequences `C-x t o o O'. 456 "Keymap to repeat tab switch key sequences `C-x t o o O'.
452Used in `repeat-mode'.") 457Used in `repeat-mode'.")
458 (put 'tab-next 'repeat-map 'tab-bar-switch-repeat-map)
459 (put 'tab-previous 'repeat-map 'tab-bar-switch-repeat-map)
453 460
454 (defvar tab-bar-move-repeat-map 461 (defvar tab-bar-move-repeat-map
455 (let ((map (make-sparse-keymap))) 462 (let ((map (make-sparse-keymap)))
@@ -461,6 +468,7 @@ Used in `repeat-mode'.")
461 map) 468 map)
462 "Keymap to repeat tab move key sequences `C-x t m m M'. 469 "Keymap to repeat tab move key sequences `C-x t m m M'.
463Used in `repeat-mode'.") 470Used in `repeat-mode'.")
471 (put 'tab-move 'repeat-map 'tab-bar-move-repeat-map)
464 472
465 (defvar other-window-repeat-map 473 (defvar other-window-repeat-map
466 (let ((map (make-sparse-keymap))) 474 (let ((map (make-sparse-keymap)))
@@ -471,6 +479,7 @@ Used in `repeat-mode'.")
471 (other-window -1))) 479 (other-window -1)))
472 map) 480 map)
473 "Keymap to repeat other-window key sequences. Used in `repeat-mode'.") 481 "Keymap to repeat other-window key sequences. Used in `repeat-mode'.")
482 (put 'other-window 'repeat-map 'other-window-repeat-map)
474 483
475 (defvar resize-window-repeat-map 484 (defvar resize-window-repeat-map
476 (let ((map (make-sparse-keymap))) 485 (let ((map (make-sparse-keymap)))
@@ -482,6 +491,10 @@ Used in `repeat-mode'.")
482 (define-key map "v" 'shrink-window) 491 (define-key map "v" 'shrink-window)
483 map) 492 map)
484 "Keymap to repeat window resizing commands. Used in `repeat-mode'.") 493 "Keymap to repeat window resizing commands. Used in `repeat-mode'.")
494 (put 'enlarge-window 'repeat-map 'resize-window-repeat-map)
495 (put 'enlarge-window-horizontally 'repeat-map 'resize-window-repeat-map)
496 (put 'shrink-window-horizontally 'repeat-map 'resize-window-repeat-map)
497 (put 'shrink-window 'repeat-map 'resize-window-repeat-map)
485 498
486 (defvar outline-navigation-repeat-map 499 (defvar outline-navigation-repeat-map
487 (let ((map (make-sparse-keymap))) 500 (let ((map (make-sparse-keymap)))
@@ -507,35 +520,21 @@ Used in `repeat-mode'.")
507 (define-key map (kbd ">") #'outline-demote) 520 (define-key map (kbd ">") #'outline-demote)
508 (define-key map (kbd "C-<") #'outline-promote) 521 (define-key map (kbd "C-<") #'outline-promote)
509 (define-key map (kbd "<") #'outline-promote) 522 (define-key map (kbd "<") #'outline-promote)
510 map))) 523 map))
511 524
512(with-eval-after-load 'outline 525 (with-eval-after-load 'outline
513 (dolist (command '(outline-backward-same-level 526 (dolist (command '(outline-backward-same-level
514 outline-forward-same-level 527 outline-forward-same-level
515 outline-next-visible-heading 528 outline-next-visible-heading
516 outline-previous-visible-heading 529 outline-previous-visible-heading
517 outline-up-heading)) 530 outline-up-heading))
518 (put command 'repeat-map 'outline-navigation-repeat-map)) 531 (put command 'repeat-map 'outline-navigation-repeat-map))
519 532
520 (dolist (command '(outline-move-subtree-down 533 (dolist (command '(outline-move-subtree-down
521 outline-move-subtree-up 534 outline-move-subtree-up
522 outline-demote 535 outline-demote
523 outline-promote)) 536 outline-promote))
524 (put command 'repeat-map 'outline-editing-repeat-map))) 537 (put command 'repeat-map 'outline-editing-repeat-map))))
525
526(put 'undo 'repeat-map 'undo-repeat-map)
527(put 'next-error 'repeat-map 'next-error-repeat-map)
528(put 'previous-error 'repeat-map 'next-error-repeat-map)
529(put 'forward-page 'repeat-map 'page-navigation-repeat-map)
530(put 'backward-page 'repeat-map 'page-navigation-repeat-map)
531(put 'tab-next 'repeat-map 'tab-bar-switch-repeat-map)
532(put 'tab-previous 'repeat-map 'tab-bar-switch-repeat-map)
533(put 'tab-move 'repeat-map 'tab-bar-move-repeat-map)
534(put 'other-window 'repeat-map 'other-window-repeat-map)
535(put 'enlarge-window 'repeat-map 'resize-window-repeat-map)
536(put 'enlarge-window-horizontally 'repeat-map 'resize-window-repeat-map)
537(put 'shrink-window-horizontally 'repeat-map 'resize-window-repeat-map)
538(put 'shrink-window 'repeat-map 'resize-window-repeat-map)
539 538
540 539
541;;; goto-address-mode 540;;; goto-address-mode