Function: autoconf-parameter-strip

autoconf-parameter-strip is a byte-compiled function defined in autoconf-edit.el.gz.

Signature

(autoconf-parameter-strip PARAM)

Documentation

Strip the parameter PARAM of whitespace and miscellaneous characters.

Source Code

;; Defined in /usr/src/emacs/lisp/cedet/ede/autoconf-edit.el.gz
(defun autoconf-parameter-strip (param)
  "Strip the parameter PARAM of whitespace and miscellaneous characters."
  ;; force greedy match for \n.
  (when (string-match "\\`\n*\\s-*\\[?\\s-*" param)
    (setq param (substring param (match-end 0))))
  (when (string-match "\\s-*\\]?\\s-*\\'" param)
    (setq param (substring param 0  (match-beginning 0))))
  ;; Look for occurrences of backslash newline
  (while (string-match "\\s-*\\\\\\s-*\n\\s-*" param)
    (setq param (replace-match " " t t param)))
  param)