Q:

Defun with optional args inside the lambda?

I want to call defun with optional args inside the lambda:
(global-set-key (kbd "M-S-v") 
                (lambda ()
                  (interactive) (bk-cleans-text nil 2)))

The function works as standalone:
(bk-cleans-text nil 2)

But when called inside the lambda it complains on cond:
(defun bk-cleans-text (&optional killIt ParsSepBy)
  (interactive)

      (cond 
       ((= 1 ParsSepBy)
        (setq Find "\n+")
        (setq Replace "\n"))
       ((= 2 ParsSepBy)
        (setq Find "\n\n+")
        (setq Replace "\n\n"))
       (t
        (setq Find "\n+")
        (setq Replace "")))

      (message "F: %s, R: %s" Find Replace))

A:

The problem is in the key combination that you have chosen. I used another one and it worked.

