(setq company-search-string
(concat (or company-search-string "") (string last-command-event))
company-search-lighter (concat " Search: \"" company-search-string
- "\""))
+ "\""))
(let ((pos (company-search company-search-string
- (nthcdr company-selection company-candidates))))
+ (nthcdr company-selection company-candidates))))
(if (null pos)
(ding)
(company-set-selection (+ company-selection pos) t))))
(interactive)
(company-search-assert-enabled)
(let ((pos (company-search company-search-string
- (cdr (nthcdr company-selection
- company-candidates)))))
+ (cdr (nthcdr company-selection
+ company-candidates)))))
(if (null pos)
(ding)
(company-set-selection (+ company-selection pos 1) t))))
(interactive)
(company-search-assert-enabled)
(let ((pos (company-search company-search-string
- (nthcdr (- company-candidates-length
- company-selection)
- (reverse company-candidates)))))
+ (nthcdr (- company-candidates-length
+ company-selection)
+ (reverse company-candidates)))))
(if (null pos)
(ding)
(company-set-selection (- company-selection pos 1) t))))
(company-begin-backend
(lambda (command &optional arg &rest ignored)
(pcase command
- (`prefix
- (when (equal (point) (marker-position begin-marker))
- (buffer-substring (- (point) (or prefix-length 0)) (point))))
- (`candidates
- (all-completions arg candidates))
- (`require-match
- require-match)))
+ (`prefix
+ (when (equal (point) (marker-position begin-marker))
+ (buffer-substring (- (point) (or prefix-length 0)) (point))))
+ (`candidates
+ (all-completions arg candidates))
+ (`require-match
+ require-match)))
callback)))
(defun company-version (&optional show-version)
(propertize (concat (company-space-string company-tooltip-margin)
(company-safe-substring text 0 width)
(company-space-string company-tooltip-margin))
- 'face 'company-tooltip))
+ 'face 'company-tooltip))
;; show