Bruce-Connor/aggressive-indent-mode — pull request #30 by vmfhrmfoaj (2014-11-04 12:25:03+00:00)
Title: Prevent that to replace the 'message' func to 'ignore' func.

My English is poor, but I hope you can understand me.

——————

In the cider-repl mode, I encounter a problem that replaced the `message` function to `ignore` function.
I was found a reproduce pass:
1. (add-hook 'cider-repl-mode-hook 'aggressive-indent-mode)
2. (cider-connect ...)
3. (message "tell me something") ;; in the "*scratch*" buffer.

Beginning of the problem is `cl-letf` macro.
`cl-letf` macro is using `unwind-protect` function to restore changed name of functions. But `unwind-protect` function won't evaluate a restore section(= unwind-forms) when `lisp-nesting-exceeds` error occurred.

——————

```elisp
; You can see the bug(or intended feature) of 'unwind-protect' using the following code.
(defun endless-recursive ()
(endless-recursive))

(unwind-protect
(endless-recursive)
(message "finally"))
```

——————

```elisp
(defvar save-message-func (symbol-function 'message))
(fset 'message save-message-func)

; Your code will be executed as code such as the following.
(with-current-buffer (get-buffer "*cider-repl impl*")
(ignore-errors (print (symbol-function 'message))
(cl-letf (((symbol-function 'message) #'ignore))
(indent-region (point-min) (point-max)))
(print (symbol-function 'message))))
```