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

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

[nongnu] elpa/helm 8af377a9cb 2/2: Fix various byte compiler warnings fo


From: ELPA Syncer
Subject: [nongnu] elpa/helm 8af377a9cb 2/2: Fix various byte compiler warnings for emacs-29
Date: Sat, 23 Jul 2022 02:58:39 -0400 (EDT)

branch: elpa/helm
commit 8af377a9cb52051d98caf710845d9d456e6290ee
Author: Thierry Volpiatto <thievol@posteo.net>
Commit: Thierry Volpiatto <thievol@posteo.net>

    Fix various byte compiler warnings for emacs-29
    
    Declare some functions, move some code from helm-utils to helm-core,
    move internals vars in helm-core on top and fix some single quotes in
    docstrings.
---
 .dir-locals.el |   2 +-
 helm-core.el   | 317 +++++++++++++++++++++++++++++++--------------------------
 helm-eval.el   |   2 +
 helm-files.el  |   2 +-
 helm-utils.el  |  26 -----
 5 files changed, 178 insertions(+), 171 deletions(-)

diff --git a/.dir-locals.el b/.dir-locals.el
index 5ed84320e7..8cbef6a420 100644
--- a/.dir-locals.el
+++ b/.dir-locals.el
@@ -3,6 +3,6 @@
 
 ((nil . ((bug-reference-bug-regexp . "\\(\\b\\(?:[Ii]ssue ?#?\\|[Bb]ug 
?#?\\|[Pp]atch ?#\\|RFE ?#\\|PR [a-z+-]+/\\)\\([0-9]+\\(?:#[0-9]+\\)?\\)\\)")
          (bug-reference-url-format . 
"https://github.com/emacs-helm/helm/issues/%s";)
-         (byte-compile-warnings . (not obsolete not docstrings))))
+         (byte-compile-warnings . (not obsolete docstrings 
docstrings-non-ascii-quotes))))
  (emacs-lisp-mode . ((mode . bug-reference-prog)
                      (indent-tabs-mode . nil))))
diff --git a/helm-core.el b/helm-core.el
index 82ee28290d..0ba271b9de 100644
--- a/helm-core.el
+++ b/helm-core.el
@@ -43,9 +43,154 @@
 
 (declare-function helm-comp-read "helm-mode.el")
 (declare-function custom-unlispify-tag-name "cus-edit.el")
+(declare-function helm-quit-and-find-file "helm-utils.el")
 
 (defvar helm-marked-buffer-name)
 
+
+;;; Internal Variables
+;;
+;;
+(defvar helm-source-filter nil
+  "A list of source names to be displayed.
+Other sources won't appear in the search results.
+If nil, no filtering is done.
+Don't set this directly, use `helm-set-source-filter' during a
+Helm session to modify it.")
+(defvar helm-saved-action nil
+  "Saved value of the currently selected action by key.")
+(defvar helm-saved-current-source nil
+  "Value of the current source when the action list is shown.")
+(defvar helm-in-persistent-action nil
+  "Flag whether in persistent-action or not.")
+(defvar helm-last-buffer nil
+  "`helm-buffer' of a previous Helm session.")
+(defvar helm-saved-selection nil
+  "Value of the currently selected object when the action list is shown.")
+(defvar helm-sources nil
+  "[INTERNAL] Value of current sources in use, a list of alists.
+The list of sources (symbols or alists) is normalized to alists
+in `helm-initialize'.")
+(defvar helm-buffer-file-name nil
+  "Variable `buffer-file-name' when Helm is invoked.")
+(defvar helm-candidate-cache (make-hash-table :test 'equal)
+  "Holds the available candidate within a single Helm invocation.")
+(defvar helm--candidate-buffer-alist nil)
+(defvar helm-input ""
+  "The input typed in the candidates panel.")
+(defvar helm-input-local nil
+  "Internal, store locally `helm-pattern' value for later use in 
`helm-resume'.")
+(defvar helm--source-name nil)
+(defvar helm-current-source nil)
+(defvar helm-issued-errors nil)
+(defvar helm--last-log-file nil
+  "The name of the log file of the last Helm session.")
+(defvar helm--local-variables nil)
+(defvar helm-split-window-state nil)
+(defvar helm--window-side-state nil)
+(defvar helm-selection-point nil
+  "The value of point at selection.")
+(defvar helm-alive-p nil)
+(defvar helm-visible-mark-overlays nil)
+(defvar helm-update-blacklist-regexps '("^" "^ *" "$" "!" " " "\\b"
+                                        "\\<" "\\>" "\\_<" "\\_>" ".*"
+                                        "??" "?*" "*?" "?"))
+(defvar helm--force-updating-p nil
+  "[INTERNAL] Don't use this in your programs.")
+(defvar helm-exit-status 0
+  "Flag to inform if Helm did exit or quit.
+0 means Helm did exit when executing an action.
+1 means Helm did quit with \\[keyboard-quit]
+Knowing this exit-status could help restore a window config when
+Helm aborts in some special circumstances.  See
+`helm-exit-minibuffer' and `helm-keyboard-quit'.")
+(defvar helm-minibuffer-confirm-state nil)
+(defvar helm--quit nil)
+(defvar helm-buffers nil
+  "Helm buffers listed in order of most recently used.")
+(defvar helm-current-position nil
+  "Cons of (point . window-start)  when Helm is invoked.
+`helm-current-buffer' uses this to restore position after
+`helm-keyboard-quit'")
+(defvar helm-last-frame-or-window-configuration nil
+  "Used to store window or frame configuration at Helm start.")
+(defvar helm-onewindow-p nil)
+(defvar helm-types nil)
+(defvar helm--mode-line-string-real nil) ; The string to display in mode-line.
+(defvar helm-persistent-action-display-window nil)
+(defvar helm-marked-candidates nil
+  "Marked candidates.  List of (source . real) pair.")
+(defvar helm--mode-line-display-prefarg nil)
+(defvar helm--temp-follow-flag nil
+  "[INTERNAL] A simple flag to notify persistent action we are following.")
+(defvar helm--reading-passwd-or-string nil)
+(defvar helm--in-update nil)
+(defvar helm--in-fuzzy nil)
+(defvar helm-maybe-use-default-as-input nil
+  "Flag to notify the use of use-default-as-input.
+Use only in let-bindings.
+Use :default arg of `helm' as input to update display.
+Note that if also :input is specified as `helm' arg, it will take
+precedence on :default.")
+(defvar helm--temp-hooks nil
+  "Store temporary hooks added by `with-helm-temp-hook'.")
+(defvar helm--prompt nil)
+(defvar helm--file-completion-sources
+  '("Find Files" "Read File Name")
+  "Sources that use the *find-files mechanism can be added here.
+Sources generated by `helm-mode' don't need to be added here
+because they are automatically added.
+
+You should not modify this yourself unless you know what you are
+doing.")
+(defvar helm--completing-file-name nil
+  "Non nil when `helm-read-file-name' is running.
+Used for `helm-file-completion-source-p'.")
+;; Same as `ffap-url-regexp' but keep it here to ensure `ffap-url-regexp' is 
not nil.
+(defvar helm--url-regexp 
"\\`\\(news\\(post\\)?:\\|mailto:\\|file:\\|\\(ftp\\|https?\\|telnet\\|gopher\\|www\\|wais\\)://\\)")
+(defvar helm--ignore-errors nil
+  "Flag to prevent Helm popping up errors in candidates functions.
+Should be set in candidates functions if needed, and will be
+restored at end of session.")
+(defvar helm--action-prompt "Select action: ")
+(defvar helm--cycle-resume-iterator nil)
+(defvar helm--buffer-in-new-frame-p nil)
+(defvar helm-initial-frame nil
+  "[INTERNAL] The selected frame before starting Helm.
+Helm use this internally to know in which frame it started, don't
+modify this yourself.")
+(defvar helm-popup-frame nil
+  "The frame where Helm is displayed.
+
+This is only used when Helm is using
+`helm-display-buffer-in-own-frame' as `helm-display-function' and
+`helm-display-buffer-reuse-frame' is non nil.")
+(defvar helm--nested nil)
+(defconst helm--frame-default-attributes
+  '(width height tool-bar-lines left top
+          title undecorated vertical-scroll-bars
+          visibility fullscreen menu-bar-lines undecorated
+          alpha foreground-color background-color)
+  "Frame parameters to save in `helm--last-frame-parameters'.")
+(defvar helm--last-frame-parameters nil
+  "Frame parameters to save for later resuming.
+Local to `helm-buffer'.")
+(defvar helm--executing-helm-action nil
+  "Non nil when action is triggering a new helm-session.
+This may be let bounded in other places to notify the display
+function to reuse the same frame parameters as the previous Helm
+session just like resume would do.")
+(defvar helm--current-buffer-narrowed nil)
+(defvar helm--suspend-update-interactive-flag nil)
+(defvar helm-persistent-action-window-buffer nil
+  "[INTERNAL] Store the buffer where helm is started.
+It is generally `helm-current-buffer', but when this one is displayed
+in a dedicated buffer, helm can't start in this window and use another
+window handling a buffer, it is this one we store.")
+(defvar helm--tramp-archive-maybe-loaded nil)
+(defvar helm--original-dedicated-windows-alist nil
+  "[INTERNAL] Store all dedicated windows with their dedicated state on 
startup")
+
 ;; Easy access to customize
 ;;;###autoload
 (defun helm-configuration ()
@@ -1811,149 +1956,6 @@ The hook should takes one arg SOURCES.")
 (defvar helm-process-output-split-string-separator "\n"
   "Separator to use when splitting helm async output.")
 
-;;; Internal Variables
-;;
-;;
-(defvar helm-source-filter nil
-  "A list of source names to be displayed.
-Other sources won't appear in the search results.
-If nil, no filtering is done.
-Don't set this directly, use `helm-set-source-filter' during a
-Helm session to modify it.")
-(defvar helm-saved-action nil
-  "Saved value of the currently selected action by key.")
-(defvar helm-saved-current-source nil
-  "Value of the current source when the action list is shown.")
-(defvar helm-in-persistent-action nil
-  "Flag whether in persistent-action or not.")
-(defvar helm-last-buffer nil
-  "`helm-buffer' of a previous Helm session.")
-(defvar helm-saved-selection nil
-  "Value of the currently selected object when the action list is shown.")
-(defvar helm-sources nil
-  "[INTERNAL] Value of current sources in use, a list of alists.
-The list of sources (symbols or alists) is normalized to alists
-in `helm-initialize'.")
-(defvar helm-buffer-file-name nil
-  "Variable `buffer-file-name' when Helm is invoked.")
-(defvar helm-candidate-cache (make-hash-table :test 'equal)
-  "Holds the available candidate within a single Helm invocation.")
-(defvar helm--candidate-buffer-alist nil)
-(defvar helm-input ""
-  "The input typed in the candidates panel.")
-(defvar helm-input-local nil
-  "Internal, store locally `helm-pattern' value for later use in 
`helm-resume'.")
-(defvar helm--source-name nil)
-(defvar helm-current-source nil)
-(defvar helm-issued-errors nil)
-(defvar helm--last-log-file nil
-  "The name of the log file of the last Helm session.")
-(defvar helm--local-variables nil)
-(defvar helm-split-window-state nil)
-(defvar helm--window-side-state nil)
-(defvar helm-selection-point nil
-  "The value of point at selection.")
-(defvar helm-alive-p nil)
-(defvar helm-visible-mark-overlays nil)
-(defvar helm-update-blacklist-regexps '("^" "^ *" "$" "!" " " "\\b"
-                                        "\\<" "\\>" "\\_<" "\\_>" ".*"
-                                        "??" "?*" "*?" "?"))
-(defvar helm--force-updating-p nil
-  "[INTERNAL] Don't use this in your programs.")
-(defvar helm-exit-status 0
-  "Flag to inform if Helm did exit or quit.
-0 means Helm did exit when executing an action.
-1 means Helm did quit with \\[keyboard-quit]
-Knowing this exit-status could help restore a window config when
-Helm aborts in some special circumstances.  See
-`helm-exit-minibuffer' and `helm-keyboard-quit'.")
-(defvar helm-minibuffer-confirm-state nil)
-(defvar helm--quit nil)
-(defvar helm-buffers nil
-  "Helm buffers listed in order of most recently used.")
-(defvar helm-current-position nil
-  "Cons of (point . window-start)  when Helm is invoked.
-`helm-current-buffer' uses this to restore position after
-`helm-keyboard-quit'")
-(defvar helm-last-frame-or-window-configuration nil
-  "Used to store window or frame configuration at Helm start.")
-(defvar helm-onewindow-p nil)
-(defvar helm-types nil)
-(defvar helm--mode-line-string-real nil) ; The string to display in mode-line.
-(defvar helm-persistent-action-display-window nil)
-(defvar helm-marked-candidates nil
-  "Marked candidates.  List of (source . real) pair.")
-(defvar helm--mode-line-display-prefarg nil)
-(defvar helm--temp-follow-flag nil
-  "[INTERNAL] A simple flag to notify persistent action we are following.")
-(defvar helm--reading-passwd-or-string nil)
-(defvar helm--in-update nil)
-(defvar helm--in-fuzzy nil)
-(defvar helm-maybe-use-default-as-input nil
-  "Flag to notify the use of use-default-as-input.
-Use only in let-bindings.
-Use :default arg of `helm' as input to update display.
-Note that if also :input is specified as `helm' arg, it will take
-precedence on :default.")
-(defvar helm--temp-hooks nil
-  "Store temporary hooks added by `with-helm-temp-hook'.")
-(defvar helm--prompt nil)
-(defvar helm--file-completion-sources
-  '("Find Files" "Read File Name")
-  "Sources that use the *find-files mechanism can be added here.
-Sources generated by `helm-mode' don't need to be added here
-because they are automatically added.
-
-You should not modify this yourself unless you know what you are
-doing.")
-(defvar helm--completing-file-name nil
-  "Non nil when `helm-read-file-name' is running.
-Used for `helm-file-completion-source-p'.")
-;; Same as `ffap-url-regexp' but keep it here to ensure `ffap-url-regexp' is 
not nil.
-(defvar helm--url-regexp 
"\\`\\(news\\(post\\)?:\\|mailto:\\|file:\\|\\(ftp\\|https?\\|telnet\\|gopher\\|www\\|wais\\)://\\)")
-(defvar helm--ignore-errors nil
-  "Flag to prevent Helm popping up errors in candidates functions.
-Should be set in candidates functions if needed, and will be
-restored at end of session.")
-(defvar helm--action-prompt "Select action: ")
-(defvar helm--cycle-resume-iterator nil)
-(defvar helm--buffer-in-new-frame-p nil)
-(defvar helm-initial-frame nil
-  "[INTERNAL] The selected frame before starting Helm.
-Helm use this internally to know in which frame it started, don't
-modify this yourself.")
-(defvar helm-popup-frame nil
-  "The frame where Helm is displayed.
-
-This is only used when Helm is using
-`helm-display-buffer-in-own-frame' as `helm-display-function' and
-`helm-display-buffer-reuse-frame' is non nil.")
-(defvar helm--nested nil)
-(defconst helm--frame-default-attributes
-  '(width height tool-bar-lines left top
-          title undecorated vertical-scroll-bars
-          visibility fullscreen menu-bar-lines undecorated
-          alpha foreground-color background-color)
-  "Frame parameters to save in `helm--last-frame-parameters'.")
-(defvar helm--last-frame-parameters nil
-  "Frame parameters to save for later resuming.
-Local to `helm-buffer'.")
-(defvar helm--executing-helm-action nil
-  "Non nil when action is triggering a new helm-session.
-This may be let bounded in other places to notify the display
-function to reuse the same frame parameters as the previous Helm
-session just like resume would do.")
-(defvar helm--current-buffer-narrowed nil)
-(defvar helm--suspend-update-interactive-flag nil)
-(defvar helm-persistent-action-window-buffer nil
-  "[INTERNAL] Store the buffer where helm is started.
-It is generally `helm-current-buffer', but when this one is displayed
-in a dedicated buffer, helm can't start in this window and use another
-window handling a buffer, it is this one we store.")
-(defvar helm--tramp-archive-maybe-loaded nil)
-(defvar helm--original-dedicated-windows-alist nil
-  "[INTERNAL] Store all dedicated windows with their dedicated state on 
startup")
-
 ;; Utility: logging
 (defun helm-log (format-string &rest args)
   "Log message `helm-debug' is non-nil.
@@ -2303,6 +2305,35 @@ If NO-UPDATE is non-nil, skip executing `helm-update'."
   (unless no-init (helm-compute-attr-in-sources 'init))
   (unless no-update (helm-update)))
 
+(defun helm-show-all-candidates-in-source (arg)
+  "Toggle all or only candidate-number-limit cands in current source.
+With a numeric prefix arg show only the ARG number of candidates.
+The prefix arg has no effect when toggling to only
+candidate-number-limit."
+  (interactive "p")
+  (with-helm-alive-p
+    (with-helm-buffer
+      (if helm-source-filter
+          (progn
+            (setq-local helm-candidate-number-limit
+                        (default-value 'helm-candidate-number-limit))
+            (helm-set-source-filter nil))
+        (with-helm-default-directory (helm-default-directory)
+          (setq-local helm-candidate-number-limit (and (> arg 1) arg))
+          (helm-set-source-filter
+           (list (helm-get-current-source))))))))
+(put 'helm-show-all-candidates-in-source 'helm-only t)
+
+(defun helm-display-all-sources ()
+  "Display all sources previously hidden by `helm-set-source-filter'."
+  (interactive)
+  (with-helm-alive-p
+    (helm-set-source-filter nil)))
+(put 'helm-display-all-sources 'helm-only t)
+
+
+;;; Source infos fns.
+;;
 (defun helm-get-selection (&optional buffer force-display-part source)
   "Return the currently selected candidate from BUFFER.
 
diff --git a/helm-eval.el b/helm-eval.el
index a826f5a944..9d57ddde0d 100644
--- a/helm-eval.el
+++ b/helm-eval.el
@@ -22,6 +22,8 @@
 (require 'eldoc)
 (require 'edebug)
 
+(declare-function helm-lisp-completion-at-point "helm-elisp.el")
+
 
 (defgroup helm-eval nil
   "Eval related Applications and libraries for Helm."
diff --git a/helm-files.el b/helm-files.el
index 2853c013b3..55a2eff8e5 100644
--- a/helm-files.el
+++ b/helm-files.el
@@ -5438,7 +5438,7 @@ Find inside `require' and `declare-function' sexp."
                              &key action follow (files 
(dired-get-marked-files)))
   "Execute ACTION on FILES to DESTINATION.
 Where ACTION is a symbol that can be one of:
-'copy', 'rename', 'symlink', 'relsymlink', 'hardlink' or 'backup'.
+\\='copy', \\='rename', \\='symlink', \\='relsymlink', \\='hardlink' or 
\\='backup'.
 Argument FOLLOW when non-nil specifies to follow FILES to
 DESTINATION for the actions copy and rename."
   (require 'dired-async)
diff --git a/helm-utils.el b/helm-utils.el
index 048bc5dc64..bac0d39720 100644
--- a/helm-utils.el
+++ b/helm-utils.el
@@ -528,32 +528,6 @@ To use this add it to `helm-goto-line-before-hook'."
       (set-marker (mark-marker) (point))
       (push-mark (point) 'nomsg))))
 
-(defun helm-show-all-candidates-in-source (arg)
-  "Toggle all or only candidate-number-limit cands in current source.
-With a numeric prefix arg show only the ARG number of candidates.
-The prefix arg has no effect when toggling to only
-candidate-number-limit."
-  (interactive "p")
-  (with-helm-alive-p
-    (with-helm-buffer
-      (if helm-source-filter
-          (progn
-            (setq-local helm-candidate-number-limit
-                        (default-value 'helm-candidate-number-limit))
-            (helm-set-source-filter nil))
-        (with-helm-default-directory (helm-default-directory)
-          (setq-local helm-candidate-number-limit (and (> arg 1) arg))
-          (helm-set-source-filter
-           (list (helm-get-current-source))))))))
-(put 'helm-show-all-candidates-in-source 'helm-only t)
-
-(defun helm-display-all-sources ()
-  "Display all sources previously hidden by `helm-set-source-filter'."
-  (interactive)
-  (with-helm-alive-p
-    (helm-set-source-filter nil)))
-(put 'helm-display-all-sources 'helm-only t)
-
 (defun helm-displaying-source-names ()
   "Return the list of sources name for this helm session."
   (with-current-buffer helm-buffer



reply via email to

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