]> code.delx.au - gnu-emacs/blobdiff - lisp/progmodes/hideif.el
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs
[gnu-emacs] / lisp / progmodes / hideif.el
index 7f2fd9274f70448ab580a850e279390876927bdd..e0d25c4439de9a15f02016ed2daa6621a3c07ec7 100644 (file)
@@ -164,7 +164,7 @@ This behavior is generally undesirable.  If this option is non-nil, the outermos
   :version "25.1")
 
 (defcustom hide-ifdef-header-regexp
-  "\\.h\\(h\\|xx\\|pp\\)?\\'"
+  "\\.h\\(h\\|xx\\|pp\\|\\+\\+\\)?\\'"
   "C/C++ header file name patterns to determine if current buffer is a header.
 Effective only if `hide-ifdef-expand-reinclusion-protection' is t."
   :type 'string
@@ -663,7 +663,7 @@ that form should be displayed.")
              (setq tok (cadr tokens))
              (if (eq (car tokens) 'hif-lparen)
                  (if (and (hif-if-valid-identifier-p tok)
-                          (eq (cl-caddr tokens) 'hif-rparen))
+                          (eq (nth 2 tokens) 'hif-rparen))
                      (setq tokens (cl-cdddr tokens))
                    (error "#define followed by non-identifier: %S" tok))
                (setq tok (car tokens)
@@ -730,7 +730,7 @@ detecting self-reference."
                        result))
                  ;; Argument list is nil, direct expansion
                  (setq rep (hif-expand-token-list
-                            (cl-caddr rep) ; Macro's token list
+                            (nth 2 rep) ; Macro's token list
                             tok expand_list))
                  ;; Replace all remaining references immediately
                  (setq remains (cl-substitute tok rep remains))