emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] scratch/hyperbole a269d1536e 16/16: * hversion.el: Add FIXMEs.


From: Stefan Monnier
Subject: [elpa] scratch/hyperbole a269d1536e 16/16: * hversion.el: Add FIXMEs.
Date: Mon, 19 Jun 2023 22:36:45 -0400 (EDT)

branch: scratch/hyperbole
commit a269d1536eb3ef29700b5609d48b898b824b0984
Author: Stefan Monnier <monnier@iro.umontreal.ca>
Commit: Stefan Monnier <monnier@iro.umontreal.ca>

    * hversion.el: Add FIXMEs.
    (hyperb:window-sys-term): Simplify since (string-match "[-_]" term)
    always returns nil here.
    (hyperb:automount-prefixes): Remove unused var.
    (id-info-item): Remove unused backslash.
---
 hmouse-drv.el |  1 +
 hversion.el   | 18 +++++++++---------
 2 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/hmouse-drv.el b/hmouse-drv.el
index 9d22f9a1dd..1ba80993b2 100644
--- a/hmouse-drv.el
+++ b/hmouse-drv.el
@@ -1622,6 +1622,7 @@ return current point as a marker."
   (and (car args) (listp (car args)) (setq args (car args)))
   (if (and args (hyperb:window-system))
       (progn (hmouse-set-point-at args) args)
+    ;; FIXME: This doesn't "Set point to ..."!?
     (list 'keyboard-drag (posn-at-point))))
 
 (defun hmouse-set-point-at (set-point-arg-list)
diff --git a/hversion.el b/hversion.el
index 653952d84f..4d4105a64d 100644
--- a/hversion.el
+++ b/hversion.el
@@ -37,12 +37,6 @@
 Override this if the system-computed default is incorrect for
 your specific mouse.")
 
-(defvar hyperb:automount-prefixes
-  (if (and (boundp 'automount-dir-prefix) (stringp automount-dir-prefix))
-      automount-dir-prefix
-    "^/tmp_mnt/"
-    "Regexp to match any automounter prefix in a pathname."))
-
 ;;; ************************************************************************
 ;;; Public declarations
 ;;; ************************************************************************
@@ -56,6 +50,7 @@ your specific mouse.")
   "Return first part of the term-type if running under a window system, else 
nil.
 Where a part in the term-type is delimited by a `-' or  an `_'."
   (unless frame (setq frame (selected-frame)))
+  ;; FIXME: Do we still care about XEmacs's `device-type'?
   (let* ((display-type (if (fboundp 'device-type) (device-type) window-system))
         (term (cond ((or (memq display-type '(x gtk mswindows win32 w32 ns dps 
pm))
                          ;; May be a graphical client spawned from a
@@ -65,20 +60,25 @@ Where a part in the term-type is delimited by a `-' or  an 
`_'."
                          (display-mouse-p))
                      ;; X11, macOS, NEXTSTEP (DPS), or OS/2 Presentation 
Manager (PM)
                      "emacs")
+                    ;; FIXME: Do we still care about NeXT?
                     ((or (featurep 'eterm-fns)
                          (equal (getenv "TERM") "NeXT")
                          (equal (getenv "TERM") "eterm"))
                      ;; NEXTSTEP add-on support to Emacs
                      "next"))))
-    (set-frame-parameter frame 'hyperb:window-system
-                        (and term (setq term (substring term 0 (string-match 
"[-_]" term)))))
+    (set-frame-parameter frame 'hyperb:window-system term)
     term))
 
 (defun hyperb:window-system (&optional frame)
+  ;; FIXME: This apparently can return only "emacs", "next", or nil.
+  ;; What do these things mean?  What does "window system available" mean?
+  ;; What does "mouse available mean"?
   "Return name of window system or term type where the selected FRAME is 
running.
 If nil after system initialization, no window system or mouse
 support is available."
   (unless frame (setq frame (selected-frame)))
+  ;; FIXME: Why not compute it on the fly rather than precomputing it
+  ;; via a hook and then saving it as a frame property?
   (frame-parameter frame 'hyperb:window-system))
 
 ;; Each frame could be on a different window system when under a
@@ -122,7 +122,7 @@ support is available."
             ;; Force execution of Info-mode-hook which adds the
             ;; Hyperbole man directory to Info-directory-list.
             (info)
-            (if (string-match "^(\\([^\)]+\\))\\(.*\\)" index-item)
+            (if (string-match "^(\\([^)]+\\))\\(.*\\)" index-item)
                 (let ((file (match-string-no-properties 1 index-item))
                       (item-name (match-string-no-properties 2 index-item)))
                   (if (and file (setq file (hpath:substitute-value file)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]