Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,24 @@

2022-10-16 Mats Lidell <matsl@gnu.org>

* kotl/klink.el (hmouse-tag): Require hmouse-tag.
* hui-mouse.el (imenu): Require imenu.
* hmouse-sh.el (kmacro): Require kmacro.

* kotl/kotl-mode.el (cmpl-last-insert-location, cmpl-original-string)
(completion-to-accept):
* hyrolo.el (org-roam-directory, org-roam-db-autosync-mode)
(markdown-regex-header):
* hui-mouse.el (magit-root-section):
* hsettings.el (helm-allow-mouse):
* hmouse-info.el (Info-complete-menu-buffer):
* hmouse-drv.el (start-window):
* hload-path.el (generated-autoload-file): Declare variable.

* hargs.el (hargs:reading-symbol): Define variable.

2022-10-16 Mats Lidell <matsl@gnu.org>

* kotl/kview.el (kview:insert-contents): Don't use global name for
parameter.
(kview:set-label-separator): Remove unused variable.
Expand Down
6 changes: 5 additions & 1 deletion hargs.el
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
;; Author: Bob Weiner
;;
;; Orig-Date: 31-Oct-91 at 23:17:35
;; Last-Mod: 7-Oct-22 at 22:40:26 by Mats Lidell
;; Last-Mod: 12-Oct-22 at 22:30:53 by Mats Lidell
;;
;; Copyright (C) 1991-2022 Free Software Foundation, Inc.
;; See the "HY-COPY" file for license information.
Expand All @@ -30,6 +30,7 @@
(require 'hpath)
(require 'hypb)
(require 'set)
(require 'info)

;;; ************************************************************************
;;; Public variables
Expand Down Expand Up @@ -665,6 +666,9 @@ help when appropriate."
;;; Private variables
;;; ************************************************************************

(defvar hargs:reading-symbol nil
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could not see that this dynamic variable is defined anywhere. Should it not be that?

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we really need to add tests of the behavior of each of these variables first to ensure that these defvars do not interfere with any initializations that may take place in other modules/systems, notably for non-Hyperbole variables. Then we can apply the changes and verify things are good via the tests rather than worry about any behavior change, as some of these definitely were meant to perform with dynamic scope in the past.

Copy link
Copy Markdown
Collaborator Author

@matsl matsl Oct 16, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding test cases is a good idea but might be overkill and I'm not sure it is that straight forward in all cases to actually test the dynamic variables. So could take some time.

The hargs:reading-symbol is a hyperbole variable that I suppose is used as a cache remembering the current symbol that is read so setting it to nil initially should not matter since it would be overwritten all the time. But since it is variable defined by Hyperbole IMHO it is clearer to give it an initial value than to not define it at all!?

For the other defvars they do not initialize them but define them as being in the dynamic scope, and silence the warnings. So should only make the code be more in line with the good old dynamic days. We have used this technique in the past to remove the warnings for the undefined variable that originate from other packages. Is there any way that these defvars could change behavior?

"Remember what symbol is being read.")

(defconst hargs:iform-vector
(hargs:make-iform-vector
;; Get function symbol.
Expand Down
7 changes: 6 additions & 1 deletion hload-path.el
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
;; Author: Bob Weiner
;;
;; Orig-Date: 29-Jun-16 at 14:39:33
;; Last-Mod: 20-Oct-22 at 23:20:50 by Mats Lidell
;; Last-Mod: 23-Oct-22 at 00:38:27 by Mats Lidell
;;
;; Copyright (C) 1992-2022 Free Software Foundation, Inc.
;; See the "HY-COPY" file for license information.
Expand All @@ -14,6 +14,11 @@

;;; Code:

;;; ************************************************************************
;;; Public declarations
;;; ************************************************************************
(defvar generated-autoload-file)

;;; ************************************************************************
;;; Public variables
;;; ************************************************************************
Expand Down
7 changes: 6 additions & 1 deletion hmouse-drv.el
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
;; Author: Bob Weiner
;;
;; Orig-Date: 04-Feb-90
;; Last-Mod: 7-Oct-22 at 23:30:30 by Mats Lidell
;; Last-Mod: 12-Oct-22 at 23:12:43 by Mats Lidell
;;
;; Copyright (C) 1989-2021 Free Software Foundation, Inc.
;; See the "HY-COPY" file for license information.
Expand All @@ -20,6 +20,11 @@
(require 'hui-window)
(require 'hypb)

;;; ************************************************************************
;;; Public declarations
;;; ************************************************************************
(defvar start-window)

;;; ************************************************************************
;;; Public variables
;;; ************************************************************************
Expand Down
7 changes: 6 additions & 1 deletion hmouse-info.el
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
;; Author: Bob Weiner
;;
;; Orig-Date: 04-Apr-89
;; Last-Mod: 25-Jul-22 at 23:34:19 by Mats Lidell
;; Last-Mod: 12-Oct-22 at 22:52:44 by Mats Lidell
;;
;; Copyright (C) 1989-2022 Free Software Foundation, Inc.
;; See the "HY-COPY" file for license information.
Expand All @@ -23,6 +23,11 @@

(require 'info)

;;; ************************************************************************
;;; Public declarations
;;; ************************************************************************
(defvar Info-complete-menu-buffer)

;;; ************************************************************************
;;; Public functions
;;; ************************************************************************
Expand Down
3 changes: 2 additions & 1 deletion hmouse-sh.el
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
;; Author: Bob Weiner
;;
;; Orig-Date: 3-Sep-91 at 21:40:58
;; Last-Mod: 13-Oct-22 at 22:02:30 by Mats Lidell
;; Last-Mod: 16-Oct-22 at 19:32:50 by Mats Lidell
;;
;; Copyright (C) 1991-2022 Free Software Foundation, Inc.
;; See the "HY-COPY" file for license information.
Expand All @@ -20,6 +20,7 @@
;;; ************************************************************************

(require 'hvar)
(require 'kmacro)

;;; ************************************************************************
;;; Public declarations
Expand Down
4 changes: 3 additions & 1 deletion hsettings.el
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
;; Author: Bob Weiner
;;
;; Orig-Date: 15-Apr-91 at 00:48:49
;; Last-Mod: 1-Aug-22 at 21:34:56 by Mats Lidell
;; Last-Mod: 12-Oct-22 at 22:46:00 by Mats Lidell
;;
;; Copyright (C) 1991-2022 Free Software Foundation, Inc.
;; See the "HY-COPY" file for license information.
Expand Down Expand Up @@ -33,6 +33,8 @@
;;; ************************************************************************
(declare-function hproperty:but-create "hui-em-but")

(defvar helm-allow-mouse)

;;; Read the comments and modify as desired.

;;; ************************************************************************
Expand Down
8 changes: 7 additions & 1 deletion hui-mouse.el
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
;; Author: Bob Weiner
;;
;; Orig-Date: 04-Feb-89
;; Last-Mod: 9-Oct-22 at 18:14:25 by Bob Weiner
;; Last-Mod: 16-Oct-22 at 19:29:34 by Mats Lidell
;;
;; Copyright (C) 1991-2022 Free Software Foundation, Inc.
;; See the "HY-COPY" file for license information.
Expand Down Expand Up @@ -45,9 +45,15 @@
(require 'hmouse-info))
(unless (fboundp 'smart-c-at-tag-p)
(require 'hmouse-tag))
(require 'imenu)

(eval-when-compile (require 'tar-mode))

;;; ************************************************************************
;;; Public declarations
;;; ************************************************************************
(defvar magit-root-section)

;;; ************************************************************************
;;; Public variables
;;; ************************************************************************
Expand Down
9 changes: 8 additions & 1 deletion hyrolo.el
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
;; Author: Bob Weiner
;;
;; Orig-Date: 7-Jun-89 at 22:08:29
;; Last-Mod: 7-Oct-22 at 22:03:04 by Mats Lidell
;; Last-Mod: 12-Oct-22 at 22:47:51 by Mats Lidell
;;
;; Copyright (C) 1991-2022 Free Software Foundation, Inc.
;; See the "HY-COPY" file for license information.
Expand Down Expand Up @@ -40,6 +40,13 @@
(defvar google-contacts-buffer-name nil))
(defvar next-entry-exists nil))

;;; ************************************************************************
;;; Public declarations
;;; ************************************************************************
(defvar org-roam-directory)
(defvar org-roam-db-autosync-mode)
(defvar markdown-regex-header)

;;; ************************************************************************
;;; Public variables
;;; ************************************************************************
Expand Down
3 changes: 2 additions & 1 deletion kotl/klink.el
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
;; Author: Bob Weiner
;;
;; Orig-Date: 15-Nov-93 at 12:15:16
;; Last-Mod: 18-Sep-22 at 09:55:49 by Bob Weiner
;; Last-Mod: 12-Oct-22 at 21:21:34 by Mats Lidell
;;
;; Copyright (C) 1993-2022 Free Software Foundation, Inc.
;; See the "../HY-COPY" file for license information.
Expand Down Expand Up @@ -62,6 +62,7 @@
;;; ************************************************************************

(require 'subr-x) ;; For string-trim
(require 'hmouse-tag) ;; For smart-c-include-regexp
(eval-when-compile (require 'hbut)) ;; For defib.

;;; ************************************************************************
Expand Down
10 changes: 9 additions & 1 deletion kotl/kotl-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
;; Author: Bob Weiner
;;
;; Orig-Date: 6/30/93
;; Last-Mod: 9-Oct-22 at 16:25:35 by Bob Weiner
;; Last-Mod: 16-Oct-22 at 19:29:20 by Mats Lidell
;;
;; Copyright (C) 1993-2022 Free Software Foundation, Inc.
;; See the "../HY-COPY" file for license information.
Expand All @@ -20,6 +20,14 @@
(eval-and-compile (mapc #'require '(cl-lib delsel hsettings hmail hypb kfile
kvspec kcell outline org org-table kotl-orgtbl)))

;;; ************************************************************************
;;; Public declarations
;;; ************************************************************************

(defvar cmpl-last-insert-location)
(defvar cmpl-original-string)
(defvar completion-to-accept)

;;; ************************************************************************
;;; Public variables
;;; ************************************************************************
Expand Down