Commit 59f7af81 authored by Chong Yidong's avatar Chong Yidong
Browse files

Use declare forms, where possible, to mark obsolete functions.

* lisp/allout.el (allout-passphrase-hint-string): Likewise.
(allout-init): Use a declare form to mark obsolete.

* lisp/calendar/calendar.el (calendar-version):
* lisp/calendar/icalendar.el (icalendar-extract-ical-from-buffer)
(icalendar-convert-diary-to-ical):
* lisp/cus-edit.el (custom-mode):
* lisp/ansi-color.el (ansi-color-unfontify-region):
* lisp/international/latin1-disp.el (latin1-char-displayable-p):
* lisp/progmodes/cwarn.el (turn-on-cwarn-mode):
* lisp/progmodes/which-func.el (which-func-update-1): Use
define-obsolete-function-alias.

* lisp/bookmark.el (bookmark-jump-noselect): Use a declare form to mark
this function obsolete.

* lisp/calendar/cal-x.el (calendar-two-frame-setup)
(calendar-only-one-frame-setup, calendar-one-frame-setup):
* lisp/calendar/calendar.el (american-calendar, european-calendar)
(calendar-for-loop):
* lisp/comint.el (comint-dynamic-simple-complete)
(comint-dynamic-complete-as-filename, comint-unquote-filename):
* lisp/desktop.el (desktop-load-default):
* lisp/dired-x.el (dired-omit-here-always)
(dired-hack-local-variables, dired-default-directory):
* lisp/emacs-lisp/derived.el (derived-mode-class):
* lisp/emacs-lisp/timer.el (timer-set-time-with-usecs):
* lisp/emacs-lock.el (toggle-emacs-lock):
* lisp/epa.el (epa-display-verify-result):
* lisp/epg.el (epg-sign-keys, epg-start-sign-keys)
(epg-passphrase-callback-function):
* lisp/eshell/esh-util.el (eshell-for):
* lisp/eshell/eshell.el (eshell-remove-from-window-buffer-names)
(eshell-add-to-window-buffer-names):
* lisp/files.el (locate-file-completion):
* lisp/imenu.el (imenu-example--create-c-index)
(imenu-example--create-lisp-index)
(imenu-example--lisp-extract-index-name)
(imenu-example--name-and-position):
* lisp/international/mule-cmds.el (princ-list):
* lisp/international/mule-diag.el (decode-codepage-char):
* lisp/international/mule-util.el (detect-coding-with-priority):
* lisp/iswitchb.el (iswitchb-read-buffer):
* lisp/mail/mailalias.el (mail-complete):
* lisp/mail/sendmail.el (mail-sent-via):
* lisp/mouse.el (mouse-popup-menubar-stuff, mouse-popup-menubar)
(mouse-major-mode-menu):
* lisp/password-cache.el (password-read-and-add):
* lisp/pcomplete.el (pcomplete-parse-comint-arguments):
* lisp/progmodes/sh-script.el (sh-maybe-here-document):
* lisp/replace.el (query-replace-regexp-eval):
* lisp/savehist.el (savehist-load):
* lisp/simple.el (choose-completion-delete-max-match):
* lisp/term.el (term-dynamic-simple-complete):
* lisp/vc/ediff-init.el (ediff-check-version):
* lisp/vc/ediff-wind.el (ediff-choose-window-setup-function-automatically):
* lisp/vc/vc.el (vc-diff-switches-list):
* lisp/view.el (view-return-to-alist-update): Likewise.

* lisp/iswitchb.el (iswitchb-read-buffer): Move code of
iswitchb-define-mode-map here, and delete that obsolete function.

* lisp/subr.el (eval-next-after-load, makehash, insert-string)
(assoc-ignore-representation, assoc-ignore-case): Use declare to
mark obsolete.
(mode-line-inverse-video): Variable deleted.

* lisp/emacs-lisp/byte-run.el (make-obsolete): Doc fix; emphasize that
this applies to functions.

* lisp/erc/erc.el (erc-send-command): Use define-obsolete-function-alias.

* lisp/international/mule-util.el (string-to-sequence): Remove.

* lisp/net/newst-backend.el (newsticker-cache-filename):
* lisp/net/newst-treeview.el (newsticker-groups-filename): Fix
incorrect obsolescence declaration.

* lisp/net/snmp-mode.el (snmp-font-lock-keywords-3): Don't use obsolete
font-lock-reference-face.

* lisp/url/url-parse.el (url-recreate-url-attributes):
* lisp/url/url-util.el (url-generate-unique-filename): Use declare to mark
obsolete.

* src/xdisp.c (mode_line_inverse_video): Delete obsolete variable.
parent b06eeda8
......@@ -655,7 +655,7 @@ are deprecated and will be removed eventually.
**** inactivate-current-input-method-function ->
deactivate-current-input-method-function
** Some obsolete variables and variable aliases were removed:
** Some obsolete functions and variables were removed:
*** `facemenu-unlisted-faces'
*** `rmail-decode-mime-charset'
......@@ -663,7 +663,9 @@ are deprecated and will be removed eventually.
*** `iswitchb-read-buffer'
*** `sc-version', `sc-submit-bug-report'
*** `set-char-table-default'
*** `string-to-sequence' (use `string-to-list' or `string-to-vector').
*** `compile-internal'
*** `mode-line-inverse-video'
*** `cvs-commit-buffer-require-final-newline'
(use `'log-edit-require-final-newline'instead)
*** `cvs-changelog-full-paragraphs'
......
2012-09-25 Chong Yidong <cyd@gnu.org>
* bookmark.el (bookmark-jump-noselect): Use a declare form to mark
this function obsolete.
* calendar/cal-x.el (calendar-two-frame-setup)
(calendar-only-one-frame-setup, calendar-one-frame-setup):
* calendar/calendar.el (american-calendar, european-calendar)
(calendar-for-loop):
* comint.el (comint-dynamic-simple-complete)
(comint-dynamic-complete-as-filename, comint-unquote-filename):
* desktop.el (desktop-load-default):
* dired-x.el (dired-omit-here-always)
(dired-hack-local-variables, dired-default-directory):
* emacs-lisp/derived.el (derived-mode-class):
* emacs-lisp/timer.el (timer-set-time-with-usecs):
* emacs-lock.el (toggle-emacs-lock):
* epa.el (epa-display-verify-result):
* epg.el (epg-sign-keys, epg-start-sign-keys)
(epg-passphrase-callback-function):
* eshell/esh-util.el (eshell-for):
* eshell/eshell.el (eshell-remove-from-window-buffer-names)
(eshell-add-to-window-buffer-names):
* files.el (locate-file-completion):
* imenu.el (imenu-example--create-c-index)
(imenu-example--create-lisp-index)
(imenu-example--lisp-extract-index-name)
(imenu-example--name-and-position):
* international/mule-cmds.el (princ-list):
* international/mule-diag.el (decode-codepage-char):
* international/mule-util.el (detect-coding-with-priority):
* iswitchb.el (iswitchb-read-buffer):
* mail/mailalias.el (mail-complete):
* mail/sendmail.el (mail-sent-via):
* mouse.el (mouse-popup-menubar-stuff, mouse-popup-menubar)
(mouse-major-mode-menu):
* password-cache.el (password-read-and-add):
* pcomplete.el (pcomplete-parse-comint-arguments):
* progmodes/sh-script.el (sh-maybe-here-document):
* replace.el (query-replace-regexp-eval):
* savehist.el (savehist-load):
* simple.el (choose-completion-delete-max-match):
* term.el (term-dynamic-simple-complete):
* vc/ediff-init.el (ediff-check-version):
* vc/ediff-wind.el (ediff-choose-window-setup-function-automatically):
* vc/vc.el (vc-diff-switches-list):
* view.el (view-return-to-alist-update): Likewise.
* subr.el (eval-next-after-load, makehash, insert-string)
(assoc-ignore-representation, assoc-ignore-case): Use declare to
mark obsolete.
(mode-line-inverse-video): Variable deleted.
* international/mule-util.el (string-to-sequence): Remove.
* calendar/calendar.el (calendar-version):
* calendar/icalendar.el (icalendar-extract-ical-from-buffer)
(icalendar-convert-diary-to-ical):
* cus-edit.el (custom-mode):
* ansi-color.el (ansi-color-unfontify-region):
* international/latin1-disp.el (latin1-char-displayable-p):
* progmodes/cwarn.el (turn-on-cwarn-mode):
* progmodes/which-func.el (which-func-update-1): Use
define-obsolete-function-alias.
* net/newst-backend.el (newsticker-cache-filename):
* net/newst-treeview.el (newsticker-groups-filename): Fix
incorrect obsolescence declaration.
* allout.el (allout-passphrase-hint-string): Likewise.
(allout-init): Use a declare form to mark obsolete.
* emacs-lisp/byte-run.el (make-obsolete): Doc fix; emphasize that
this applies to functions.
* iswitchb.el (iswitchb-read-buffer): Move code of
iswitchb-define-mode-map here, and delete that obsolete function.
* net/snmp-mode.el (snmp-font-lock-keywords-3): Don't use obsolete
font-lock-reference-face.
2012-09-25 Glenn Morris <rgm@gnu.org>
 
* buff-menu.el (Buffer-menu-name-width, Buffer-menu-size-width):
......@@ -26,10 +107,6 @@
 
2012-09-24 Chong Yidong <cyd@gnu.org>
 
* iswitchb.el (iswitchb-read-buffer): Move
iswitchb-define-mode-map code here, and delete that obsolete
function.
* mail/supercite.el (sc-version): Remove obsolete function.
(sc-describe): Don't mark as obsolete, since it is bound.
(sc-submit-bug-report): Remove.
......
......@@ -1522,8 +1522,8 @@ The verifier string is retained as an Emacs file variable, as well as in
the Emacs buffer state, if file variable adjustments are enabled. See
`allout-enable-file-variable-adjustment' for details about that.")
(make-variable-buffer-local 'allout-passphrase-verifier-string)
(make-obsolete 'allout-passphrase-verifier-string
'allout-passphrase-verifier-string "23.3")
(make-obsolete-variable 'allout-passphrase-verifier-string
'allout-passphrase-verifier-string "23.3")
;;;###autoload
(put 'allout-passphrase-verifier-string 'safe-local-variable 'stringp)
;;;_ = allout-passphrase-hint-string
......@@ -1538,8 +1538,8 @@ state, if file variable adjustments are enabled. See
`allout-enable-file-variable-adjustment' for details about that.")
(make-variable-buffer-local 'allout-passphrase-hint-string)
(setq-default allout-passphrase-hint-string "")
(make-obsolete 'allout-passphrase-hint-string
'allout-passphrase-hint-string "23.3")
(make-obsolete-variable 'allout-passphrase-hint-string
'allout-passphrase-hint-string "23.3")
;;;###autoload
(put 'allout-passphrase-hint-string 'safe-local-variable 'stringp)
;;;_ = allout-after-save-decrypt
......@@ -1688,11 +1688,10 @@ from what it did before, for backwards compatibility.
MODE is the activation mode - see `allout-auto-activation' for
valid values."
(declare (obsolete allout-auto-activation "23.3"))
(custom-set-variables (list 'allout-auto-activation (format "%s" mode)))
(format "%s" mode))
(make-obsolete 'allout-init
"customize 'allout-auto-activation' instead." "23.3")
;;;_ > allout-setup-menubar ()
(defun allout-setup-menubar ()
"Populate the current buffer's menubar with `allout-mode' stuff."
......
......@@ -230,8 +230,8 @@ This is a good function to put in `comint-output-filter-functions'."
(t
(ansi-color-apply-on-region start-marker end-marker)))))
(defalias 'ansi-color-unfontify-region 'font-lock-default-unfontify-region)
(make-obsolete 'ansi-color-unfontify-region "not needed any more" "24.1")
(define-obsolete-function-alias 'ansi-color-unfontify-region
'font-lock-default-unfontify-region "24.1")
;; Working with strings
(defvar ansi-color-context nil
......
......@@ -1048,12 +1048,11 @@ The return value has the form (BUFFER . POINT).
Note: this function is deprecated and is present for Emacs 22
compatibility only."
(declare (obsolete bookmark-handle-bookmark "23.1"))
(save-excursion
(bookmark-handle-bookmark bookmark)
(cons (current-buffer) (point))))
(make-obsolete 'bookmark-jump-noselect 'bookmark-handle-bookmark "23.1")
(defun bookmark-handle-bookmark (bookmark-name-or-record)
"Call BOOKMARK-NAME-OR-RECORD's handler or `bookmark-default-handler'
if it has none. This changes current buffer and point and returns nil,
......
......@@ -155,29 +155,23 @@ If PROMPT is non-nil, prompt for the month and year to use."
(defun calendar-one-frame-setup (&optional prompt)
"Display calendar and diary in a single dedicated frame.
See `calendar-frame-setup' for more information."
(declare (obsolete calendar-frame-setup "23.1"))
(calendar-frame-setup 'one-frame prompt))
(make-obsolete 'calendar-one-frame-setup 'calendar-frame-setup "23.1")
;;;###cal-autoload
(defun calendar-only-one-frame-setup (&optional prompt)
"Display calendar in a dedicated frame.
See `calendar-frame-setup' for more information."
(declare (obsolete calendar-frame-setup "23.1"))
(calendar-frame-setup 'calendar-only prompt))
(make-obsolete 'calendar-only-one-frame-setup 'calendar-frame-setup "23.1")
;;;###cal-autoload
(defun calendar-two-frame-setup (&optional prompt)
"Display calendar and diary in separate, dedicated frames.
See `calendar-frame-setup' for more information."
(declare (obsolete calendar-frame-setup "23.1"))
(calendar-frame-setup 'two-frames prompt))
(make-obsolete 'calendar-two-frame-setup 'calendar-frame-setup "23.1")
;; Undocumented and probably useless.
(defvar cal-x-load-hook nil
"Hook run on loading of the `cal-x' package.")
......
......@@ -1001,18 +1001,16 @@ The valid styles are described in the documentation of `calendar-date-style'."
(defun european-calendar ()
"Set the interpretation and display of dates to the European style."
(declare (obsolete calendar-set-date-style "23.1"))
(interactive)
(calendar-set-date-style 'european))
(make-obsolete 'european-calendar 'calendar-set-date-style "23.1")
(defun american-calendar ()
"Set the interpretation and display of dates to the American style."
(declare (obsolete calendar-set-date-style "23.1"))
(interactive)
(calendar-set-date-style 'american))
(make-obsolete 'american-calendar 'calendar-set-date-style "23.1")
(define-obsolete-variable-alias 'holidays-in-diary-buffer
'diary-show-holidays-flag "23.1")
......@@ -1148,14 +1146,13 @@ MON defaults to `displayed-month'. YR defaults to `displayed-year'."
"Execute a for loop.
Evaluate BODY with VAR bound to successive integers from INIT to FINAL,
inclusive. The standard macro `dotimes' is preferable in most cases."
(declare (debug (symbolp "from" form "to" form "do" body))
(declare (obsolete "use `dotimes' or `while' instead." "23.1")
(debug (symbolp "from" form "to" form "do" body))
(indent defun))
`(let ((,var (1- ,init)))
(while (>= ,final (setq ,var (1+ ,var)))
,@body)))
(make-obsolete 'calendar-for-loop "use `dotimes' or `while' instead." "23.1")
(defmacro calendar-sum (index initial condition expression)
"For INDEX = INITIAL, +1, ... (as long as CONDITION holds), sum EXPRESSION."
(declare (debug (symbolp form form form)))
......@@ -2655,13 +2652,7 @@ If called by a mouse-event, pops up a menu with the result."
"---")
(calendar-string-spread (list str) ?- width)))))
(defun calendar-version ()
"Display the Calendar version."
(interactive)
(message "GNU Emacs %s" emacs-version))
(make-obsolete 'calendar-version 'emacs-version "23.1")
(define-obsolete-function-alias 'calendar-version 'emacs-version "23.1")
(run-hooks 'calendar-load-hook)
......
......@@ -931,8 +931,8 @@ Finto iCalendar file: ")
(set-buffer (find-file diary-filename))
(icalendar-export-region (point-min) (point-max) ical-filename)))
(defalias 'icalendar-convert-diary-to-ical 'icalendar-export-file)
(make-obsolete 'icalendar-convert-diary-to-ical 'icalendar-export-file "22.1")
(define-obsolete-function-alias 'icalendar-convert-diary-to-ical
'icalendar-export-file "22.1")
(defvar icalendar--uid-count 0
"Auxiliary counter for creating unique ids.")
......@@ -1881,8 +1881,8 @@ buffer `*icalendar-errors*'."
;; return nil, i.e. import did not work
nil)))
(defalias 'icalendar-extract-ical-from-buffer 'icalendar-import-buffer)
(make-obsolete 'icalendar-extract-ical-from-buffer 'icalendar-import-buffer "22.1")
(define-obsolete-function-alias 'icalendar-extract-ical-from-buffer
'icalendar-import-buffer "22.1")
(defun icalendar--format-ical-event (event)
"Create a string representation of an iCalendar EVENT."
......
......@@ -3069,11 +3069,11 @@ Magic characters are those in `comint-file-name-quote-list'."
(defun comint-unquote-filename (filename)
"Return FILENAME with quoted characters unquoted."
(declare (obsolete nil "24.3"))
(if (null comint-file-name-quote-list)
filename
(save-match-data
(replace-regexp-in-string "\\\\\\(.\\)" "\\1" filename t))))
(make-obsolete 'comint-unquote-filename nil "24.3")
(defun comint--requote-argument (upos qstr)
;; See `completion-table-with-quoting'.
......@@ -3170,10 +3170,9 @@ See `completion-table-with-quoting' and `comint-unquote-function'.")
(defun comint-dynamic-complete-as-filename ()
"Dynamically complete at point as a filename.
See `comint-dynamic-complete-filename'. Returns t if successful."
(declare (obsolete comint-filename-completion "24.1"))
(let ((data (comint--complete-file-name-data)))
(completion-in-region (nth 0 data) (nth 1 data) (nth 2 data))))
(make-obsolete 'comint-dynamic-complete-as-filename
'comint-filename-completion "24.1")
(defun comint-replace-by-expanded-filename ()
"Dynamically expand and complete the filename at point.
......@@ -3204,6 +3203,7 @@ Return `partial' if completed as far as possible.
Return `listed' if a completion listing was shown.
See also `comint-dynamic-complete-filename'."
(declare (obsolete completion-in-region "24.1"))
(let* ((completion-ignore-case (memq system-type '(ms-dos windows-nt cygwin)))
(minibuffer-p (window-minibuffer-p (selected-window)))
(suffix (cond ((not comint-completion-addsuffix) "")
......@@ -3246,8 +3246,6 @@ See also `comint-dynamic-complete-filename'."
(unless minibuffer-p
(message "Partially completed"))
'partial)))))))
(make-obsolete 'comint-dynamic-simple-complete 'completion-in-region "24.1")
(defun comint-dynamic-list-filename-completions ()
"Display a list of possible completions for the filename at point."
......
......@@ -2228,9 +2228,9 @@ and `face'."
(setq widget nil)))))
(widget-setup))
(make-obsolete 'custom-show "this widget type is no longer supported." "24.1")
(defun custom-show (widget value)
"Non-nil if WIDGET should be shown with VALUE by default."
(declare (obsolete "this widget type is no longer supported." "24.1"))
(let ((show (widget-get widget :custom-show)))
(if (functionp show)
(funcall show widget value)
......@@ -4823,12 +4823,7 @@ if that value is non-nil."
(put 'Custom-mode 'mode-class 'special)
;; backward-compatibility
(defun custom-mode ()
"Non-interactive variant of `Custom-mode'."
(Custom-mode))
(make-obsolete 'custom-mode 'Custom-mode "23.1")
(put 'custom-mode 'mode-class 'special)
(define-obsolete-function-alias 'custom-mode 'Custom-mode "23.1")
(add-to-list 'debug-ignored-errors "^Invalid face:? ")
......
......@@ -443,7 +443,6 @@ since it could result in memory overflow and make Emacs crash."
(hscroll-step windows number "22.1")
(truncate-partial-width-windows display boolean "23.1")
(make-cursor-line-fully-visible windows boolean)
(mode-line-inverse-video mode-line boolean)
(mode-line-in-non-selected-windows mode-line boolean "22.1")
(line-number-display-limit display
(choice integer
......
......@@ -1045,11 +1045,10 @@ Using it may cause conflicts. Use it anyway? " owner)))))
(defun desktop-load-default ()
"Load the `default' start-up library manually.
Also inhibit further loading of it."
(declare (obsolete desktop-save-mode "22.1"))
(unless inhibit-default-init ; safety check
(load "default" t t)
(setq inhibit-default-init t)))
(make-obsolete 'desktop-load-default
'desktop-save-mode "22.1")
;; ----------------------------------------------------------------------------
;;;###autoload
......
......@@ -723,15 +723,13 @@ determine a default directory.")
(defun dired-default-directory ()
"Return the `dired-default-directory-alist' entry for the current major-mode.
If none, return `default-directory'."
;; It looks like this was intended to be something of a "general"
;; feature, but it only ever seems to have been used in
;; dired-smart-shell-command, and doesn't seem worth keeping around.
(declare (obsolete nil "24.1"))
(or (eval (cdr (assq major-mode dired-default-directory-alist)))
default-directory))
;; It looks like this was intended to be something of a "general" feature,
;; but it only ever seems to have been used in dired-smart-shell-command,
;; and does not seem worth keeping around (?).
(make-obsolete 'dired-default-directory
"this feature is due to be removed." "24.1")
(defun dired-smart-shell-command (command &optional output-buffer error-buffer)
"Like function `shell-command', but in the current Virtual Dired directory."
(interactive
......@@ -782,6 +780,7 @@ See also `dired-enable-local-variables'."
(defun dired-hack-local-variables ()
"Evaluate local variables in `dired-local-variables-file' for dired buffer."
(declare (obsolete hack-dir-local-variables-non-file-buffer "24.1"))
(and (stringp dired-local-variables-file)
(file-exists-p dired-local-variables-file)
(let ((opoint (point-max))
......@@ -803,14 +802,12 @@ See also `dired-enable-local-variables'."
;; Make sure that the mode line shows the proper information.
(dired-sort-set-mode-line))))
(make-obsolete 'dired-hack-local-variables
'hack-dir-local-variables-non-file-buffer "24.1")
;; Does not seem worth a dedicated command.
;; See the more general features in files-x.el.
(defun dired-omit-here-always ()
"Create `dir-locals-file' setting `dired-omit-mode' to t in `dired-mode'.
If in a Dired buffer, reverts it."
(declare (obsolete add-dir-local-variable "24.1"))
(interactive)
(if (file-exists-p dired-local-variables-file)
(error "Old-style dired-local-variables-file `./%s' found;
......@@ -830,8 +827,6 @@ replace it with a dir-locals-file `./%s'"
(dired-extra-startup)
(dired-revert))))
(make-obsolete 'dired-omit-here-always 'add-dir-local-variable "24.1")
;;; GUESS SHELL COMMAND.
......
......@@ -4268,7 +4268,7 @@ instead.
;;;***
;;;### (autoloads (dired-do-relsymlink dired-jump-other-window dired-jump)
;;;;;; "dired-x" "dired-x.el" "d2461aa6efb8c1d7de8f245728ab448e")
;;;;;; "dired-x" "dired-x.el" "a4e6844421c2c5e6fde90e959fbcc26f")
;;; Generated autoloads from dired-x.el
(autoload 'dired-jump "dired-x" "\
......
......@@ -253,7 +253,9 @@ convention was modified."
advertised-signature-table))
(defun make-obsolete (obsolete-name current-name &optional when)
"Make the byte-compiler warn that OBSOLETE-NAME is obsolete.
"Make the byte-compiler warn that function OBSOLETE-NAME is obsolete.
OBSOLETE-NAME should be a function name or macro name (a symbol).
The warning will say that CURRENT-NAME should be used instead.
If CURRENT-NAME is a string, that is the `use instead' message
\(it should end with a period, and not start with a capital).
......
......@@ -276,10 +276,10 @@ A mode's class is the first ancestor which is NOT a derived mode.
Use the `derived-mode-parent' property of the symbol to trace backwards.
Since major-modes might all derive from `fundamental-mode', this function
is not very useful."
(declare (obsolete derived-mode-p "22.1"))
(while (get mode 'derived-mode-parent)
(setq mode (get mode 'derived-mode-parent)))
mode)
(make-obsolete 'derived-mode-class 'derived-mode-p "22.1")
;;; PRIVATE
......
......@@ -146,14 +146,13 @@ TIME must be in the internal format returned by, e.g., `current-time'.
The microsecond count from TIME is ignored, and USECS is used instead.
If optional fourth argument DELTA is a positive number, make the timer
fire repeatedly that many seconds apart."
(declare (obsolete "use `timer-set-time' and `timer-inc-time' instead."
"22.1"))
(setf (timer--time timer) time)
(setf (timer--usecs timer) usecs)
(setf (timer--psecs timer) 0)
(setf (timer--repeat-delay timer) (and (numberp delta) (> delta 0) delta))
timer)
(make-obsolete 'timer-set-time-with-usecs
"use `timer-set-time' and `timer-inc-time' instead."
"22.1")
(defun timer-set-function (timer function &optional args)
"Make TIMER call FUNCTION with optional ARGS when triggering."
......
......@@ -249,9 +249,9 @@ Other values are interpreted as usual."
(defun toggle-emacs-lock ()
"Toggle `emacs-lock-from-exiting' for the current buffer."
(declare (obsolete emacs-lock-mode "24.1"))
(interactive)
(call-interactively 'emacs-lock-mode))
(make-obsolete 'toggle-emacs-lock 'emacs-lock-mode "24.1")
(provide 'emacs-lock)
......
......@@ -585,8 +585,8 @@ If SECRET is non-nil, list secret keys instead of public keys."
(message "%s" info)))
(defun epa-display-verify-result (verify-result)
(declare (obsolete epa-display-info "23.1"))
(epa-display-info (epg-verify-result-to-string verify-result)))
(make-obsolete 'epa-display-verify-result 'epa-display-info "23.1")
(defun epa-passphrase-callback-function (context key-id handback)
(if (eq key-id 'SYM)
......
......@@ -1779,6 +1779,7 @@ This function is for internal use only."
(epg-context-set-result-for context 'import-status nil)))
(defun epg-passphrase-callback-function (context key-id _handback)
(declare (obsolete epa-passphrase-callback-function "23.1"))
(if (eq key-id 'SYM)
(read-passwd "Passphrase for symmetric encryption: "
(eq (epg-context-operation context) 'encrypt))
......@@ -1790,9 +1791,6 @@ This function is for internal use only."
(format "Passphrase for %s %s: " key-id (cdr entry))
(format "Passphrase for %s: " key-id)))))))
(make-obsolete 'epg-passphrase-callback-function
'epa-passphrase-callback-function "23.1")
(defun epg--list-keys-1 (context name mode)
(let ((args (append (if epg-gpg-home-directory
(list "--homedir" epg-gpg-home-directory))
......@@ -2562,6 +2560,7 @@ If you use this function, you will need to wait for the completion of
`epg-reset' to clear a temporary output file.
If you are unsure, use synchronous version of this function
`epg-sign-keys' instead."
(declare (obsolete nil "23.1"))
(epg-context-set-operation context 'sign-keys)
(epg-context-set-result context nil)
(epg--start context (cons (if local
......@@ -2572,10 +2571,10 @@ If you are unsure, use synchronous version of this function
(epg-sub-key-id
(car (epg-key-sub-key-list key))))
keys))))
(make-obsolete 'epg-start-sign-keys "do not use." "23.1")
(defun epg-sign-keys (context keys &optional local)
"Sign KEYS from the key ring."
(declare (obsolete nil "23.1"))
(unwind-protect
(progn
(epg-start-sign-keys context keys local)
......@@ -2586,7 +2585,6 @@ If you are unsure, use synchronous version of this function
(list "Sign keys failed"
(epg-errors-to-string errors))))))
(epg-reset context)))
(make-obsolete 'epg-sign-keys "do not use." "23.1")
(defun epg-start-generate-key (context parameters)
"Initiate a key generation.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment