X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/56eb09046e00ac7ee6d3d3d752cb1ee664b7e062..5d8e0d43b0fdc1b67f745e66c1539c5135fb2808:/lisp/type-break.el diff --git a/lisp/type-break.el b/lisp/type-break.el index 641215be8c..58022ef881 100644 --- a/lisp/type-break.el +++ b/lisp/type-break.el @@ -1,12 +1,10 @@ ;;; type-break.el --- encourage rests from typing at appropriate intervals -;; Copyright (C) 1994, 1995, 1997, 2000, 2001, 2002, 2003, -;; 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1994-1995, 1997, 2000-2011 Free Software Foundation, Inc. ;; Author: Noah Friedman ;; Maintainer: Noah Friedman ;; Keywords: extensions, timers -;; Status: Works in GNU Emacs 19.25 or later, some versions of XEmacs ;; Created: 1994-07-13 ;; This file is part of GNU Emacs. @@ -77,7 +75,7 @@ See the docstring for the `type-break-mode' command for more information. Setting this variable directly does not take effect; use either \\[customize] or the function `type-break-mode'." - :set (lambda (symbol value) + :set (lambda (_symbol value) (type-break-mode (if value 1 -1))) :initialize 'custom-initialize-default :type 'boolean @@ -495,7 +493,7 @@ variable of the same name." (let ((inhibit-read-only t)) (goto-char (point-min)) (forward-line) - (delete-region (point) (save-excursion (end-of-line) (point))) + (delete-region (point) (line-end-position)) (insert (format "%s" type-break-keystroke-count)) ;; file saving is left to auto-save )))))) @@ -832,7 +830,7 @@ keystroke threshold has been exceeded." (quit (type-break-schedule type-break-query-interval)))))) -(defun type-break-noninteractive-query (&optional ignored-args) +(defun type-break-noninteractive-query (&optional _ignored-args) "Null query function which doesn't interrupt user and assumes `no'. It prints a reminder in the echo area to take a break, but doesn't enforce this or ask the user to start one right now." @@ -1243,5 +1241,4 @@ With optional non-nil ALL, force redisplay of all mode-lines." (if type-break-mode (type-break-mode 1)) -;; arch-tag: 943a2eb3-07e6-420b-993f-96e4796f5fd0 ;;; type-break.el ends here