[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] scratch/hyperbole-merge-7.0.2b 7efe2f2 03/23: Removed Koutliner u
From: |
Stefan Monnier |
Subject: |
[elpa] scratch/hyperbole-merge-7.0.2b 7efe2f2 03/23: Removed Koutliner use of filladapt mode; it can cause filling errors |
Date: |
Tue, 5 Feb 2019 16:11:18 -0500 (EST) |
branch: scratch/hyperbole-merge-7.0.2b
commit 7efe2f2b381ef8ad530b5976800af66ae6e4e092
Author: Bob Weiner <address@hidden>
Commit: Bob Weiner <address@hidden>
Removed Koutliner use of filladapt mode; it can cause filling errors
* kotl/kfill.el: Eliminated use of filladapt.el since it causes kotl-mode
filling errors.
* kotl/kfill.el (kfill:forward-line): Removed improperly used [] in
skip-chars-forward.
2017-12-16 Bob Weiner <address@hidden>
* hui.el (hui:key-dir):
hui-window.el (hmouse-at-item-p):
hui-jmenu.el (hui-menu-buffer-mode-name): Simplified using
buffer-local-value.
---
Changes | 12 ++++++++++++
hmouse-drv.el | 32 +++++++++++++++++++++++++++-----
hui-jmenu.el | 5 ++---
hui-mouse.el | 3 ++-
hui-window.el | 2 +-
hui.el | 2 +-
kotl/kfill.el | 13 ++++++++++---
kotl/kotl-mode.el | 4 ++--
8 files changed, 57 insertions(+), 16 deletions(-)
diff --git a/Changes b/Changes
index 5e947a2..ea00ef8 100644
--- a/Changes
+++ b/Changes
@@ -1,3 +1,15 @@
+2017-12-17 Bob Weiner <address@hidden>
+
+* kotl/kfill.el: Eliminated use of filladapt.el since it causes kotl-mode
filling errors.
+
+* kotl/kfill.el (kfill:forward-line): Removed improperly used [] in
skip-chars-forward.
+
+2017-12-16 Bob Weiner <address@hidden>
+
+* hui.el (hui:key-dir):
+ hui-window.el (hmouse-at-item-p):
+ hui-jmenu.el (hui-menu-buffer-mode-name): Simplified using
buffer-local-value.
+
2017-12-15 Bob Weiner <address@hidden>
* hmouse-drv.el (hkey-throw): Fully resolved temporary display of newly
created frames
diff --git a/hmouse-drv.el b/hmouse-drv.el
index 43239e8..55f0800 100644
--- a/hmouse-drv.el
+++ b/hmouse-drv.el
@@ -454,6 +454,25 @@ Leave TO-WINDOW as the selected window."
(aw-select mode-line-text))))
(hkey-swap-buffers (selected-window) to-window))
+;; Once the "display-until.el" library is added to Emacs, hkey-throw can be
simplified to the following:
+;;
+;; (defun hkey-throw (release-window)
+;; "Throw either a displayable item at point or the current buffer for
display in RELEASE-WINDOW.
+;; The selected window does not change."
+;; (interactive
+;; (list (let ((mode-line-text (concat " Ace - " (nth 2 (assq ?t
aw-dispatch-alist)))))
+;; (aw-select mode-line-text))))
+;; (if (cadr (assq major-mode hmouse-drag-item-mode-forms))
+;; ;; Throw the item at point
+;; (let ((action-key-depress-window (selected-window))
+;; (action-key-release-window release-window)
+;; (action-key-depress-args))
+;; (hmouse-item-to-window)
+;; (select-window action-key-depress-window)
+;; (display-window-until release-window))
+;; ;; Throw the current buffer
+;; (display-window-until release-window (current-buffer))))
+
;;;###autoload
(defun hkey-throw (release-window)
"Throw either a displayable item at point or the current buffer for display
in RELEASE-WINDOW.
@@ -461,7 +480,10 @@ The selected window does not change."
(interactive
(list (let ((mode-line-text (concat " Ace - " (nth 2 (assq ?t
aw-dispatch-alist)))))
(aw-select mode-line-text))))
- (let ((depress-frame (selected-frame)))
+ (let ((depress-frame (selected-frame))
+ (display-delay (if (boundp 'temp-display-delay)
+ temp-display-delay
+ 0.5)))
(if (cadr (assq major-mode hmouse-drag-item-mode-forms))
;; Throw the item at point
(let ((action-key-depress-window (selected-window))
@@ -476,7 +498,7 @@ The selected window does not change."
;; input-focus is returned to the depress-frame.
(raise-frame (window-frame release-window))
;; Don't use sit-for here because it can be interrupted early.
- (sleep-for 0.5)
+ (sleep-for display-delay)
)))
;; Throw the current buffer
(set-window-buffer release-window (current-buffer))
@@ -487,7 +509,7 @@ The selected window does not change."
;; input-focus is returned to the depress-frame.
(raise-frame (window-frame release-window))
;; Don't use sit-for here because it can be interrupted early.
- (sleep-for 0.5)
+ (sleep-for display-delay)
(select-frame-set-input-focus depress-frame)))))
;;;###autoload
@@ -896,7 +918,7 @@ Only works when running under a window system, not from a
dumb terminal."
(assist-key-depress)
(when (called-interactively-p 'interactive)
(message
- "Assist Key depressed; go to release point and hit {%s %s}."
+ "Assist Key depressed; go to release point and press {%s %s}."
(substitute-command-keys "\\[universal-argument]")
(substitute-command-keys "\\[hkey-operate]"))))
(if action-key-depressed-flag
@@ -905,7 +927,7 @@ Only works when running under a window system, not from a
dumb terminal."
(message "Action Key released.")))
(action-key-depress)
(when (called-interactively-p 'interactive)
- (message "Action Key depressed; go to release point and hit {%s}."
+ (message "Action Key depressed; go to release point and press {%s}."
(substitute-command-keys "\\[hkey-operate]"))))))
(defun hkey-summarize (&optional current-window)
diff --git a/hui-jmenu.el b/hui-jmenu.el
index 981ab85..5ff0543 100644
--- a/hui-jmenu.el
+++ b/hui-jmenu.el
@@ -141,13 +141,12 @@
;;; ************************************************************************
(defun hui-menu-buffer-mode-name (buffer)
- (let ((mname (cdr (assq 'mode-name (buffer-local-variables buffer)))))
+ (let ((mname (buffer-local-value 'mode-name buffer)))
(if mname
;; Next line needed to ensure mode name is always formatted as
;; a string.
(format-mode-line mname)
- (capitalize (symbol-name
- (cdr (assq 'major-mode (buffer-local-variables buffer))))))))
+ (capitalize (symbol-name (buffer-local-value 'major-mode buffer))))))
(defun hui-menu-frame-name (frame)
"Return the name of FRAME."
diff --git a/hui-mouse.el b/hui-mouse.el
index c46b732..2d32025 100644
--- a/hui-mouse.el
+++ b/hui-mouse.el
@@ -244,7 +244,8 @@ Its default value is #'smart-scroll-down."
;; Python files - ensure this comes before Imenu for more advanced
;; definition lookups
((and (or (and (eq major-mode 'python-mode) buffer-file-name)
- (string-match "^Pydoc:\\|\\*?Python" (buffer-name)))
+ (let ((case-fold-search))
+ (string-match "\\`\\(Pydoc:\\|\\*?Python\\)" (buffer-name))))
(smart-python-at-tag-p)) .
((smart-python) . (smart-python nil 'next-tag)))
;;
diff --git a/hui-window.el b/hui-window.el
index a24f6d8..a77faff 100644
--- a/hui-window.el
+++ b/hui-window.el
@@ -249,7 +249,7 @@ drag release window.")
(defun hmouse-at-item-p ()
"Return t if point is on an item draggable by Hyperbole, otherwise nil."
(let* ((buf (and (window-live-p action-key-depress-window) (window-buffer
action-key-depress-window)))
- (mode (and buf (cdr (assq 'major-mode (buffer-local-variables buf))))))
+ (mode (and buf (buffer-local-value 'major-mode buf))))
(and buf (with-current-buffer buf
;; Point must be on an item, not after one
(not (looking-at "\\s-*$")))
diff --git a/hui.el b/hui.el
index d32ea3d..a0a9228 100644
--- a/hui.el
+++ b/hui.el
@@ -823,7 +823,7 @@ Optional NO-SORT means display in decreasing priority order
(natural order)."
(let ((file (buffer-file-name but-buf)))
(if file
(file-name-directory (hpath:symlink-referent file))
- (cdr (assq 'default-directory (buffer-local-variables but-buf)))))
+ (buffer-local-value 'default-directory but-buf)))
(hypb:error "(hui:key-dir): '%s' is not a valid buffer.")))
(defun hui:key-src (but-buf)
diff --git a/kotl/kfill.el b/kotl/kfill.el
index a8387e8..0ceadb2 100644
--- a/kotl/kfill.el
+++ b/kotl/kfill.el
@@ -16,8 +16,14 @@
;; Quiet byte compiler warnings for this free variable.
(eval-when-compile
- (unless (require 'filladapt nil t)
- (defvar filladapt-function-table nil)))
+ (defvar filladapt-function-table nil))
+
+;; The above formerly looked like this, but the filladapt package is old
+;; and unmaintained and causes improper paragraph filling for
+;; kotl-mode under modern GNU Emacs versions. -- RSW 12/17/2017
+;; (eval-when-compile
+;; (unless (require 'filladapt nil t)
+;; (defvar filladapt-function-table nil)))
;;; ************************************************************************
;;; Public variables
@@ -100,7 +106,7 @@ number of lines that could not be moved, otherwise 0."
(forward-visible-line n)
(if (< n 0)
nil
- (skip-chars-forward "[\n\r]"))
+ (skip-chars-forward "\n\r"))
; (- (abs n) (count-matches "\n" opoint (point)))
0))
@@ -232,6 +238,7 @@ fill prefix at the beginning of each line."
(fill-region-as-paragraph from (point) justify-flag)))))
(defun kfill:funcall (function &rest args)
+ "Call the original FUNCTION with rest of ARGS that kfill overloaded."
(apply (cdr (assq function kfill:function-table)) args))
(defun kfill:hanging-list (paragraph)
diff --git a/kotl/kotl-mode.el b/kotl/kotl-mode.el
index ade18b8..ffb4908 100644
--- a/kotl/kotl-mode.el
+++ b/kotl/kotl-mode.el
@@ -1967,7 +1967,7 @@ If key is pressed:
otherwise hide it;
(3) between cells or within the read-only indentation region to the left of
a cell, then move point to prior location and begin creation of a
- klink to some other outline cell; hit the Action Key twice to select the
+ klink to some other outline cell; press the Action Key twice to select the
link referent cell;
(4) anywhere else, invoke `action-key-eol-function', typically to scroll up
a windowful."
@@ -2002,7 +2002,7 @@ If assist-key is pressed:
each cell in tree beginning at point;
(3) between cells or within the read-only indentation region to the left of
a cell, then move point to prior location and prompt to move one tree to
- a new location in the outline; hit the Action Key twice to select the
+ a new location in the outline; press the Action Key twice to select the
tree to move and where to move it;
(4) anywhere else, invoke `assist-key-eol-function', typically to scroll down
a windowful."
- [elpa] branch scratch/hyperbole-merge-7.0.2b created (now c75213b), Stefan Monnier, 2019/02/05
- [elpa] scratch/hyperbole-merge-7.0.2b e803881 01/23: Fixed a cyclic Lisp library require; improved multi-frame hkey-throw, Stefan Monnier, 2019/02/05
- [elpa] scratch/hyperbole-merge-7.0.2b b7beb76 02/23: Fixed hkey-throw temporary display of a buffer in a new frame, Stefan Monnier, 2019/02/05
- [elpa] scratch/hyperbole-merge-7.0.2b 7efe2f2 03/23: Removed Koutliner use of filladapt mode; it can cause filling errors,
Stefan Monnier <=
- [elpa] scratch/hyperbole-merge-7.0.2b 30600eb 04/23: Added extensive gitlab-reference ibtype; improved github-reference, Stefan Monnier, 2019/02/05
- [elpa] scratch/hyperbole-merge-7.0.2b 1568adb 07/23: Merge Mats TEXINFO_SRC Makefile changes, Stefan Monnier, 2019/02/05
- [elpa] scratch/hyperbole-merge-7.0.2b ad584fd 11/23: Use implicit button org-mode also for org derived modes, Stefan Monnier, 2019/02/05
- [elpa] scratch/hyperbole-merge-7.0.2b f446ee0 22/23: Fixed README.md typo that referred to HY-ABOUT instead of HY-NEWS., Stefan Monnier, 2019/02/05
- [elpa] scratch/hyperbole-merge-7.0.2b 45a0841 12/23: Add default search term for web searches, Stefan Monnier, 2019/02/05
- [elpa] scratch/hyperbole-merge-7.0.2b d4653c5 10/23: Require 2.0 of treemacs and use bury-buffer, Stefan Monnier, 2019/02/05
- [elpa] scratch/hyperbole-merge-7.0.2b c0bd503 05/23: Rebuild doc when doc sources have changed, Stefan Monnier, 2019/02/05
- [elpa] scratch/hyperbole-merge-7.0.2b 5892083 09/23: Use new treemacs 1.18 function treemacs-toggle-node, Stefan Monnier, 2019/02/05
- [elpa] scratch/hyperbole-merge-7.0.2b 450489e 13/23: Adjust tramp-file-name-regexp to work with looking-at, Stefan Monnier, 2019/02/05
- [elpa] scratch/hyperbole-merge-7.0.2b 2e878cb 16/23: Initial commit of Windows path handling, Stefan Monnier, 2019/02/05