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

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

[nongnu] elpa/helm ee838b9bbb 1/3: Implemented defualt mode selection fo


From: ELPA Syncer
Subject: [nongnu] elpa/helm ee838b9bbb 1/3: Implemented defualt mode selection for buffer-substring
Date: Sun, 23 Oct 2022 01:58:46 -0400 (EDT)

branch: elpa/helm
commit ee838b9bbb174e3238454d63422063d8f17f03a9
Author: Berdan <berdan.akyurek@ug.bilkent.edu.tr>
Commit: Berdan <berdan.akyurek@ug.bilkent.edu.tr>

    Implemented defualt mode selection for buffer-substring
---
 helm-occur.el | 21 +++++++++++++++++++--
 1 file changed, 19 insertions(+), 2 deletions(-)

diff --git a/helm-occur.el b/helm-occur.el
index e592fa3869..f933796f0b 100644
--- a/helm-occur.el
+++ b/helm-occur.el
@@ -1,6 +1,6 @@
 ;;; helm-occur.el --- Incremental Occur for Helm. -*- lexical-binding: t -*-
 
-;; Copyright (C) 2012 ~ 2021 Thierry Volpiatto 
+;; Copyright (C) 2012 ~ 2021 Thierry Volpiatto
 
 ;; This program is free software; you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
@@ -119,6 +119,23 @@ Note that when using `buffer-substring' initialization 
will be slower."
                 :value-type (radio (const :tag "With text properties" 
buffer-substring)
                                    (const :tag "Without text properties" 
buffer-substring-no-properties))))
 
+(defcustom helm-occur-buffer-substring-default-mode
+  'buffer-substring
+  "Default mode for major modes not defined in 
helm-occur-buffer-substring-fn-for-modes.
+
+Can be one of `buffer-substring' or `buffer-substring-no-properties'.
+
+Note that when using `buffer-substring' initialization will be slower.
+
+If buffer-substring, all buffers with the modes not defined in
+
+helm-occur-buffer-substring-fn-for-modes will be displayed with colors and 
properties
+
+in the helm-occur buffer"
+
+  :type '(radio (const :tag "With text properties" buffer-substring)
+                                   (const :tag "Without text properties" 
buffer-substring-no-properties)))
+
 (defcustom helm-occur-keep-closest-position t
   "When non nil select closest candidate from point after update.
 This happen only in `helm-source-occur' which is always related to
@@ -302,7 +319,7 @@ engine beeing completely different and also much faster."
                           (let* ((bsfn (or (cdr (assq
                                                  major-mode
                                                  
helm-occur-buffer-substring-fn-for-modes))
-                                           #'buffer-substring-no-properties))
+                                           
helm-occur-buffer-substring-default-mode))
                                  (contents (funcall bsfn (point-min) 
(point-max))))
                             (helm-set-attr 'get-line bsfn)
                             (with-current-buffer (helm-candidate-buffer 
'global)



reply via email to

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