diff options
Diffstat (limited to 'lisp/progmodes/hideif.el')
-rw-r--r-- | lisp/progmodes/hideif.el | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/lisp/progmodes/hideif.el b/lisp/progmodes/hideif.el index 442fdedf372..32b0b7551f9 100644 --- a/lisp/progmodes/hideif.el +++ b/lisp/progmodes/hideif.el @@ -263,9 +263,6 @@ This backup prevents any accidental clearance of `hide-fidef-env' by ;;;###autoload (define-minor-mode hide-ifdef-mode "Toggle features to hide/show #ifdef blocks (Hide-Ifdef mode). -With a prefix argument ARG, enable Hide-Ifdef mode if ARG is -positive, and disable it otherwise. If called from Lisp, enable -the mode if ARG is omitted or nil. Hide-Ifdef mode is a buffer-local minor mode for use with C and C-like major modes. When enabled, code within #ifdef constructs @@ -675,12 +672,7 @@ that form should be displayed.") result)) (nreverse result))) -(defun hif-flatten (l) - "Flatten a tree." - (apply #'nconc - (mapcar (lambda (x) (if (listp x) - (hif-flatten x) - (list x))) l))) +(define-obsolete-function-alias 'hif-flatten #'flatten-tree "27.1") (defun hif-expand-token-list (tokens &optional macroname expand_list) "Perform expansion on TOKENS till everything expanded. @@ -751,7 +743,7 @@ detecting self-reference." expanded)) - (hif-flatten (nreverse expanded))))) + (flatten-tree (nreverse expanded))))) (defun hif-parse-exp (token-list &optional macroname) "Parse the TOKEN-LIST. @@ -1042,16 +1034,12 @@ preprocessing token" (defun hif-shiftleft (a b) (setq a (hif-mathify a)) (setq b (hif-mathify b)) - (if (< a 0) - (ash a b) - (lsh a b))) + (ash a b)) (defun hif-shiftright (a b) (setq a (hif-mathify a)) (setq b (hif-mathify b)) - (if (< a 0) - (ash a (- b)) - (lsh a (- b)))) + (ash a (- b))) (defalias 'hif-multiply (hif-mathify-binop *)) @@ -1173,7 +1161,7 @@ preprocessing token" (setq actual-parms (cdr actual-parms))) ;; Replacement completed, flatten the whole token list - (setq macro-body (hif-flatten macro-body)) + (setq macro-body (flatten-tree macro-body)) ;; Stringification and token concatenation happens here (hif-token-concatenation (hif-token-stringification macro-body))))) @@ -1628,7 +1616,7 @@ not be expanded." ((integerp result) (if (or (= 0 result) (= 1 result)) (message "%S <= `%s'" result exprstring) - (message "%S (0x%x) <= `%s'" result result exprstring))) + (message "%S (%#x) <= `%s'" result result exprstring))) ((null result) (message "%S <= `%s'" 'false exprstring)) ((eq t result) (message "%S <= `%s'" 'true exprstring)) (t (message "%S <= `%s'" result exprstring))) |