Skip to content

Commit

Permalink
replace deprecated point-at-bol by pos-bol
Browse files Browse the repository at this point in the history
  • Loading branch information
Sarcasm committed Sep 28, 2023
1 parent ef5d4f0 commit b183534
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions irony-completion.el
Original file line number Diff line number Diff line change
Expand Up @@ -279,17 +279,17 @@ A candidate is composed of the following elements:
(format "%s\\=" (regexp-opt '("." ;object member access
"->" ;pointer member access
"::"))) ;scope operator
(point-at-bol) t)
(pos-bol) t)
(unless
;; ignore most common uses of '.' where it's not a member access
(and (eq (char-after) ?.)
(or
;; include statements: #include <foo.|>
(looking-back "^#\\s-*include\\s-+[<\"][^>\"]*"
(point-at-bol))
(pos-bol))
;; floating point numbers (not thorough, see:
;; http://en.cppreference.com/w/cpp/language/floating_literal)
(looking-back "[^_a-zA-Z0-9][[:digit:]]+" (point-at-bol))))
(looking-back "[^_a-zA-Z0-9][[:digit:]]+" (pos-bol))))
;; except the above exceptions we use a "whitelist" for the places
;; where it looks like a member access
(irony-completion--skip-whitespaces-backward)
Expand All @@ -306,7 +306,7 @@ A candidate is composed of the following elements:
;; or just look if the face is: font-lock-keyword-face?
(save-excursion
(and (re-search-backward "\\b\\([_a-zA-Z][_a-zA-Z0-9]*\\)\\="
(point-at-bol) t)
(pos-bol) t)
(not (member (match-string 0)
'("class" "sizeof" "typename"))))))))))))

Expand Down

0 comments on commit b183534

Please sign in to comment.