# History of user-visible changes
+## Next
+
+* New user options controlling `company-dabbrev` and `company-dabbrev-code`.
+
## 2014-01-25 (0.6.14)
* The tooltip front-end is rendered with scrollbar, controlled by the user
:type '(choice (const :tag "Off" nil)
(number :tag "Seconds")))
+(defcustom company-dabbrev-code-everywhere nil
+ "Non-nil to offer completions in comments and strings."
+ :type 'boolean)
+
+(defcustom company-dabbrev-code-ignore-case nil
+ "Non-nil to ignore case in completion candidates."
+ :type 'boolean)
+
(defsubst company-dabbrev-code--make-regexp (prefix)
(concat "\\_<" (if (equal prefix "")
"\\([a-zA-Z]\\|\\s_\\)"
(interactive (company-begin-backend 'company-dabbrev-code))
(prefix (and (or (eq t company-dabbrev-code-modes)
(apply 'derived-mode-p company-dabbrev-code-modes))
- (not (company-in-string-or-comment))
+ (or company-dabbrev-code-everywhere
+ (not (company-in-string-or-comment)))
(or (company-grab-symbol) 'stop)))
(candidates (let ((case-fold-search nil))
(company-dabbrev--search
(company-dabbrev-code--make-regexp arg)
company-dabbrev-code-time-limit
company-dabbrev-code-other-buffers t)))
+ (ignore-case company-dabbrev-code-ignore-case)
(duplicates t)))
(provide 'company-dabbrev-code)
"A regular expression matching the characters `company-dabbrev' looks for."
:type 'regexp)
+(defcustom company-dabbrev-ignore-case 'keep-prefix
+ "The value of `ignore-case' returned by `company-dabbrev'.")
+
(defmacro company-dabrev--time-limit-while (test start limit &rest body)
(declare (indent 3) (debug t))
`(let ((company-time-limit-while-counter 0))
(company-dabbrev--search (company-dabbrev--make-regexp arg)
company-dabbrev-time-limit
company-dabbrev-other-buffers)))
- (ignore-case 'keep-prefix)
+ (ignore-case company-dabbrev-ignore-case)
(duplicates t)))
(provide 'company-dabbrev)