[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 882c3f3: Use special-mode in eww list modes
From: |
Mark Oteiza |
Subject: |
[Emacs-diffs] master 882c3f3: Use special-mode in eww list modes |
Date: |
Tue, 13 Oct 2015 12:13:04 +0000 |
branch: master
commit 882c3f365166b77040655c8091ca1010446e8a07
Author: Mark Oteiza <address@hidden>
Commit: Mark Oteiza <address@hidden>
Use special-mode in eww list modes
* lisp/net/eww.el (eww-bookmark-mode, eww-history-mode)
(eww-buffers-mode): Derive from special-mode and remove redundant
setting of buffer-read-only.
(eww-mode-map): Remove redundant keymap parent setting.
(eww-bookmark-mode-map, eww-history-mode-map, eww-buffers-mode-map):
Remove redundant keymap suppressions and mappings.
---
lisp/net/eww.el | 22 ++++++----------------
1 files changed, 6 insertions(+), 16 deletions(-)
diff --git a/lisp/net/eww.el b/lisp/net/eww.el
index d44890f..bda4e0c 100644
--- a/lisp/net/eww.el
+++ b/lisp/net/eww.el
@@ -627,7 +627,6 @@ the like."
(defvar eww-mode-map
(let ((map (make-sparse-keymap)))
- (set-keymap-parent map special-mode-map)
(define-key map "g" 'eww-reload) ;FIXME: revert-buffer-function instead!
(define-key map "G" 'eww)
(define-key map [?\t] 'shr-next-link)
@@ -1583,8 +1582,6 @@ If CHARSET is nil then use UTF-8."
(defvar eww-bookmark-mode-map
(let ((map (make-sparse-keymap)))
- (suppress-keymap map)
- (define-key map "q" 'quit-window)
(define-key map [(control k)] 'eww-bookmark-kill)
(define-key map [(control y)] 'eww-bookmark-yank)
(define-key map "\r" 'eww-bookmark-browse)
@@ -1601,13 +1598,12 @@ If CHARSET is nil then use UTF-8."
:active eww-bookmark-kill-ring]))
map))
-(define-derived-mode eww-bookmark-mode nil "eww bookmarks"
+(define-derived-mode eww-bookmark-mode special-mode "eww bookmarks"
"Mode for listing bookmarks.
\\{eww-bookmark-mode-map}"
(buffer-disable-undo)
- (setq buffer-read-only t
- truncate-lines t))
+ (setq truncate-lines t))
;;; History code
@@ -1670,8 +1666,6 @@ If CHARSET is nil then use UTF-8."
(defvar eww-history-mode-map
(let ((map (make-sparse-keymap)))
- (suppress-keymap map)
- (define-key map "q" 'quit-window)
(define-key map "\r" 'eww-history-browse)
;; (define-key map "n" 'next-error-no-select)
;; (define-key map "p" 'previous-error-no-select)
@@ -1684,13 +1678,12 @@ If CHARSET is nil then use UTF-8."
:active (get-text-property (line-beginning-position) 'eww-history)]))
map))
-(define-derived-mode eww-history-mode nil "eww history"
+(define-derived-mode eww-history-mode special-mode "eww history"
"Mode for listing eww-histories.
\\{eww-history-mode-map}"
(buffer-disable-undo)
- (setq buffer-read-only t
- truncate-lines t))
+ (setq truncate-lines t))
;;; eww buffers list
@@ -1795,8 +1788,6 @@ If CHARSET is nil then use UTF-8."
(defvar eww-buffers-mode-map
(let ((map (make-sparse-keymap)))
- (suppress-keymap map)
- (define-key map "q" 'quit-window)
(define-key map [(control k)] 'eww-buffer-kill)
(define-key map "\r" 'eww-buffer-select)
(define-key map "n" 'eww-buffer-show-next)
@@ -1812,13 +1803,12 @@ If CHARSET is nil then use UTF-8."
:active (get-text-property (line-beginning-position) 'eww-buffer)]))
map))
-(define-derived-mode eww-buffers-mode nil "eww buffers"
+(define-derived-mode eww-buffers-mode special-mode "eww buffers"
"Mode for listing buffers.
\\{eww-buffers-mode-map}"
(buffer-disable-undo)
- (setq buffer-read-only t
- truncate-lines t))
+ (setq truncate-lines t))
;;; Desktop support
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 882c3f3: Use special-mode in eww list modes,
Mark Oteiza <=