branch: master
commit ed762233142b27589202b70cfe32bbd8d3e5b8ae
Author: Luke Lee
Commit: Luke Lee
Brief mode: Fix for enabling infrequent keys.
* brief/b: Use `brief-easy-start' instead of a long progn list.
* brief/README.org: Add Emacs default setting change info.
* brief/brief.el (brief-easy-start): New function for an easy
quick start, used by 'b' script.
(brief-enable-less-frequent-keys):
New function to enable infrequent keys.
(brief-override-line-number-at-pos):
Remove duplicated defadvice for Emacs versions below 25.
(all defcustom vars): Remove redundant :group declaration.
---
packages/brief/README.org | 33 +++-
packages/brief/b | 11 +--
packages/brief/brief.el | 197 ++
3 files changed, 125 insertions(+), 116 deletions(-)
diff --git a/packages/brief/README.org b/packages/brief/README.org
index 78a6847..9d165a3 100644
--- a/packages/brief/README.org
+++ b/packages/brief/README.org
@@ -1,4 +1,4 @@
-Brief Mode / Brief Emulator -*- mode: org; -*-
+Brief Mode / Brief Emulator / Brief Editor -*- mode: org; -*-
#+STARTUP: showall
#+STARTUP: hidestars
@@ -7,7 +7,8 @@ Brief Mode / Brief Emulator -*- mode: org; -*-
The Brief editor is famous for its easy-to-learn. Most of the command 'K'eys
are
associated with meaningful 'K'eywords. Usually, it can be mastered within an
-hour and difficult to forget.
+hour and difficult to forget. Brief v3.1 was once very popular among
programmers
+in the MS-DOS days.
For example, the first key bring the cursor to home (beginning) of
current
line, a consecutive second key to the home (beginning) of the window
and a
@@ -310,7 +311,35 @@ this Brief Mode.
| Save buffer and exit Emacs immediately|
---X |
|---+|
+
+* There are some less favored default Emacs settings which makes the editing
+ experience in Emacs quite unlike other editors, especially for programmers.
+ For example, text wrapping is by default enabled so a program line could
easily
+ wrapped to next line if window size changed; text scrolling is jumppy in both
+ horizontal and vertical directions and on / the cursor
does
+ not stay at the same position. All these behaviors can be easily adjusted by
+ changing default settings.
+
+ With the quick launcher 'b' all these are fixed. The /
+ are rewritten to behave like other editors while 'b' changed other settings.
+ If you launch Emacs without using 'b' you may want to include those changes
+ into your ~/.emacs init script:
+
+ ;;--;
+ (setq-default truncate-lines t) ;; disable line wrapping ;
+ ;;(setq-default global-visual-line-mode t) ;
+ (setq scroll-step 1 ;; set vertical scroll not jumppy ;
+scroll-conservatively 101);
+ (setq hscroll-margin 1 ;; set horizontal scroll not jumppy;
+hscroll-step 1) ;
+ (scroll-bar-mode -1) ;; small border without scroll bar ;
+ ;;--;
+
+ Or you can refer to the source code "brief.el" for function
`brief-easy-start'.
+
+
* For more details like Cygwin 2.x users note, please check the comments in the
source code "brief.el".
+
Luke Lee
diff --git a/packages/brief/b b/packages/brief/b
index 5d5bd9f..d0c60f8 100755
--- a/packages/brief/b
+++ b/packages/brief/b
@@ -138,13 +138,4 @@ done
# Launch Emacs with Brief mode default settings
-exec ${EMACS} --load ${BRIEFPATH}/brief --eval \
-"(progn \
- (setq-default truncate-lines t) \
- (setq scroll-step 1 \
-scroll-conservatively 101) \
- (setq hscroll-margin 1 \
-hscroll-step 1) \
- (scroll-bar-mode -1) \
- (brief-mode 1))" \
-"${EMACSARGS[@]}"
+exec ${EMACS} --load ${BRIEFPATH}/brief --funcall brief-easy-start
"${EMACSARGS[@]}"
diff --git a/packages/brief/brief.el b/packages/brief/brief.el
index 8353913..08d6f3a 100644
--- a/packages/brief/brief.el
+++ b/packages/brief/brief.el
@@ -2,10 +2,10 @@
;; Copyright (C) 2018 Free Software Foundation, Inc.
-;; Author: Luke Lee
-;; Maintainer: Luke Lee
-;; Keywords: brief, emulations, crisp
-;; Version:5.86
+;; Author: Luke Lee
+;; Maintainer: Luke Lee
+;; Keywords: brief, emulations, crisp
+;; Version: 5.86
;; Package-Type: multi
;; GNU Emacs is free software: you can redistribute it and/or modify
@@ -830,47 +830,41 @@ use either M-x customize or the function `brief-mode'."
"Determine if search & replace commands using regular expression or string.
This is a buffer local variable with default val