(goto-char (point-min))
(while (forward-word 1)
(setq count (1+ count)))))
- (if (interactive-p)
+ (if (called-interactively-p 'interactive)
(message "Region has %d words" count))
count))
current-prefix-arg))
(if (null eval-expression-debug-on-error)
- (setq values (cons (eval eval-expression-arg) values))
+ (push (eval eval-expression-arg lexical-binding) values)
(let ((old-value (make-symbol "t")) new-value)
;; Bind debug-on-error to something unique so that we can
;; detect when evaled code changes it.
(let ((debug-on-error old-value))
- (setq values (cons (eval eval-expression-arg) values))
+ (push (eval eval-expression-arg lexical-binding) values)
(setq new-value debug-on-error))
;; If evaled code has changed the value of debug-on-error,
;; propagate that change to the global binding.
\f
;; Partial application of functions (similar to "currying").
;; This function is here rather than in subr.el because it uses CL.
+;; (defalias 'apply-partially #'curry)
(defun apply-partially (fun &rest args)
"Return a function that is a partial application of FUN to ARGS.
ARGS is a list of the first N arguments to pass to FUN.