Now on revision 110191. ------------------------------------------------------------ revno: 110191 committer: Chong Yidong branch nick: trunk timestamp: Tue 2012-09-25 13:33:43 +0800 message: Minor fixes for the function obsolescence feature. * lisp/help-fns.el (help-fns--obsolete): Handle macros properly. * lisp/subr.el (declare): Doc fix. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-09-25 04:13:02 +0000 +++ lisp/ChangeLog 2012-09-25 05:33:43 +0000 @@ -1,5 +1,11 @@ 2012-09-25 Chong Yidong + * subr.el (declare): Doc fix. + + * help-fns.el (help-fns--obsolete): Handle macros properly. + +2012-09-25 Chong Yidong + * bookmark.el (bookmark-jump-noselect): Use a declare form to mark this function obsolete. === modified file 'lisp/help-fns.el' --- lisp/help-fns.el 2012-09-11 13:43:06 +0000 +++ lisp/help-fns.el 2012-09-25 05:33:43 +0000 @@ -488,13 +488,17 @@ (insert "'.\n")))) (defun help-fns--obsolete (function) - (let* ((obsolete (and - ;; `function' might be a lambda construct. - (symbolp function) - (get function 'byte-obsolete-info))) + ;; Ignore lambda constructs, keyboard macros, etc. + (let* ((obsolete (and (symbolp function) + (get function 'byte-obsolete-info))) (use (car obsolete))) (when obsolete - (insert "\nThis function is obsolete") + (insert "\nThis " + (if (eq (car-safe (symbol-function 'with-current-buffer)) + 'macro) + "macro" + "function") + " is obsolete") (when (nth 2 obsolete) (insert (format " since %s" (nth 2 obsolete)))) (insert (cond ((stringp use) (concat ";\n" use)) @@ -611,7 +615,7 @@ (fill-region-as-paragraph (save-excursion (goto-char pt1) (forward-line 0) (point)) (point))) (terpri)(terpri) - + (let* ((doc-raw (condition-case err (documentation function t) (error (format "No Doc! %S" err)))) === modified file 'lisp/subr.el' --- lisp/subr.el 2012-09-25 04:13:02 +0000 +++ lisp/subr.el 2012-09-25 05:33:43 +0000 @@ -271,9 +271,14 @@ ,@(cdr (cdr spec)))))) (defmacro declare (&rest _specs) - "Do not evaluate any arguments and return nil. -Treated as a declaration when used at the right place in a -`defmacro' form. \(See Info anchor `(elisp)Definition of declare'.)" + "Do not evaluate any arguments, and return nil. +If a `declare' form appears as the first form in the body of a +`defun' or `defmacro' form, SPECS specifies various additional +information about the function or macro; these go into effect +during the evaluation of the `defun' or `defmacro' form. + +The possible values of SPECS are specified by +`defun-declarations-alist' and `macro-declarations-alist'." ;; FIXME: edebug spec should pay attention to defun-declarations-alist. nil) )) ------------------------------------------------------------ revno: 110190 committer: Chong Yidong branch nick: trunk timestamp: Tue 2012-09-25 12:13:02 +0800 message: 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. diff: === modified file 'etc/NEWS' --- etc/NEWS 2012-09-24 12:23:25 +0000 +++ etc/NEWS 2012-09-25 04:13:02 +0000 @@ -655,7 +655,7 @@ **** 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 @@ *** `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' === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-09-25 01:18:50 +0000 +++ lisp/ChangeLog 2012-09-25 04:13:02 +0000 @@ -1,3 +1,84 @@ +2012-09-25 Chong Yidong + + * 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 * buff-menu.el (Buffer-menu-name-width, Buffer-menu-size-width): @@ -26,10 +107,6 @@ 2012-09-24 Chong Yidong - * 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. === modified file 'lisp/allout.el' --- lisp/allout.el 2012-08-15 16:29:11 +0000 +++ lisp/allout.el 2012-09-25 04:13:02 +0000 @@ -1522,8 +1522,8 @@ 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 @@ `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 @@ 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." === modified file 'lisp/ansi-color.el' --- lisp/ansi-color.el 2012-08-15 03:33:55 +0000 +++ lisp/ansi-color.el 2012-09-25 04:13:02 +0000 @@ -230,8 +230,8 @@ (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 === modified file 'lisp/bookmark.el' --- lisp/bookmark.el 2012-09-17 05:41:04 +0000 +++ lisp/bookmark.el 2012-09-25 04:13:02 +0000 @@ -1048,12 +1048,11 @@ 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, === modified file 'lisp/calendar/cal-x.el' --- lisp/calendar/cal-x.el 2012-01-19 07:21:25 +0000 +++ lisp/calendar/cal-x.el 2012-09-25 04:13:02 +0000 @@ -155,29 +155,23 @@ (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.") === modified file 'lisp/calendar/calendar.el' --- lisp/calendar/calendar.el 2012-09-24 11:39:33 +0000 +++ lisp/calendar/calendar.el 2012-09-25 04:13:02 +0000 @@ -1001,18 +1001,16 @@ (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 @@ "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 @@ "---") (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) === modified file 'lisp/calendar/icalendar.el' --- lisp/calendar/icalendar.el 2012-06-08 17:34:09 +0000 +++ lisp/calendar/icalendar.el 2012-09-25 04:13:02 +0000 @@ -931,8 +931,8 @@ (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 @@ ;; 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." === modified file 'lisp/comint.el' --- lisp/comint.el 2012-09-17 14:45:51 +0000 +++ lisp/comint.el 2012-09-25 04:13:02 +0000 @@ -3069,11 +3069,11 @@ (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 @@ (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 `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 @@ (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." === modified file 'lisp/cus-edit.el' --- lisp/cus-edit.el 2012-09-18 05:14:42 +0000 +++ lisp/cus-edit.el 2012-09-25 04:13:02 +0000 @@ -2228,9 +2228,9 @@ (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 @@ (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:? ") === modified file 'lisp/cus-start.el' --- lisp/cus-start.el 2012-09-22 12:56:08 +0000 +++ lisp/cus-start.el 2012-09-25 04:13:02 +0000 @@ -443,7 +443,6 @@ (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 === modified file 'lisp/desktop.el' --- lisp/desktop.el 2012-09-17 05:41:04 +0000 +++ lisp/desktop.el 2012-09-25 04:13:02 +0000 @@ -1045,11 +1045,10 @@ (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 === modified file 'lisp/dired-x.el' --- lisp/dired-x.el 2012-06-02 10:56:09 +0000 +++ lisp/dired-x.el 2012-09-25 04:13:02 +0000 @@ -723,15 +723,13 @@ (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 @@ (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 @@ ;; 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 @@ (dired-extra-startup) (dired-revert)))) -(make-obsolete 'dired-omit-here-always 'add-dir-local-variable "24.1") - ;;; GUESS SHELL COMMAND. === modified file 'lisp/dired.el' --- lisp/dired.el 2012-09-23 10:21:34 +0000 +++ lisp/dired.el 2012-09-25 04:13:02 +0000 @@ -4268,7 +4268,7 @@ ;;;*** ;;;### (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" "\ === modified file 'lisp/emacs-lisp/byte-run.el' --- lisp/emacs-lisp/byte-run.el 2012-09-17 05:41:04 +0000 +++ lisp/emacs-lisp/byte-run.el 2012-09-25 04:13:02 +0000 @@ -253,7 +253,9 @@ 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). === modified file 'lisp/emacs-lisp/derived.el' --- lisp/emacs-lisp/derived.el 2012-06-10 13:28:26 +0000 +++ lisp/emacs-lisp/derived.el 2012-09-25 04:13:02 +0000 @@ -276,10 +276,10 @@ 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 === modified file 'lisp/emacs-lisp/timer.el' --- lisp/emacs-lisp/timer.el 2012-09-22 13:16:03 +0000 +++ lisp/emacs-lisp/timer.el 2012-09-25 04:13:02 +0000 @@ -146,14 +146,13 @@ 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." === modified file 'lisp/emacs-lock.el' --- lisp/emacs-lock.el 2012-08-15 16:29:11 +0000 +++ lisp/emacs-lock.el 2012-09-25 04:13:02 +0000 @@ -249,9 +249,9 @@ (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) === modified file 'lisp/epa.el' --- lisp/epa.el 2012-06-08 16:39:49 +0000 +++ lisp/epa.el 2012-09-25 04:13:02 +0000 @@ -585,8 +585,8 @@ (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) === modified file 'lisp/epg.el' --- lisp/epg.el 2012-01-19 07:21:25 +0000 +++ lisp/epg.el 2012-09-25 04:13:02 +0000 @@ -1779,6 +1779,7 @@ (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 @@ (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 @@ `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 @@ (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 @@ (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. === modified file 'lisp/erc/ChangeLog' --- lisp/erc/ChangeLog 2012-09-17 05:41:04 +0000 +++ lisp/erc/ChangeLog 2012-09-25 04:13:02 +0000 @@ -1,3 +1,7 @@ +2012-09-25 Chong Yidong + + * erc.el (erc-send-command): Use define-obsolete-function-alias. + 2012-09-17 Chong Yidong * erc-page.el (erc-page-function): === modified file 'lisp/erc/erc.el' --- lisp/erc/erc.el 2012-08-20 16:08:51 +0000 +++ lisp/erc/erc.el 2012-09-25 04:13:02 +0000 @@ -139,8 +139,8 @@ (message (concat "ERC: The function `defvaralias' is not bound. See the " "NEWS file for variable name changes since ERC 5.0.4."))) -(defalias 'erc-send-command 'erc-server-send) -(erc-make-obsolete 'erc-send-command 'erc-server-send "ERC 5.1") +(define-obsolete-function-alias 'erc-send-command + 'erc-server-send "ERC 5.1") ;; tunable connection and authentication parameters === modified file 'lisp/eshell/esh-util.el' --- lisp/eshell/esh-util.el 2012-09-17 05:41:04 +0000 +++ lisp/eshell/esh-util.el 2012-09-25 04:13:02 +0000 @@ -275,6 +275,7 @@ (defmacro eshell-for (for-var for-list &rest forms) "Iterate through a list." + (declare (obsolete dolist "24.1")) (declare (indent 2)) `(let ((list-iter ,for-list)) (while list-iter @@ -282,9 +283,6 @@ ,@forms) (setq list-iter (cdr list-iter))))) - -(make-obsolete 'eshell-for 'dolist "24.1") - (defun eshell-flatten-list (args) "Flatten any lists within ARGS, so that there are no sublists." (let ((new-list (list t))) === modified file 'lisp/eshell/eshell.el' --- lisp/eshell/eshell.el 2012-08-15 16:29:11 +0000 +++ lisp/eshell/eshell.el 2012-09-25 04:13:02 +0000 @@ -243,16 +243,14 @@ (defun eshell-add-to-window-buffer-names () "Add `eshell-buffer-name' to `same-window-buffer-names'." + (declare (obsolete nil "24.3")) (add-to-list 'same-window-buffer-names eshell-buffer-name)) -(make-obsolete 'eshell-add-to-window-buffer-names - "no longer needed." "24.3") (defun eshell-remove-from-window-buffer-names () "Remove `eshell-buffer-name' from `same-window-buffer-names'." + (declare (obsolete nil "24.3")) (setq same-window-buffer-names (delete eshell-buffer-name same-window-buffer-names))) -(make-obsolete 'eshell-remove-from-window-buffer-names - "no longer needed." "24.3") (defcustom eshell-load-hook nil "A hook run once Eshell has been loaded." === modified file 'lisp/files.el' --- lisp/files.el 2012-09-22 15:44:43 +0000 +++ lisp/files.el 2012-09-25 04:13:02 +0000 @@ -821,10 +821,10 @@ (defun locate-file-completion (string path-and-suffixes action) "Do completion for file names passed to `locate-file'. PATH-AND-SUFFIXES is a pair of lists, (DIRECTORIES . SUFFIXES)." + (declare (obsolete locate-file-completion-table "23.1")) (locate-file-completion-table (car path-and-suffixes) (cdr path-and-suffixes) string nil action)) -(make-obsolete 'locate-file-completion 'locate-file-completion-table "23.1") (defvar locate-dominating-stop-dir-regexp (purecopy "\\`\\(?:[\\/][\\/][^\\/]+[\\/]\\|/\\(?:net\\|afs\\|\\.\\.\\.\\)/\\)\\'") === modified file 'lisp/htmlfontify.el' --- lisp/htmlfontify.el 2012-03-17 14:03:54 +0000 +++ lisp/htmlfontify.el 2012-09-25 04:13:02 +0000 @@ -1052,8 +1052,6 @@ (hfy-face-attr-for-class fn hfy-display-class)) ((and (symbolp fn) (facep (symbol-value fn))) - ;; Obsolete faces like `font-lock-reference-face' are defined as - ;; aliases for another face. (hfy-face-attr-for-class (symbol-value fn) hfy-display-class)) (t nil))) === modified file 'lisp/imenu.el' --- lisp/imenu.el 2012-08-05 14:14:54 +0000 +++ lisp/imenu.el 2012-09-25 04:13:02 +0000 @@ -326,6 +326,7 @@ (defun imenu-example--name-and-position () "Return the current/previous sexp and its (beginning) location. Don't move point." + (declare (obsolete "use your own function instead." "23.2")) (save-excursion (forward-sexp -1) ;; [ydi] modified for imenu-use-markers @@ -333,8 +334,6 @@ (end (progn (forward-sexp) (point)))) (cons (buffer-substring beg end) beg)))) -(make-obsolete 'imenu-example--name-and-position - "use your own function instead." "23.2") ;;; ;;; Lisp @@ -343,6 +342,7 @@ (defun imenu-example--lisp-extract-index-name () ;; Example of a candidate for `imenu-extract-index-name-function'. ;; This will generate a flat index of definitions in a lisp file. + (declare (obsolete nil "23.2")) (save-match-data (and (looking-at "(def") (condition-case nil @@ -353,11 +353,11 @@ (end (progn (forward-sexp -1) (point)))) (buffer-substring beg end))) (error nil))))) -(make-obsolete 'imenu-example--lisp-extract-index-name "your own" "23.2") (defun imenu-example--create-lisp-index () ;; Example of a candidate for `imenu-create-index-function'. ;; It will generate a nested index of definitions. + (declare (obsolete nil "23.2")) (let ((index-alist '()) (index-var-alist '()) (index-type-alist '()) @@ -401,7 +401,6 @@ (push (cons "Syntax-unknown" index-unknown-alist) index-alist)) index-alist)) -(make-obsolete 'imenu-example--create-lisp-index "your own" "23.2") ;; Regular expression to find C functions (defvar imenu-example--function-name-regexp-c @@ -414,6 +413,7 @@ )) (defun imenu-example--create-c-index (&optional regexp) + (declare (obsolete nil "23.2")) (let ((index-alist '()) char) (goto-char (point-min)) @@ -430,7 +430,6 @@ (if (not (eq char ?\;)) (push (imenu-example--name-and-position) index-alist)))) (nreverse index-alist))) -(make-obsolete 'imenu-example--create-c-index "your own" "23.2") ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; === modified file 'lisp/international/latin1-disp.el' --- lisp/international/latin1-disp.el 2012-01-19 07:21:25 +0000 +++ lisp/international/latin1-disp.el 2012-09-25 04:13:02 +0000 @@ -202,8 +202,8 @@ (and char (char-displayable-p char)))) ;; Backwards compatibility. -(defalias 'latin1-char-displayable-p 'char-displayable-p) -(make-obsolete 'latin1-char-displayable-p 'char-displayable-p "22.1") +(define-obsolete-function-alias 'latin1-char-displayable-p + 'char-displayable-p "22.1") (defun latin1-display-setup (set &optional force) "Set up Latin-1 display for characters in the given SET. === modified file 'lisp/international/mule-cmds.el' --- lisp/international/mule-cmds.el 2012-08-15 16:29:11 +0000 +++ lisp/international/mule-cmds.el 2012-09-25 04:13:02 +0000 @@ -2058,9 +2058,9 @@ (defun princ-list (&rest args) "Print all arguments with `princ', then print \"\\n\"." + (declare (obsolete "use mapc and princ instead." "23.3")) (mapc #'princ args) (princ "\n")) -(make-obsolete 'princ-list "use mapc and princ instead" "23.3") (put 'describe-specified-language-support 'apropos-inhibit t) === modified file 'lisp/international/mule-diag.el' --- lisp/international/mule-diag.el 2012-01-19 07:21:25 +0000 +++ lisp/international/mule-diag.el 2012-09-25 04:13:02 +0000 @@ -208,8 +208,8 @@ "Decode a character that has code CODE in CODEPAGE. Return a decoded character string. Each CODEPAGE corresponds to a coding system cpCODEPAGE." + (declare (obsolete decode-char "23.1")) (decode-char (intern (format "cp%d" codepage)) code)) -(make-obsolete 'decode-codepage-char 'decode-char "23.1") ;; A variable to hold charset input history. (defvar charset-history nil) === modified file 'lisp/international/mule-util.el' --- lisp/international/mule-util.el 2012-01-19 07:21:25 +0000 +++ lisp/international/mule-util.el 2012-09-25 04:13:02 +0000 @@ -34,39 +34,6 @@ ;;; characters. ;;;###autoload -(defun string-to-sequence (string type) - "Convert STRING to a sequence of TYPE which contains characters in STRING. -TYPE should be `list' or `vector'." -;;; (let ((len (length string)) -;;; (i 0) -;;; val) - (cond ((eq type 'list) - ;; Applicable post-Emacs 20.2 and asymptotically ~10 times - ;; faster than the code below: - (append string nil)) -;;; (setq val (make-list len 0)) -;;; (let ((l val)) -;;; (while (< i len) -;;; (setcar l (aref string i)) -;;; (setq l (cdr l) i (1+ i)))))) - ((eq type 'vector) - ;; As above. - (vconcat string)) -;;; (setq val (make-vector len 0)) -;;; (while (< i len) -;;; (aset val i (aref string i)) -;;; (setq i (1+ i)))) - (t - (error "Invalid type: %s" type))) -;;; val) -) - -;;;###autoload -(make-obsolete 'string-to-sequence - "use `string-to-list' or `string-to-vector'." - "22.1") - -;;;###autoload (defsubst string-to-list (string) "Return a list of characters in STRING." (append string nil)) @@ -330,10 +297,9 @@ "Detect a coding system of the text between FROM and TO with PRIORITY-LIST. PRIORITY-LIST is an alist of coding categories vs the corresponding coding systems ordered by priority." + (declare (obsolete with-coding-priority "23.1")) `(with-coding-priority (mapcar #'cdr ,priority-list) (detect-coding-region ,from ,to))) -(make-obsolete 'detect-coding-with-priority - "use `with-coding-priority' and `detect-coding-region'." "23.1") ;;;###autoload (defun detect-coding-with-language-environment (from to lang-env) === modified file 'lisp/iswitchb.el' --- lisp/iswitchb.el 2012-07-25 05:48:19 +0000 +++ lisp/iswitchb.el 2012-09-25 04:13:02 +0000 @@ -527,33 +527,6 @@ ;;; FUNCTIONS -;;; ISWITCHB KEYMAP -(defun iswitchb-define-mode-map () - "Set up the keymap for `iswitchb-buffer'." - (interactive) - (let (map) - ;; generated every time so that it can inherit new functions. - ;;(or iswitchb-mode-map - - (setq map (copy-keymap minibuffer-local-map)) - (define-key map "?" 'iswitchb-completion-help) - (define-key map "\C-s" 'iswitchb-next-match) - (define-key map "\C-r" 'iswitchb-prev-match) - (define-key map "\t" 'iswitchb-complete) - (define-key map "\C-j" 'iswitchb-select-buffer-text) - (define-key map "\C-t" 'iswitchb-toggle-regexp) - (define-key map "\C-x\C-f" 'iswitchb-find-file) - (define-key map "\C-n" 'iswitchb-toggle-ignore) - (define-key map "\C-c" 'iswitchb-toggle-case) - (define-key map "\C-k" 'iswitchb-kill-buffer) - (define-key map "\C-m" 'iswitchb-exit-minibuffer) - (setq iswitchb-mode-map map) - (run-hooks 'iswitchb-define-mode-map-hook))) - -(make-obsolete 'iswitchb-define-mode-map - "use M-x iswitchb-mode or customize the variable `iswitchb-mode'." - "21.1") - ;;; MAIN FUNCTION (defun iswitchb () "Switch to buffer matching a substring. @@ -619,14 +592,25 @@ string. If MATCHES-SET is non-nil, the buflist is not updated before the selection process begins. Used by isearchb.el." - (let - ( - buf-sel - iswitchb-final-text - (icomplete-mode nil) ;; prevent icomplete starting up - ) + ;; The map is generated every time so that it can inherit new + ;; functions. + (let ((map (copy-keymap minibuffer-local-map)) + buf-sel iswitchb-final-text map + icomplete-mode) ; prevent icomplete starting up + (define-key map "?" 'iswitchb-completion-help) + (define-key map "\C-s" 'iswitchb-next-match) + (define-key map "\C-r" 'iswitchb-prev-match) + (define-key map "\t" 'iswitchb-complete) + (define-key map "\C-j" 'iswitchb-select-buffer-text) + (define-key map "\C-t" 'iswitchb-toggle-regexp) + (define-key map "\C-x\C-f" 'iswitchb-find-file) + (define-key map "\C-n" 'iswitchb-toggle-ignore) + (define-key map "\C-c" 'iswitchb-toggle-case) + (define-key map "\C-k" 'iswitchb-kill-buffer) + (define-key map "\C-m" 'iswitchb-exit-minibuffer) + (setq iswitchb-mode-map map) + (run-hooks 'iswitchb-define-mode-map-hook) - (iswitchb-define-mode-map) (setq iswitchb-exit nil) (setq iswitchb-default (if (bufferp default) === modified file 'lisp/mail/mailalias.el' --- lisp/mail/mailalias.el 2012-01-19 07:21:25 +0000 +++ lisp/mail/mailalias.el 2012-09-25 04:13:02 +0000 @@ -427,6 +427,7 @@ "Perform completion on header field or word preceding point. Completable headers are according to `mail-complete-alist'. If none matches current header, calls `mail-complete-function' and passes prefix ARG if any." + (declare (obsolete mail-completion-at-point-function "24.1")) (interactive "P") ;; Read the defaults first, if we have not done so. (sendmail-sync-aliases) @@ -439,7 +440,6 @@ (if data (apply #'completion-in-region data) (funcall mail-complete-function arg)))) -(make-obsolete 'mail-complete 'mail-completion-at-point-function "24.1") (defun mail-completion-expand (table) "Build new completion table that expands aliases. === modified file 'lisp/mail/sendmail.el' --- lisp/mail/sendmail.el 2012-07-29 07:16:45 +0000 +++ lisp/mail/sendmail.el 2012-09-25 04:13:02 +0000 @@ -1414,6 +1414,7 @@ (defun mail-sent-via () "Make a Sent-via header line from each To or CC header line." + (declare (obsolete "nobody can remember what it is for." "24.1")) (interactive) (save-excursion ;; put a marker at the end of the header @@ -1433,9 +1434,6 @@ (point))))) ;; Insert a copy, with altered header field name. (insert-before-markers "Sent-via:" to-line)))))) - -(make-obsolete 'mail-sent-via "nobody can remember what it is for." "24.1") - (defun mail-to () "Move point to end of To field, creating it if necessary." === modified file 'lisp/mouse.el' --- lisp/mouse.el 2012-08-17 09:10:31 +0000 +++ lisp/mouse.el 2012-09-25 04:13:02 +0000 @@ -284,23 +284,24 @@ (defun mouse-major-mode-menu (event &optional prefix) "Pop up a mode-specific menu of mouse commands. Default to the Edit menu if the major mode doesn't define a menu." + (declare (obsolete mouse-menu-major-mode-map "23.1")) (interactive "@e\nP") (run-hooks 'activate-menubar-hook 'menu-bar-update-hook) (popup-menu (mouse-menu-major-mode-map) event prefix)) -(make-obsolete 'mouse-major-mode-menu 'mouse-menu-major-mode-map "23.1") (defun mouse-popup-menubar (event prefix) "Pop up a menu equivalent to the menu bar for keyboard EVENT with PREFIX. The contents are the items that would be in the menu bar whether or not it is actually displayed." + (declare (obsolete mouse-menu-bar-map "23.1")) (interactive "@e \nP") (run-hooks 'activate-menubar-hook 'menu-bar-update-hook) (popup-menu (mouse-menu-bar-map) (unless (integerp event) event) prefix)) -(make-obsolete 'mouse-popup-menubar 'mouse-menu-bar-map "23.1") (defun mouse-popup-menubar-stuff (event prefix) "Popup a menu like either `mouse-major-mode-menu' or `mouse-popup-menubar'. Use the former if the menu bar is showing, otherwise the latter." + (declare (obsolete nil "23.1")) (interactive "@e\nP") (run-hooks 'activate-menubar-hook 'menu-bar-update-hook) (popup-menu @@ -308,7 +309,6 @@ (mouse-menu-bar-map) (mouse-menu-major-mode-map)) event prefix)) -(make-obsolete 'mouse-popup-menubar-stuff nil "23.1") ;; Commands that operate on windows. === modified file 'lisp/net/newst-backend.el' --- lisp/net/newst-backend.el 2012-01-19 07:21:25 +0000 +++ lisp/net/newst-backend.el 2012-09-25 04:13:02 +0000 @@ -421,7 +421,7 @@ "Name of the newsticker cache file." :type 'string :group 'newsticker-miscellaneous) -(make-obsolete 'newsticker-cache-filename 'newsticker-dir "23.1") +(make-obsolete-variable 'newsticker-cache-filename 'newsticker-dir "23.1") (defcustom newsticker-dir (locate-user-emacs-file "newsticker/" ".newsticker/") === modified file 'lisp/net/newst-treeview.el' --- lisp/net/newst-treeview.el 2012-06-08 16:39:49 +0000 +++ lisp/net/newst-treeview.el 2012-09-25 04:13:02 +0000 @@ -128,7 +128,7 @@ "Name of the newsticker groups settings file." :type 'string :group 'newsticker-treeview) -(make-obsolete 'newsticker-groups-filename 'newsticker-dir "23.1") +(make-obsolete-variable 'newsticker-groups-filename 'newsticker-dir "23.1") ;; ====================================================================== ;;; internal variables === modified file 'lisp/net/snmp-mode.el' --- lisp/net/snmp-mode.el 2012-07-11 23:13:41 +0000 +++ lisp/net/snmp-mode.el 2012-09-25 04:13:02 +0000 @@ -175,9 +175,9 @@ (defvar snmp-font-lock-keywords-3 (append '(("\\([^\n]+\\)[ \t]+::=[ \t]+\\(SEQUENCE\\)[ \t]+{" - (1 font-lock-reference-face) (2 font-lock-keyword-face)) + (1 font-lock-constant-face) (2 font-lock-keyword-face)) ("::=[ \t]*{[ \t]*\\([a-z0-9].*[ \t]+\\)?\\([0-9]+\\)[ \t]*}" - (1 font-lock-reference-face nil t) (2 font-lock-variable-name-face))) + (1 font-lock-constant-face nil t) (2 font-lock-variable-name-face))) snmp-font-lock-keywords-2) "Gaudy SNMP MIB mode expression highlighting.") === modified file 'lisp/password-cache.el' --- lisp/password-cache.el 2012-01-19 07:21:25 +0000 +++ lisp/password-cache.el 2012-09-25 04:13:02 +0000 @@ -102,13 +102,12 @@ correct. It is better to check the password before caching. If you must use this function, take care to check passwords and remove incorrect ones from the cache." + (declare (obsolete password-read "23.1")) (let ((password (password-read prompt key))) (when (and password key) (password-cache-add key password)) password)) -(make-obsolete 'password-read-and-add 'password-read "23.1") - (defun password-cache-remove (key) "Remove password indexed by KEY from password cache. This is typically run by a timer setup from `password-cache-add', === modified file 'lisp/pcomplete.el' --- lisp/pcomplete.el 2012-09-17 14:45:51 +0000 +++ lisp/pcomplete.el 2012-09-25 04:13:02 +0000 @@ -724,6 +724,7 @@ (defun pcomplete-parse-comint-arguments () "Parse whitespace separated arguments in the current region." + (declare (obsolete comint-parse-pcomplete-arguments "24.1")) (let ((begin (save-excursion (comint-bol nil) (point))) (end (point)) begins args) @@ -743,8 +744,6 @@ (push (buffer-substring-no-properties (car begins) (point)) args)) (cons (nreverse args) (nreverse begins))))) -(make-obsolete 'pcomplete-parse-comint-arguments - 'comint-parse-pcomplete-arguments "24.1") (defun pcomplete-parse-arguments (&optional expand-p) "Parse the command line arguments. Most completions need this info." === modified file 'lisp/progmodes/cwarn.el' --- lisp/progmodes/cwarn.el 2012-07-11 23:13:41 +0000 +++ lisp/progmodes/cwarn.el 2012-09-25 04:13:02 +0000 @@ -191,13 +191,7 @@ (if font-lock-mode (font-lock-fontify-buffer))) ;;;###autoload -(defun turn-on-cwarn-mode () - "Turn on CWarn mode. - -This function is designed to be added to hooks, for example: - (add-hook 'c-mode-hook 'turn-on-cwarn-mode)" - (cwarn-mode 1)) -(make-obsolete 'turn-on-cwarn-mode 'cwarn-mode "24.1") +(define-obsolete-function-alias 'turn-on-cwarn-mode 'cwarn-mode "24.1") ;;}}} ;;{{{ Help functions === modified file 'lisp/progmodes/sh-script.el' --- lisp/progmodes/sh-script.el 2012-09-05 07:05:56 +0000 +++ lisp/progmodes/sh-script.el 2012-09-25 04:13:02 +0000 @@ -4079,11 +4079,10 @@ (defun sh-maybe-here-document (arg) "Insert self. Without prefix, following unquoted `<' inserts here document. The document is bounded by `sh-here-document-word'." + (declare (obsolete sh-electric-here-document-mode "24.3")) (interactive "*P") (self-insert-command (prefix-numeric-value arg)) (or arg (sh--maybe-here-document))) -(make-obsolete 'sh--maybe-here-document - 'sh-electric-here-document-mode "24.3") (defun sh--maybe-here-document () (or (not (looking-back "[^<]<<")) === modified file 'lisp/progmodes/vera-mode.el' --- lisp/progmodes/vera-mode.el 2012-06-08 16:39:49 +0000 +++ lisp/progmodes/vera-mode.el 2012-09-25 04:13:02 +0000 @@ -587,12 +587,6 @@ ;;; Font locking ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; XEmacs compatibility -(when (featurep 'xemacs) - (require 'font-lock) - (copy-face 'font-lock-reference-face 'font-lock-constant-face) - (copy-face 'font-lock-preprocessor-face 'font-lock-builtin-face)) - (defun vera-font-lock-match-item (limit) "Match, and move over, any declaration item after point. Adapted from `font-lock-match-c-style-declaration-item-and-skip-to-next'." === modified file 'lisp/progmodes/which-func.el' --- lisp/progmodes/which-func.el 2012-08-15 16:29:11 +0000 +++ lisp/progmodes/which-func.el 2012-09-25 04:13:02 +0000 @@ -234,9 +234,7 @@ (error "Error in which-func-update: %S" info)))))) ;;;###autoload -(defun which-func-mode (&optional arg) - (which-function-mode arg)) -(make-obsolete 'which-func-mode 'which-function-mode "24.1") +(define-obsolete-function-alias 'which-func-mode 'which-function-mode "24.1") (defvar which-func-update-timer nil) === modified file 'lisp/replace.el' --- lisp/replace.el 2012-09-20 21:57:13 +0000 +++ lisp/replace.el 2012-09-25 04:13:02 +0000 @@ -378,35 +378,33 @@ Third arg DELIMITED (prefix arg if interactive), if non-nil, means replace only matches that are surrounded by word boundaries. Fourth and fifth arg START and END specify the region to operate on." + (declare (obsolete "use the `\\,' feature of `query-replace-regexp' +for interactive calls, and `search-forward-regexp'/`replace-match' +for Lisp calls." "22.1")) (interactive (progn - (barf-if-buffer-read-only) - (let* ((from - ;; Let-bind the history var to disable the "foo -> bar" default. - ;; Maybe we shouldn't disable this default, but for now I'll - ;; leave it off. --Stef - (let ((query-replace-to-history-variable nil)) - (query-replace-read-from "Query replace regexp" t))) - (to (list (read-from-minibuffer - (format "Query replace regexp %s with eval: " - (query-replace-descr from)) - nil nil t query-replace-to-history-variable from t)))) - ;; We make TO a list because replace-match-string-symbols requires one, - ;; and the user might enter a single token. - (replace-match-string-symbols to) - (list from (car to) current-prefix-arg - (if (and transient-mark-mode mark-active) - (region-beginning)) - (if (and transient-mark-mode mark-active) - (region-end)))))) + (barf-if-buffer-read-only) + (let* ((from + ;; Let-bind the history var to disable the "foo -> bar" + ;; default. Maybe we shouldn't disable this default, but + ;; for now I'll leave it off. --Stef + (let ((query-replace-to-history-variable nil)) + (query-replace-read-from "Query replace regexp" t))) + (to (list (read-from-minibuffer + (format "Query replace regexp %s with eval: " + (query-replace-descr from)) + nil nil t query-replace-to-history-variable from t)))) + ;; We make TO a list because replace-match-string-symbols requires one, + ;; and the user might enter a single token. + (replace-match-string-symbols to) + (list from (car to) current-prefix-arg + (if (and transient-mark-mode mark-active) + (region-beginning)) + (if (and transient-mark-mode mark-active) + (region-end)))))) (perform-replace regexp (cons 'replace-eval-replacement to-expr) t 'literal delimited nil nil start end)) -(make-obsolete 'query-replace-regexp-eval - "for interactive use, use the special `\\,' feature of -`query-replace-regexp' instead. Non-interactively, a loop -using `search-forward-regexp' and `replace-match' is preferred." "22.1") - (defun map-query-replace-regexp (regexp to-strings &optional n start end) "Replace some matches for REGEXP with various strings, in rotation. The second argument TO-STRINGS contains the replacement strings, separated === modified file 'lisp/savehist.el' --- lisp/savehist.el 2012-08-15 16:29:11 +0000 +++ lisp/savehist.el 2012-09-25 04:13:02 +0000 @@ -209,6 +209,7 @@ If `savehist-file' is in the old format that doesn't record the value of `savehist-minibuffer-history-variables', that value is deducted from the contents of the file." + (declare (obsolete savehist-mode "22.1")) (savehist-mode 1) ;; Old versions of savehist distributed with XEmacs didn't save ;; savehist-minibuffer-history-variables. If that variable is nil @@ -225,7 +226,6 @@ ;; Collect VAR, i.e. (nth form 1). (push (nth 1 form) vars)) vars))))) -(make-obsolete 'savehist-load 'savehist-mode "22.1") (defun savehist-install () "Hook savehist into Emacs. === modified file 'lisp/simple.el' --- lisp/simple.el 2012-09-22 15:46:57 +0000 +++ lisp/simple.el 2012-09-25 04:13:02 +0000 @@ -6380,9 +6380,8 @@ (point)))) (defun choose-completion-delete-max-match (string) + (declare (obsolete choose-completion-guess-base-position "23.2")) (delete-region (choose-completion-guess-base-position string) (point))) -(make-obsolete 'choose-completion-delete-max-match - 'choose-completion-guess-base-position "23.2") (defvar choose-completion-string-functions nil "Functions that may override the normal insertion of a completion choice. === modified file 'lisp/subr.el' --- lisp/subr.el 2012-09-22 16:28:46 +0000 +++ lisp/subr.el 2012-09-25 04:13:02 +0000 @@ -461,18 +461,18 @@ (setq tail (cdr tail))) value)) -(make-obsolete 'assoc-ignore-case 'assoc-string "22.1") (defun assoc-ignore-case (key alist) "Like `assoc', but ignores differences in case and text representation. KEY must be a string. Upper-case and lower-case letters are treated as equal. Unibyte strings are converted to multibyte for comparison." + (declare (obsolete assoc-string "22.1")) (assoc-string key alist t)) -(make-obsolete 'assoc-ignore-representation 'assoc-string "22.1") (defun assoc-ignore-representation (key alist) "Like `assoc', but ignores differences in text representation. KEY must be a string. Unibyte strings are converted to multibyte for comparison." + (declare (obsolete assoc-string "22.1")) (assoc-string key alist nil)) (defun member-ignore-case (elt list) @@ -1179,12 +1179,13 @@ "Mocklisp-compatibility insert function. Like the function `insert' except that any argument that is a number is converted into a string by expressing it in decimal." + (declare (obsolete insert "22.1")) (dolist (el args) (insert (if (integerp el) (number-to-string el) el)))) -(make-obsolete 'insert-string 'insert "22.1") -(defun makehash (&optional test) (make-hash-table :test (or test 'eql))) -(make-obsolete 'makehash 'make-hash-table "22.1") +(defun makehash (&optional test) + (declare (obsolete make-hash-table "22.1")) + (make-hash-table :test (or test 'eql))) ;; These are used by VM and some old programs (defalias 'focus-frame 'ignore "") @@ -1250,11 +1251,6 @@ (make-obsolete 'process-filter-multibyte-p nil "23.1") (make-obsolete 'set-process-filter-multibyte nil "23.1") -(make-obsolete-variable - 'mode-line-inverse-video - "use the appropriate faces instead." - "21.1") - ;; Lisp manual only updated in 22.1. (define-obsolete-variable-alias 'executing-macro 'executing-kbd-macro "before 19.34") @@ -1911,8 +1907,8 @@ "Read the following input sexp, and run it whenever FILE is loaded. This makes or adds to an entry on `after-load-alist'. FILE should be the name of a library, with no directory name." + (declare (obsolete eval-after-load "23.2")) (eval-after-load file (read))) -(make-obsolete 'eval-next-after-load `eval-after-load "23.2") (defun display-delayed-warnings () "Display delayed warnings from `delayed-warnings-list'. === modified file 'lisp/term.el' --- lisp/term.el 2012-09-01 22:03:06 +0000 +++ lisp/term.el 2012-09-25 04:13:02 +0000 @@ -4048,6 +4048,7 @@ Returns `listed' if a completion listing was shown. See also `term-dynamic-complete-filename'." + (declare (obsolete completion-in-region "23.2")) (let* ((completion-ignore-case nil) (candidates (mapcar (function (lambda (x) (list x))) candidates)) (completions (all-completions stub candidates))) @@ -4081,8 +4082,6 @@ (t (message "Partially completed") 'partial))))))) -(make-obsolete 'term-dynamic-simple-complete 'completion-in-region "23.2") - (defun term-dynamic-list-filename-completions () "List in help buffer possible completions of the filename at point." === modified file 'lisp/url/ChangeLog' --- lisp/url/ChangeLog 2012-08-28 16:01:59 +0000 +++ lisp/url/ChangeLog 2012-09-25 04:13:02 +0000 @@ -1,3 +1,9 @@ +2012-09-25 Chong Yidong + + * url-parse.el (url-recreate-url-attributes): + * url-util.el (url-generate-unique-filename): Use declare to mark + obsolete. + 2012-08-14 Stefan Monnier * url-http.el (url-http-parse-headers): Re-enable file-name-handlers === modified file 'lisp/url/url-parse.el' --- lisp/url/url-parse.el 2012-08-15 16:29:11 +0000 +++ lisp/url/url-parse.el 2012-09-25 04:13:02 +0000 @@ -98,6 +98,7 @@ (defun url-recreate-url-attributes (urlobj) "Recreate the attributes of an URL string from the parsed URLOBJ." + (declare (obsolete nil "24.3")) (when (url-attributes urlobj) (concat ";" (mapconcat (lambda (x) @@ -105,7 +106,6 @@ (concat (car x) "=" (cdr x)) (car x))) (url-attributes urlobj) ";")))) -(make-obsolete 'url-recreate-url-attributes nil "24.3") ;;;###autoload (defun url-generic-parse-url (url) === modified file 'lisp/url/url-util.el' --- lisp/url/url-util.el 2012-08-12 17:35:15 +0000 +++ lisp/url/url-util.el 2012-09-25 04:13:02 +0000 @@ -593,6 +593,7 @@ (defun url-generate-unique-filename (&optional fmt) "Generate a unique filename in `url-temporary-directory'." + (declare (obsolete make-temp-file "23.1")) ;; This variable is obsolete, but so is this function. (let ((tempdir (with-no-warnings url-temporary-directory))) (if (not fmt) @@ -614,7 +615,6 @@ (setq x (1+ x) fname (format fmt (concat base (int-to-string x))))) (expand-file-name fname tempdir))))) -(make-obsolete 'url-generate-unique-filename 'make-temp-file "23.1") (defun url-extract-mime-headers () "Set `url-current-mime-headers' in current buffer." === modified file 'lisp/vc/ediff-init.el' --- lisp/vc/ediff-init.el 2012-05-25 00:55:40 +0000 +++ lisp/vc/ediff-init.el 2012-09-25 04:13:02 +0000 @@ -753,6 +753,7 @@ "Check the current version against MAJOR and MINOR version numbers. The comparison uses operator OP, which may be any of: =, >, >=, <, <=. TYPE-OF-EMACS is either 'xemacs or 'emacs." + (declare (obsolete version< "23.1")) (and (cond ((eq type-of-emacs 'xemacs) (featurep 'xemacs)) ((eq type-of-emacs 'emacs) (featurep 'emacs)) (t)) @@ -767,9 +768,6 @@ (t (error "%S: Invalid op in ediff-check-version" op))))) -;; ediff-check-version seems to be totally unused anyway. -(make-obsolete 'ediff-check-version 'version< "23.1") - (defun ediff-color-display-p () (condition-case nil (if (featurep 'xemacs) === modified file 'lisp/vc/ediff-wind.el' --- lisp/vc/ediff-wind.el 2012-08-15 16:29:11 +0000 +++ lisp/vc/ediff-wind.el 2012-09-25 04:13:02 +0000 @@ -63,13 +63,11 @@ ;; Determine which window setup function to use based on current window system. (defun ediff-choose-window-setup-function-automatically () + (declare (obsolete ediff-setup-windows-default "24.3")) (if (ediff-window-display-p) 'ediff-setup-windows-multiframe 'ediff-setup-windows-plain)) -(make-obsolete 'ediff-choose-window-setup-function-automatically - 'ediff-setup-windows-default "24.3") - (defcustom ediff-window-setup-function 'ediff-setup-windows-default "Function called to set up windows. Ediff provides a choice of three functions: === modified file 'lisp/vc/vc.el' --- lisp/vc/vc.el 2012-09-24 12:23:25 +0000 +++ lisp/vc/vc.el 2012-09-25 04:13:02 +0000 @@ -1506,8 +1506,9 @@ (when (listp switches) switches)))) ;; Old def for compatibility with Emacs-21.[123]. -(defmacro vc-diff-switches-list (backend) `(vc-switches ',backend 'diff)) -(make-obsolete 'vc-diff-switches-list 'vc-switches "22.1") +(defmacro vc-diff-switches-list (backend) + (declare (obsolete vc-switches "22.1")) + `(vc-switches ',backend 'diff)) (defun vc-diff-finish (buffer messages) ;; The empty sync output case has already been handled, so the only === modified file 'lisp/view.el' --- lisp/view.el 2012-03-16 01:40:20 +0000 +++ lisp/view.el 2012-09-25 04:13:02 +0000 @@ -513,6 +513,7 @@ function `view-mode-exit'. If `view-return-to-alist' contains an entry for the selected window, purge that entry from `view-return-to-alist' before adding ITEM." + (declare (obsolete "this function has no effect." "24.1")) (with-current-buffer buffer (when view-return-to-alist (let* ((list view-return-to-alist) @@ -535,7 +536,6 @@ (when item (setq view-return-to-alist (cons item view-return-to-alist))))) -(make-obsolete 'view-return-to-alist-update "this function has no effect." "24.1") ;;;###autoload (defun view-mode-enter (&optional quit-restore exit-action) === modified file 'src/ChangeLog' --- src/ChangeLog 2012-09-24 22:47:51 +0000 +++ src/ChangeLog 2012-09-25 04:13:02 +0000 @@ -1,3 +1,7 @@ +2012-09-25 Chong Yidong + + * xdisp.c (mode_line_inverse_video): Delete obsolete variable. + 2012-09-24 Stefan Monnier * bytecode.c (exec_byte_code): Signal an error instead of aborting, === modified file 'src/xdisp.c' --- src/xdisp.c 2012-09-23 08:44:20 +0000 +++ src/xdisp.c 2012-09-25 04:13:02 +0000 @@ -20162,10 +20162,6 @@ this. */ it.paragraph_embedding = L2R; - if (! mode_line_inverse_video) - /* Force the menu-bar to be displayed in the default face. */ - it.base_face_id = it.face_id = DEFAULT_FACE_ID; - /* Clear all rows of the menu bar. */ for (i = 0; i < FRAME_MENU_BAR_LINES (f); ++i) { @@ -20335,10 +20331,6 @@ it.glyph_row->mode_line_p = 1; - if (! mode_line_inverse_video) - /* Force the mode-line to be displayed in the default face. */ - it.base_face_id = it.face_id = DEFAULT_FACE_ID; - /* FIXME: This should be controlled by a user option. But supporting such an option is not trivial, since the mode line is made up of many separate strings. */ @@ -28930,12 +28922,6 @@ If `word-wrap' is enabled, you might want to reduce this. */); Vtruncate_partial_width_windows = make_number (50); - DEFVAR_BOOL ("mode-line-inverse-video", mode_line_inverse_video, - doc: /* When nil, display the mode-line/header-line/menu-bar in the default face. -Any other value means to use the appropriate face, `mode-line', -`header-line', or `menu' respectively. */); - mode_line_inverse_video = 1; - DEFVAR_LISP ("line-number-display-limit", Vline_number_display_limit, doc: /* Maximum buffer size for which line number should be displayed. If the buffer is bigger than this, the line number does not appear ------------------------------------------------------------ revno: 110189 committer: Glenn Morris branch nick: trunk timestamp: Mon 2012-09-24 21:18:50 -0400 message: * buff-menu.el (Buffer-menu-name-width, Buffer-menu-size-width): Doc fixes. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-09-25 01:15:24 +0000 +++ lisp/ChangeLog 2012-09-25 01:18:50 +0000 @@ -1,5 +1,8 @@ 2012-09-25 Glenn Morris + * buff-menu.el (Buffer-menu-name-width, Buffer-menu-size-width): + Doc fixes. + * eshell/em-term.el (eshell-term-name): Default to term-term-name. (Bug#12485) === modified file 'lisp/buff-menu.el' --- lisp/buff-menu.el 2012-09-23 10:21:34 +0000 +++ lisp/buff-menu.el 2012-09-25 01:18:50 +0000 @@ -64,17 +64,17 @@ "24.3") (defcustom Buffer-menu-name-width 19 + "Width of buffer name column in the Buffer Menu." + :type 'number + :group 'Buffer-menu + :version "24.3") + +(defcustom Buffer-menu-size-width 7 "Width of buffer size column in the Buffer Menu." :type 'number :group 'Buffer-menu :version "24.3") -(defcustom Buffer-menu-size-width 7 - "Width of buffer name column in the Buffer Menu." - :type 'number - :group 'Buffer-menu - :version "24.3") - (defcustom Buffer-menu-mode-width 16 "Width of mode name column in the Buffer Menu." :type 'number ------------------------------------------------------------ revno: 110188 committer: Glenn Morris branch nick: trunk timestamp: Mon 2012-09-24 21:15:24 -0400 message: * em-term.el (eshell-term-name): Default to term-term-name. (Bug#12485) diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-09-24 23:15:40 +0000 +++ lisp/ChangeLog 2012-09-25 01:15:24 +0000 @@ -1,8 +1,12 @@ +2012-09-25 Glenn Morris + + * eshell/em-term.el (eshell-term-name): + Default to term-term-name. (Bug#12485) + 2012-09-24 Fabián Ezequiel Gallina - * progmodes/python.el: - (python-shell-send-buffer): Better handling of "if __name__ == - '__main__':" conditionals when sending the buffer. + * progmodes/python.el (python-shell-send-buffer): Better handling + of "if __name__ == '__main__':" conditionals when sending the buffer. 2012-09-24 Glenn Morris === modified file 'lisp/eshell/em-term.el' --- lisp/eshell/em-term.el 2012-06-27 07:08:06 +0000 +++ lisp/eshell/em-term.el 2012-09-25 01:15:24 +0000 @@ -63,10 +63,13 @@ :type '(repeat string) :group 'eshell-term) -(defcustom eshell-term-name "eterm" +;; If you change this from term-term-name, you need to ensure that the +;; value you choose exists in the system's terminfo database. (Bug#12485) +(defcustom eshell-term-name term-term-name "Name to use for the TERM variable when running visual commands. See `term-term-name' in term.el for more information on how this is used." + :version "24.3" ; eterm -> term-term-name = eterm-color :type 'string :group 'eshell-term) ------------------------------------------------------------ revno: 110187 committer: Fabián Ezequiel Gallina branch nick: trunk timestamp: Mon 2012-09-24 20:15:40 -0300 message: * progmodes/python.el: (python-shell-send-buffer): Better handling of "if __name__ == '__main__':" conditionals when sending the buffer. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-09-24 18:22:10 +0000 +++ lisp/ChangeLog 2012-09-24 23:15:40 +0000 @@ -1,3 +1,9 @@ +2012-09-24 Fabián Ezequiel Gallina + + * progmodes/python.el: + (python-shell-send-buffer): Better handling of "if __name__ == + '__main__':" conditionals when sending the buffer. + 2012-09-24 Glenn Morris * eshell/esh-cmd.el (eshell-find-alias-function): === modified file 'lisp/progmodes/python.el' --- lisp/progmodes/python.el 2012-09-24 17:54:46 +0000 +++ lisp/progmodes/python.el 2012-09-24 23:15:40 +0000 @@ -1919,19 +1919,18 @@ (defun python-shell-send-buffer (&optional arg) "Send the entire buffer to inferior Python process. - -With prefix ARG include lines surrounded by \"if __name__ == '__main__':\"" +With prefix ARG allow execution of code inside blocks delimited +by \"if __name__== '__main__':\"" (interactive "P") (save-restriction (widen) - (python-shell-send-region - (point-min) - (or (and - (not arg) - (save-excursion - (re-search-forward (python-rx if-name-main) nil t)) - (match-beginning 0)) - (point-max))))) + (let ((str (buffer-substring (point-min) (point-max)))) + (and + (not arg) + (setq str (replace-regexp-in-string + (python-rx if-name-main) + "if __name__ == '__main__ ':" str))) + (python-shell-send-string str)))) (defun python-shell-send-defun (arg) "Send the current defun to inferior Python process. ------------------------------------------------------------ revno: 110186 committer: Stefan Monnier branch nick: trunk timestamp: Mon 2012-09-24 18:47:51 -0400 message: * src/bytecode.c (exec_byte_code): Signal an error instead of aborting, when encountering an unknown bytecode. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-09-24 21:38:23 +0000 +++ src/ChangeLog 2012-09-24 22:47:51 +0000 @@ -1,3 +1,8 @@ +2012-09-24 Stefan Monnier + + * bytecode.c (exec_byte_code): Signal an error instead of aborting, + when encountering an unknown bytecode. + 2012-09-24 Paul Eggert image.c, indent.c: Use bool for booleans. === modified file 'src/bytecode.c' --- src/bytecode.c 2012-09-16 21:43:55 +0000 +++ src/bytecode.c 2012-09-24 22:47:51 +0000 @@ -1876,7 +1876,7 @@ /* Actually this is Bstack_ref with offset 0, but we use Bdup for that instead. */ /* CASE (Bstack_ref): */ - emacs_abort (); + error ("Invalid byte opcode"); /* Handy byte-codes for lexical binding. */ CASE (Bstack_ref1): ------------------------------------------------------------ revno: 110185 committer: Paul Eggert branch nick: trunk timestamp: Mon 2012-09-24 14:38:23 -0700 message: image.c, indent.c: Use bool for booleans. * dispextern.h (struct image_type): Members valid_p, load, init now return bool, not int. All uses changed. * image.c: Omit unnecessary static decls. (x_create_bitmap_mask, x_build_heuristic_mask): Return void, not int, since callers don't care about the return value. (x_create_bitmap_mask, define_image_type, valid_image_p) (struct image_keyword, parse_image_spec, image_spec_value) (check_image_size, image_background) (image_background_transparent, x_clear_image_1) (postprocess_image, lookup_image, x_check_image_size) (x_create_x_image_and_pixmap, xbm_image_p) (Create_Pixmap_From_Bitmap_Data, xbm_read_bitmap_data) (xbm_load_image, xbm_file_p, xbm_load, xpm_lookup_color) (init_xpm_functions, xpm_valid_color_symbols_p, xpm_image_p) (xpm_load, xpm_load_image, lookup_rgb_color, lookup_pixel_color) (x_to_xcolors, x_build_heuristic_mask, pbm_image_p, pbm_load) (png_image_p, init_png_functions, png_load_body, png_load) (jpeg_image_p, init_jpeg_functions, jpeg_load_body, jpeg_load) (tiff_image_p, init_tiff_functions, tiff_load, gif_image_p) (init_gif_functions, gif_load, imagemagick_image_p) (imagemagick_load_image, imagemagick_load, svg_image_p) (init_svg_functions, svg_load, svg_load_image, gs_image_p) (gs_load): * nsimage.m (ns_load_image): * nsterm.m (ns_defined_color): * xfaces.c (tty_lookup_color, tty_defined_color, defined_color): * xfns.c (x_defined_color): * xterm.c (x_alloc_lighter_color_for_widget) (x_alloc_nearest_color_1, x_alloc_nearest_color) (x_alloc_lighter_color): * indent.c (disptab_matches_widthtab, current_column) (scan_for_column, string_display_width, indented_beyond_p) (compute_motion, vmotion, Fvertical_motion): Use bool for booleans. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-09-24 12:23:25 +0000 +++ src/ChangeLog 2012-09-24 21:38:23 +0000 @@ -1,3 +1,41 @@ +2012-09-24 Paul Eggert + + image.c, indent.c: Use bool for booleans. + * dispextern.h (struct image_type): Members valid_p, load, init + now return bool, not int. All uses changed. + * image.c: Omit unnecessary static decls. + (x_create_bitmap_mask, x_build_heuristic_mask): + Return void, not int, since callers don't care about the return value. + (x_create_bitmap_mask, define_image_type, valid_image_p) + (struct image_keyword, parse_image_spec, image_spec_value) + (check_image_size, image_background) + (image_background_transparent, x_clear_image_1) + (postprocess_image, lookup_image, x_check_image_size) + (x_create_x_image_and_pixmap, xbm_image_p) + (Create_Pixmap_From_Bitmap_Data, xbm_read_bitmap_data) + (xbm_load_image, xbm_file_p, xbm_load, xpm_lookup_color) + (init_xpm_functions, xpm_valid_color_symbols_p, xpm_image_p) + (xpm_load, xpm_load_image, lookup_rgb_color, lookup_pixel_color) + (x_to_xcolors, x_build_heuristic_mask, pbm_image_p, pbm_load) + (png_image_p, init_png_functions, png_load_body, png_load) + (jpeg_image_p, init_jpeg_functions, jpeg_load_body, jpeg_load) + (tiff_image_p, init_tiff_functions, tiff_load, gif_image_p) + (init_gif_functions, gif_load, imagemagick_image_p) + (imagemagick_load_image, imagemagick_load, svg_image_p) + (init_svg_functions, svg_load, svg_load_image, gs_image_p) + (gs_load): + * nsimage.m (ns_load_image): + * nsterm.m (ns_defined_color): + * xfaces.c (tty_lookup_color, tty_defined_color, defined_color): + * xfns.c (x_defined_color): + * xterm.c (x_alloc_lighter_color_for_widget) + (x_alloc_nearest_color_1, x_alloc_nearest_color) + (x_alloc_lighter_color): + * indent.c (disptab_matches_widthtab, current_column) + (scan_for_column, string_display_width, indented_beyond_p) + (compute_motion, vmotion, Fvertical_motion): + Use bool for booleans. + 2012-09-24 Chong Yidong * chartab.c (Fset_char_table_default): Obsolete function removed. === modified file 'src/dispextern.h' --- src/dispextern.h 2012-09-23 09:16:57 +0000 +++ src/dispextern.h 2012-09-24 21:38:23 +0000 @@ -2757,19 +2757,19 @@ Lisp_Object *type; /* Check that SPEC is a valid image specification for the given - image type. Value is non-zero if SPEC is valid. */ - int (* valid_p) (Lisp_Object spec); + image type. Value is true if SPEC is valid. */ + bool (* valid_p) (Lisp_Object spec); /* Load IMG which is used on frame F from information contained in - IMG->spec. Value is non-zero if successful. */ - int (* load) (struct frame *f, struct image *img); + IMG->spec. Value is true if successful. */ + bool (* load) (struct frame *f, struct image *img); /* Free resources of image IMG which is used on frame F. */ void (* free) (struct frame *f, struct image *img); /* Initialization function (used for dynamic loading of image libraries on Windows), or NULL if none. */ - int (* init) (void); + bool (* init) (void); /* Next in list of all supported image types. */ struct image_type *next; @@ -3169,7 +3169,7 @@ extern void x_destroy_bitmap (struct frame *, ptrdiff_t); #endif extern void x_destroy_all_bitmaps (Display_Info *); -extern int x_create_bitmap_mask (struct frame *, ptrdiff_t); +extern void x_create_bitmap_mask (struct frame *, ptrdiff_t); extern Lisp_Object x_find_image_file (Lisp_Object); void x_kill_gs_process (Pixmap, struct frame *); @@ -3177,7 +3177,7 @@ void free_image_cache (struct frame *); void clear_image_caches (Lisp_Object); void mark_image_cache (struct image_cache *); -int valid_image_p (Lisp_Object); +bool valid_image_p (Lisp_Object); void prepare_image_for_display (struct frame *, struct image *); ptrdiff_t lookup_image (struct frame *, Lisp_Object); === modified file 'src/image.c' --- src/image.c 2012-09-23 09:25:21 +0000 +++ src/image.c 2012-09-24 21:38:23 +0000 @@ -429,6 +429,9 @@ dpyinfo->bitmaps_last = 0; } +static bool x_create_x_image_and_pixmap (struct frame *, int, int, int, + XImagePtr *, Pixmap *); +static void x_destroy_x_image (XImagePtr ximg); #ifdef HAVE_X_WINDOWS @@ -440,23 +443,17 @@ unsigned long width, unsigned long height); -static int x_create_x_image_and_pixmap (struct frame *f, int width, int height, - int depth, XImagePtr *ximg, - Pixmap *pixmap); - -static void x_destroy_x_image (XImagePtr ximg); - /* Create a mask of a bitmap. Note is this not a perfect mask. It's nicer with some borders in this context */ -int +void x_create_bitmap_mask (struct frame *f, ptrdiff_t id) { Pixmap pixmap, mask; XImagePtr ximg, mask_img; unsigned long width, height; - int result; + bool result; unsigned long bg; unsigned long x, y, xp, xm, yp, ym; GC gc; @@ -464,7 +461,7 @@ Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f); if (!(id > 0)) - return -1; + return; pixmap = x_bitmap_pixmap (f, id); width = x_bitmap_width (f, id); @@ -477,7 +474,7 @@ if (!ximg) { unblock_input (); - return -1; + return; } result = x_create_x_image_and_pixmap (f, width, height, 1, &mask_img, &mask); @@ -486,7 +483,7 @@ if (!result) { XDestroyImage (ximg); - return -1; + return; } bg = four_corners_best (ximg, NULL, width, height); @@ -525,8 +522,6 @@ XDestroyImage (ximg); x_destroy_x_image (mask_img); - - return 0; } #endif /* HAVE_X_WINDOWS */ @@ -559,15 +554,13 @@ static Lisp_Object Qcount, Qextension_data, Qdelay; static Lisp_Object Qlaplace, Qemboss, Qedge_detection, Qheuristic; -/* Function prototypes. */ +/* Forward function prototypes. */ -static struct image_type *define_image_type (struct image_type *); static struct image_type *lookup_image_type (Lisp_Object); -static void image_error (const char *format, Lisp_Object, Lisp_Object); static void x_laplace (struct frame *, struct image *); static void x_emboss (struct frame *, struct image *); -static int x_build_heuristic_mask (struct frame *, struct image *, - Lisp_Object); +static void x_build_heuristic_mask (struct frame *, struct image *, + Lisp_Object); #ifdef HAVE_NTGUI #define CACHE_IMAGE_TYPE(type, status) \ do { Vlibrary_cache = Fcons (Fcons (type, status), Vlibrary_cache); } while (0) @@ -586,7 +579,7 @@ { struct image_type *p = NULL; Lisp_Object target_type = *type->type; - int type_valid = 1; + bool type_valid = 1; block_input (); @@ -625,17 +618,17 @@ } -/* Value is non-zero if OBJECT is a valid Lisp image specification. A +/* Value is true if OBJECT is a valid Lisp image specification. A valid image specification is a list whose car is the symbol `image', and whose rest is a property list. The property list must contain a value for key `:type'. That value must be the name of a supported image type. The rest of the property list depends on the image type. */ -int +bool valid_image_p (Lisp_Object object) { - int valid_p = 0; + bool valid_p = 0; if (IMAGEP (object)) { @@ -705,8 +698,8 @@ /* The type of value allowed. */ enum image_value_type type; - /* Non-zero means key must be present. */ - int mandatory_p; + /* True means key must be present. */ + bool mandatory_p; /* Used to recognize duplicate keywords in a property list. */ int count; @@ -716,18 +709,13 @@ }; -static int parse_image_spec (Lisp_Object, struct image_keyword *, - int, Lisp_Object); -static Lisp_Object image_spec_value (Lisp_Object, Lisp_Object, int *); - - /* Parse image spec SPEC according to KEYWORDS. A valid image spec has the format (image KEYWORD VALUE ...). One of the keyword/ value pairs must be `:type TYPE'. KEYWORDS is a vector of image_keywords structures of size NKEYWORDS describing other - allowed keyword/value pairs. Value is non-zero if SPEC is valid. */ + allowed keyword/value pairs. Value is true if SPEC is valid. */ -static int +static bool parse_image_spec (Lisp_Object spec, struct image_keyword *keywords, int nkeywords, Lisp_Object type) { @@ -859,11 +847,11 @@ /* Return the value of KEY in image specification SPEC. Value is nil - if KEY is not present in SPEC. if FOUND is not null, set *FOUND - to 1 if KEY was found in SPEC, set it to 0 otherwise. */ + if KEY is not present in SPEC. Set *FOUND depending on whether KEY + was found in SPEC. */ static Lisp_Object -image_spec_value (Lisp_Object spec, Lisp_Object key, int *found) +image_spec_value (Lisp_Object spec, Lisp_Object key, bool *found) { Lisp_Object tail; @@ -967,8 +955,6 @@ Image type independent image structures ***********************************************************************/ -static void free_image (struct frame *f, struct image *img); - #define MAX_IMAGE_SIZE 10.0 /* Allocate and return a new image structure for image specification SPEC. SPEC has a hash value of HASH. */ @@ -1018,10 +1004,9 @@ } } -/* Return 1 if the given widths and heights are valid for display; - otherwise, return 0. */ +/* Return true if the given widths and heights are valid for display. */ -static int +static bool check_image_size (struct frame *f, int width, int height) { int w, h; @@ -1060,7 +1045,7 @@ /* If IMG doesn't have a pixmap yet, load it now, using the image type dependent loader function. */ if (img->pixmap == NO_PIXMAP && !img->load_failed_p) - img->load_failed_p = img->type->load (f, img) == 0; + img->load_failed_p = ! img->type->load (f, img); } @@ -1193,7 +1178,7 @@ if (! img->background_valid) /* IMG doesn't have a background yet, try to guess a reasonable value. */ { - int free_ximg = !ximg; + bool free_ximg = !ximg; #ifdef HAVE_NTGUI HGDIOBJ prev; #endif /* HAVE_NTGUI */ @@ -1234,7 +1219,7 @@ { if (img->mask) { - int free_mask = !mask; + bool free_mask = !mask; #ifdef HAVE_NTGUI HGDIOBJ prev; #endif /* HAVE_NTGUI */ @@ -1272,23 +1257,13 @@ Helper functions for X image types ***********************************************************************/ -static void x_clear_image_1 (struct frame *, struct image *, int, - int, int); -static void x_clear_image (struct frame *f, struct image *img); -static unsigned long x_alloc_image_color (struct frame *f, - struct image *img, - Lisp_Object color_name, - unsigned long dflt); - - -/* Clear X resources of image IMG on frame F. PIXMAP_P non-zero means - free the pixmap if any. MASK_P non-zero means clear the mask - pixmap if any. COLORS_P non-zero means free colors allocated for - the image, if any. */ +/* Clear X resources of image IMG on frame F. PIXMAP_P means free the + pixmap if any. MASK_P means clear the mask pixmap if any. + COLORS_P means free colors allocated for the image, if any. */ static void -x_clear_image_1 (struct frame *f, struct image *img, int pixmap_p, int mask_p, - int colors_p) +x_clear_image_1 (struct frame *f, struct image *img, bool pixmap_p, + bool mask_p, bool colors_p) { if (pixmap_p && img->pixmap) { @@ -1368,7 +1343,6 @@ ***********************************************************************/ static void cache_image (struct frame *f, struct image *img); -static void postprocess_image (struct frame *, struct image *); /* Return a new, initialized image cache that is allocated from the heap. Call free_image_cache to free an image cache. */ @@ -1641,7 +1615,7 @@ x_build_heuristic_mask (f, img, mask); else { - int found_p; + bool found_p; mask = image_spec_value (spec, QCmask, &found_p); @@ -1714,7 +1688,7 @@ block_input (); img = make_image (spec, hash); cache_image (f, img); - img->load_failed_p = img->type->load (f, img) == 0; + img->load_failed_p = ! img->type->load (f, img); img->frame_foreground = FRAME_FOREGROUND_PIXEL (f); img->frame_background = FRAME_BACKGROUND_PIXEL (f); @@ -1873,16 +1847,11 @@ #endif /* HAVE_NTGUI */ -static int x_create_x_image_and_pixmap (struct frame *, int, int, int, - XImagePtr *, Pixmap *); -static void x_destroy_x_image (XImagePtr); -static void x_put_x_image (struct frame *, XImagePtr, Pixmap, int, int); - -/* Return nonzero if XIMG's size WIDTH x HEIGHT doesn't break the +/* Return true if XIMG's size WIDTH x HEIGHT doesn't break the windowing system. WIDTH and HEIGHT must both be positive. If XIMG is null, assume it is a bitmap. */ -static int +static bool x_check_image_size (XImagePtr ximg, int width, int height) { #ifdef HAVE_X_WINDOWS @@ -1921,12 +1890,12 @@ frame F. Set *XIMG and *PIXMAP to the XImage and Pixmap created. Set (*XIMG)->data to a raster of WIDTH x HEIGHT pixels allocated via xmalloc. Print error messages via image_error if an error - occurs. Value is non-zero if successful. + occurs. Value is true if successful. On W32, a DEPTH of zero signifies a 24 bit image, otherwise DEPTH should indicate the bit depth of the image. */ -static int +static bool x_create_x_image_and_pixmap (struct frame *f, int width, int height, int depth, XImagePtr *ximg, Pixmap *pixmap) { @@ -2198,15 +2167,9 @@ XBM images ***********************************************************************/ -static int xbm_scan (unsigned char **, unsigned char *, char *, int *); -static int xbm_load (struct frame *f, struct image *img); -static int xbm_load_image (struct frame *f, struct image *img, - unsigned char *, unsigned char *); -static int xbm_image_p (Lisp_Object object); -static int xbm_read_bitmap_data (struct frame *f, - unsigned char *, unsigned char *, - int *, int *, char **, int); -static int xbm_file_p (Lisp_Object); +static bool xbm_load (struct frame *f, struct image *img); +static bool xbm_image_p (Lisp_Object object); +static bool xbm_file_p (Lisp_Object); /* Indices of image specification fields in xbm_format, below. */ @@ -2270,10 +2233,10 @@ }; -/* Return non-zero if OBJECT is a valid XBM-type image specification. +/* Return true if OBJECT is a valid XBM-type image specification. A valid specification is a list starting with the symbol `image' The rest of the list is a property list which must contain an - entry `:type xbm.. + entry `:type xbm'. If the specification specifies a file to load, it must contain an entry `:file FILENAME' where FILENAME is a string. @@ -2299,7 +2262,7 @@ foreground and background of the frame on which the image is displayed is used. */ -static int +static bool xbm_image_p (Lisp_Object object) { struct image_keyword kw[XBM_LAST]; @@ -2557,7 +2520,7 @@ static void Create_Pixmap_From_Bitmap_Data (struct frame *f, struct image *img, char *data, RGB_PIXEL_COLOR fg, RGB_PIXEL_COLOR bg, - int non_default_colors) + bool non_default_colors) { #ifdef HAVE_NTGUI img->pixmap @@ -2589,20 +2552,20 @@ X versions. CONTENTS is a pointer to a buffer to parse; END is the buffer's end. Set *WIDTH and *HEIGHT to the width and height of the image. Return in *DATA the bitmap data allocated with xmalloc. - Value is non-zero if successful. DATA null means just test if - CONTENTS looks like an in-memory XBM file. If INHIBIT_IMAGE_ERROR - is non-zero, inhibit the call to image_error when the image size is - invalid (the bitmap remains unread). */ + Value is true if successful. DATA null means just test if + CONTENTS looks like an in-memory XBM file. If INHIBIT_IMAGE_ERROR, + inhibit the call to image_error when the image size is invalid (the + bitmap remains unread). */ -static int +static bool xbm_read_bitmap_data (struct frame *f, unsigned char *contents, unsigned char *end, int *width, int *height, char **data, - int inhibit_image_error) + bool inhibit_image_error) { unsigned char *s = contents; char buffer[BUFSIZ]; - int padding_p = 0; - int v10 = 0; + bool padding_p = 0; + bool v10 = 0; int bytes_per_line, i, nbytes; char *p; int value; @@ -2749,16 +2712,16 @@ /* Load XBM image IMG which will be displayed on frame F from buffer - CONTENTS. END is the end of the buffer. Value is non-zero if + CONTENTS. END is the end of the buffer. Value is true if successful. */ -static int +static bool xbm_load_image (struct frame *f, struct image *img, unsigned char *contents, unsigned char *end) { - int rc; + bool rc; char *data; - int success_p = 0; + bool success_p = 0; rc = xbm_read_bitmap_data (f, contents, end, &img->width, &img->height, &data, 0); @@ -2766,7 +2729,7 @@ { unsigned long foreground = FRAME_FOREGROUND_PIXEL (f); unsigned long background = FRAME_BACKGROUND_PIXEL (f); - int non_default_colors = 0; + bool non_default_colors = 0; Lisp_Object value; eassert (img->width > 0 && img->height > 0); @@ -2807,9 +2770,9 @@ } -/* Value is non-zero if DATA looks like an in-memory XBM file. */ +/* Value is true if DATA looks like an in-memory XBM file. */ -static int +static bool xbm_file_p (Lisp_Object data) { int w, h; @@ -2821,12 +2784,12 @@ /* Fill image IMG which is used on frame F with pixmap data. Value is - non-zero if successful. */ + true if successful. */ -static int +static bool xbm_load (struct frame *f, struct image *img) { - int success_p = 0; + bool success_p = 0; Lisp_Object file_name; eassert (xbm_image_p (img->spec)); @@ -2862,10 +2825,10 @@ Lisp_Object data; unsigned long foreground = FRAME_FOREGROUND_PIXEL (f); unsigned long background = FRAME_BACKGROUND_PIXEL (f); - int non_default_colors = 0; + bool non_default_colors = 0; char *bits; - int parsed_p; - int in_memory_file_p = 0; + bool parsed_p; + bool in_memory_file_p = 0; /* See if data looks like an in-memory XBM file. */ data = image_spec_value (img->spec, QCdata, NULL); @@ -2874,7 +2837,6 @@ /* Parse the image specification. */ memcpy (fmt, xbm_format, sizeof fmt); parsed_p = parse_image_spec (img->spec, fmt, XBM_LAST, Qxbm); - (void) parsed_p; eassert (parsed_p); /* Get specified width, and height. */ @@ -2979,9 +2941,8 @@ #if defined (HAVE_XPM) || defined (HAVE_NS) -static int xpm_image_p (Lisp_Object object); -static int xpm_load (struct frame *f, struct image *img); -static int xpm_valid_color_symbols_p (Lisp_Object); +static bool xpm_image_p (Lisp_Object object); +static bool xpm_load (struct frame *f, struct image *img); #endif /* HAVE_XPM || HAVE_NS */ @@ -3048,7 +3009,7 @@ }; #ifdef HAVE_NTGUI -static int init_xpm_functions (void); +static bool init_xpm_functions (void); #else #define init_xpm_functions NULL #endif @@ -3079,10 +3040,6 @@ #ifdef ALLOC_XPM_COLORS -static void xpm_init_color_cache (struct frame *, XpmAttributes *); -static void xpm_free_color_cache (void); -static int xpm_lookup_color (struct frame *, char *, XColor *); -static int xpm_color_bucket (char *); static struct xpm_cached_color *xpm_cache_color (struct frame *, char *, XColor *, int); @@ -3189,10 +3146,10 @@ /* Look up color COLOR_NAME for frame F in the color cache. If found, return the cached definition in *COLOR. Otherwise, make a new - entry in the cache and allocate the color. Value is zero if color + entry in the cache and allocate the color. Value is false if color allocation failed. */ -static int +static bool xpm_lookup_color (struct frame *f, char *color_name, XColor *color) { struct xpm_cached_color *p; @@ -3261,7 +3218,7 @@ xpm_XImage **, XpmAttributes *)); DEF_IMGLIB_FN (void, XImageFree, (xpm_XImage *)); -static int +static bool init_xpm_functions (void) { HMODULE library; @@ -3279,11 +3236,11 @@ #endif /* HAVE_NTGUI */ -/* Value is non-zero if COLOR_SYMBOLS is a valid color symbols list +/* Value is true if COLOR_SYMBOLS is a valid color symbols list for XPM images. Such a list must consist of conses whose car and cdr are strings. */ -static int +static bool xpm_valid_color_symbols_p (Lisp_Object color_symbols) { while (CONSP (color_symbols)) @@ -3300,9 +3257,9 @@ } -/* Value is non-zero if OBJECT is a valid XPM image specification. */ +/* Value is true if OBJECT is a valid XPM image specification. */ -static int +static bool xpm_image_p (Lisp_Object object) { struct image_keyword fmt[XPM_LAST]; @@ -3359,11 +3316,11 @@ #endif /* defined (HAVE_XPM) && defined (HAVE_X_WINDOWS) */ /* Load image IMG which will be displayed on frame F. Value is - non-zero if successful. */ + true if successful. */ #ifdef HAVE_XPM -static int +static bool xpm_load (struct frame *f, struct image *img) { int rc; @@ -3817,7 +3774,7 @@ return -1; } -static int +static bool xpm_load_image (struct frame *f, struct image *img, const unsigned char *contents, @@ -3832,7 +3789,8 @@ void (*put_color_table) (Lisp_Object, const unsigned char *, int, Lisp_Object); Lisp_Object (*get_color_table) (Lisp_Object, const unsigned char *, int); Lisp_Object frame, color_symbols, color_table; - int best_key, have_mask = 0; + int best_key; + bool have_mask = 0; XImagePtr ximg = NULL, mask_img = NULL; #define match() \ @@ -4052,11 +4010,11 @@ #undef expect_ident } -static int +static bool xpm_load (struct frame *f, struct image *img) { - int success_p = 0; + bool success_p = 0; Lisp_Object file_name; /* If IMG->spec specifies a file name, create a non-file spec from it. */ @@ -4227,7 +4185,7 @@ #ifdef HAVE_X_WINDOWS XColor color; Colormap cmap; - int rc; + bool rc; #else COLORREF color; #endif @@ -4295,7 +4253,7 @@ { XColor color; Colormap cmap; - int rc; + bool rc; if (ct_colors_allocated_max <= ct_colors_allocated) return FRAME_FOREGROUND_PIXEL (f); @@ -4389,14 +4347,6 @@ Algorithms ***********************************************************************/ -static XColor *x_to_xcolors (struct frame *, struct image *, int); -static void x_from_xcolors (struct frame *, struct image *, XColor *); -static void x_detect_edges (struct frame *, struct image *, int[9], int); - -#ifdef HAVE_NTGUI -static void XPutPixel (XImagePtr , int, int, COLORREF); -#endif /* HAVE_NTGUI */ - /* Edge detection matrices for different edge-detection strategies. */ @@ -4422,12 +4372,12 @@ /* On frame F, return an array of XColor structures describing image IMG->pixmap. Each XColor structure has its pixel color set. RGB_P - non-zero means also fill the red/green/blue members of the XColor + means also fill the red/green/blue members of the XColor structures. Value is a pointer to the array of XColors structures, allocated with xmalloc; it must be freed by the caller. */ static XColor * -x_to_xcolors (struct frame *f, struct image *img, int rgb_p) +x_to_xcolors (struct frame *f, struct image *img, bool rgb_p) { int x, y; XColor *colors, *p; @@ -4803,9 +4753,9 @@ determine the background color of IMG. If it is a list '(R G B)', with R, G, and B being integers >= 0, take that as the color of the background. Otherwise, determine the background color of IMG - heuristically. Value is non-zero if successful. */ + heuristically. */ -static int +static void x_build_heuristic_mask (struct frame *f, struct image *img, Lisp_Object how) { XImagePtr_or_DC ximg; @@ -4817,7 +4767,8 @@ char *mask_img; int row_width; #endif /* HAVE_NTGUI */ - int x, y, rc, use_img_background; + int x, y; + bool rc, use_img_background; unsigned long bg = 0; if (img->mask) @@ -4833,7 +4784,7 @@ rc = x_create_x_image_and_pixmap (f, img->width, img->height, 1, &mask_img, &img->mask); if (!rc) - return 0; + return; #endif /* !HAVE_NS */ /* Get the X image of IMG->pixmap. */ @@ -4923,8 +4874,6 @@ #endif /* HAVE_NTGUI */ Destroy_Image (ximg, prev); - - return 1; } @@ -4932,9 +4881,8 @@ PBM (mono, gray, color) ***********************************************************************/ -static int pbm_image_p (Lisp_Object object); -static int pbm_load (struct frame *f, struct image *img); -static int pbm_scan_number (unsigned char **, unsigned char *); +static bool pbm_image_p (Lisp_Object object); +static bool pbm_load (struct frame *f, struct image *img); /* The symbol `pbm' identifying images of this type. */ @@ -4989,9 +4937,9 @@ }; -/* Return non-zero if OBJECT is a valid PBM image specification. */ +/* Return true if OBJECT is a valid PBM image specification. */ -static int +static bool pbm_image_p (Lisp_Object object) { struct image_keyword fmt[PBM_LAST]; @@ -5084,10 +5032,11 @@ /* Load PBM image IMG for use on frame F. */ -static int +static bool pbm_load (struct frame *f, struct image *img) { - int raw_p, x, y; + bool raw_p; + int x, y; int width, height, max_color_idx = 0; XImagePtr ximg; Lisp_Object file, specified_file; @@ -5350,8 +5299,8 @@ /* Function prototypes. */ -static int png_image_p (Lisp_Object object); -static int png_load (struct frame *f, struct image *img); +static bool png_image_p (Lisp_Object object); +static bool png_load (struct frame *f, struct image *img); /* The symbol `png' identifying images of this type. */ @@ -5392,7 +5341,7 @@ }; #ifdef HAVE_NTGUI -static int init_png_functions (void); +static bool init_png_functions (void); #else #define init_png_functions NULL #endif @@ -5409,9 +5358,9 @@ NULL }; -/* Return non-zero if OBJECT is a valid PNG image specification. */ +/* Return true if OBJECT is a valid PNG image specification. */ -static int +static bool png_image_p (Lisp_Object object) { struct image_keyword fmt[PNG_LAST]; @@ -5463,7 +5412,7 @@ DEF_IMGLIB_FN (jmp_buf *, png_set_longjmp_fn, (png_structp, png_longjmp_ptr, size_t)); #endif /* libpng version >= 1.5 */ -static int +static bool init_png_functions (void) { HMODULE library; @@ -5614,7 +5563,7 @@ } -/* Load PNG image IMG for use on frame F. Value is non-zero if +/* Load PNG image IMG for use on frame F. Value is true if successful. */ struct png_load_context @@ -5628,7 +5577,7 @@ png_byte **rows; }; -static int +static bool png_load_body (struct frame *f, struct image *img, struct png_load_context *c) { Lisp_Object file, specified_file; @@ -5646,7 +5595,7 @@ int bit_depth, color_type, interlace_type; png_byte channels; png_uint_32 row_bytes; - int transparent_p; + bool transparent_p; struct png_memory_storage tbr; /* Data to be read */ /* Find out what file to load. */ @@ -5979,7 +5928,7 @@ return 1; } -static int +static bool png_load (struct frame *f, struct image *img) { struct png_load_context c; @@ -5989,7 +5938,7 @@ #else /* HAVE_PNG */ #ifdef HAVE_NS -static int +static bool png_load (struct frame *f, struct image *img) { return ns_load_image (f, img, @@ -6009,8 +5958,8 @@ #if defined (HAVE_JPEG) || defined (HAVE_NS) -static int jpeg_image_p (Lisp_Object object); -static int jpeg_load (struct frame *f, struct image *img); +static bool jpeg_image_p (Lisp_Object object); +static bool jpeg_load (struct frame *f, struct image *img); /* The symbol `jpeg' identifying images of this type. */ @@ -6051,7 +6000,7 @@ }; #ifdef HAVE_NTGUI -static int init_jpeg_functions (void); +static bool init_jpeg_functions (void); #else #define init_jpeg_functions NULL #endif @@ -6068,9 +6017,9 @@ NULL }; -/* Return non-zero if OBJECT is a valid JPEG image specification. */ +/* Return true if OBJECT is a valid JPEG image specification. */ -static int +static bool jpeg_image_p (Lisp_Object object) { struct image_keyword fmt[JPEG_LAST]; @@ -6119,7 +6068,7 @@ DEF_IMGLIB_FN (struct jpeg_error_mgr *, jpeg_std_error, (struct jpeg_error_mgr *)); DEF_IMGLIB_FN (boolean, jpeg_resync_to_restart, (j_decompress_ptr, int)); -static int +static bool init_jpeg_functions (void) { HMODULE library; @@ -6389,7 +6338,7 @@ /* Load image IMG for use on frame F. Patterned after example.c from the JPEG lib. */ -static int +static bool jpeg_load_body (struct frame *f, struct image *img, struct my_jpeg_error_mgr *mgr) { @@ -6570,7 +6519,7 @@ return 1; } -static int +static bool jpeg_load (struct frame *f, struct image *img) { struct my_jpeg_error_mgr mgr; @@ -6580,7 +6529,7 @@ #else /* HAVE_JPEG */ #ifdef HAVE_NS -static int +static bool jpeg_load (struct frame *f, struct image *img) { return ns_load_image (f, img, @@ -6599,8 +6548,8 @@ #if defined (HAVE_TIFF) || defined (HAVE_NS) -static int tiff_image_p (Lisp_Object object); -static int tiff_load (struct frame *f, struct image *img); +static bool tiff_image_p (Lisp_Object object); +static bool tiff_load (struct frame *f, struct image *img); /* The symbol `tiff' identifying images of this type. */ @@ -6643,7 +6592,7 @@ }; #ifdef HAVE_NTGUI -static int init_tiff_functions (void); +static bool init_tiff_functions (void); #else #define init_tiff_functions NULL #endif @@ -6660,9 +6609,9 @@ NULL }; -/* Return non-zero if OBJECT is a valid TIFF image specification. */ +/* Return true if OBJECT is a valid TIFF image specification. */ -static int +static bool tiff_image_p (Lisp_Object object) { struct image_keyword fmt[TIFF_LAST]; @@ -6696,7 +6645,7 @@ DEF_IMGLIB_FN (void, TIFFClose, (TIFF *)); DEF_IMGLIB_FN (int, TIFFSetDirectory, (TIFF *, tdir_t)); -static int +static bool init_tiff_functions (void) { HMODULE library; @@ -6866,10 +6815,10 @@ } -/* Load TIFF image IMG for use on frame F. Value is non-zero if +/* Load TIFF image IMG for use on frame F. Value is true if successful. */ -static int +static bool tiff_load (struct frame *f, struct image *img) { Lisp_Object file, specified_file; @@ -7034,7 +6983,7 @@ #else /* HAVE_TIFF */ #ifdef HAVE_NS -static int +static bool tiff_load (struct frame *f, struct image *img) { return ns_load_image (f, img, @@ -7053,8 +7002,8 @@ #if defined (HAVE_GIF) || defined (HAVE_NS) -static int gif_image_p (Lisp_Object object); -static int gif_load (struct frame *f, struct image *img); +static bool gif_image_p (Lisp_Object object); +static bool gif_load (struct frame *f, struct image *img); static void gif_clear_image (struct frame *f, struct image *img); /* The symbol `gif' identifying images of this type. */ @@ -7098,7 +7047,7 @@ }; #ifdef HAVE_NTGUI -static int init_gif_functions (void); +static bool init_gif_functions (void); #else #define init_gif_functions NULL #endif @@ -7124,9 +7073,9 @@ x_clear_image (f, img); } -/* Return non-zero if OBJECT is a valid GIF image specification. */ +/* Return true if OBJECT is a valid GIF image specification. */ -static int +static bool gif_image_p (Lisp_Object object) { struct image_keyword fmt[GIF_LAST]; @@ -7169,7 +7118,7 @@ DEF_IMGLIB_FN (GifFileType *, DGifOpen, (void *, InputFunc)); DEF_IMGLIB_FN (GifFileType *, DGifOpenFileName, (const char *)); -static int +static bool init_gif_functions (void) { HMODULE library; @@ -7223,7 +7172,7 @@ } -/* Load GIF image IMG for use on frame F. Value is non-zero if +/* Load GIF image IMG for use on frame F. Value is true if successful. */ static const int interlace_start[] = {0, 4, 2, 1}; @@ -7231,7 +7180,7 @@ #define GIF_LOCAL_DESCRIPTOR_EXTENSION 249 -static int +static bool gif_load (struct frame *f, struct image *img) { Lisp_Object file; @@ -7529,7 +7478,7 @@ #else /* !HAVE_GIF */ #ifdef HAVE_NS -static int +static bool gif_load (struct frame *f, struct image *img) { return ns_load_image (f, img, @@ -7548,8 +7497,8 @@ static Lisp_Object Qimagemagick; -static int imagemagick_image_p (Lisp_Object); -static int imagemagick_load (struct frame *, struct image *); +static bool imagemagick_image_p (Lisp_Object); +static bool imagemagick_load (struct frame *, struct image *); static void imagemagick_clear_image (struct frame *, struct image *); /* Indices of image specification fields in imagemagick_format. */ @@ -7595,7 +7544,7 @@ }; #ifdef HAVE_NTGUI -static int init_imagemagick_functions (void); +static bool init_imagemagick_functions (void); #else #define init_imagemagick_functions NULL #endif @@ -7622,11 +7571,11 @@ x_clear_image (f, img); } -/* Return non-zero if OBJECT is a valid IMAGEMAGICK image specification. Do +/* Return true if OBJECT is a valid IMAGEMAGICK image specification. Do this by calling parse_image_spec and supplying the keywords that identify the IMAGEMAGICK format. */ -static int +static bool imagemagick_image_p (Lisp_Object object) { struct image_keyword fmt[IMAGEMAGICK_LAST]; @@ -7678,9 +7627,9 @@ be parsed; SIZE is the number of bytes of data; and FILENAME is either the file name or the image data. - Return non-zero if successful. */ + Return true if successful. */ -static int +static bool imagemagick_load_image (struct frame *f, struct image *img, unsigned char *contents, unsigned int size, char *filename) @@ -8018,14 +7967,14 @@ } -/* Load IMAGEMAGICK image IMG for use on frame F. Value is non-zero if +/* Load IMAGEMAGICK image IMG for use on frame F. Value is true if successful. this function will go into the imagemagick_type structure, and the prototype thus needs to be compatible with that structure. */ -static int +static bool imagemagick_load (struct frame *f, struct image *img) { - int success_p = 0; + bool success_p = 0; Lisp_Object file_name; /* If IMG->spec specifies a file name, create a non-file spec from it. */ @@ -8104,11 +8053,11 @@ /* Function prototypes. */ -static int svg_image_p (Lisp_Object object); -static int svg_load (struct frame *f, struct image *img); +static bool svg_image_p (Lisp_Object object); +static bool svg_load (struct frame *f, struct image *img); -static int svg_load_image (struct frame *, struct image *, - unsigned char *, ptrdiff_t); +static bool svg_load_image (struct frame *, struct image *, + unsigned char *, ptrdiff_t); /* The symbol `svg' identifying images of this type. */ @@ -8149,7 +8098,7 @@ }; #ifdef HAVE_NTGUI -static int init_svg_functions (void); +static bool init_svg_functions (void); #else #define init_svg_functions NULL #endif @@ -8169,11 +8118,11 @@ }; -/* Return non-zero if OBJECT is a valid SVG image specification. Do +/* Return true if OBJECT is a valid SVG image specification. Do this by calling parse_image_spec and supplying the keywords that identify the SVG format. */ -static int +static bool svg_image_p (Lisp_Object object) { struct image_keyword fmt[SVG_LAST]; @@ -8212,7 +8161,7 @@ Lisp_Object Qgdk_pixbuf, Qglib, Qgobject; -static int +static bool init_svg_functions (void) { HMODULE library, gdklib, glib, gobject; @@ -8268,14 +8217,13 @@ #define fn_g_error_free g_error_free #endif /* !HAVE_NTGUI */ -/* Load SVG image IMG for use on frame F. Value is non-zero if - successful. this function will go into the svg_type structure, and - the prototype thus needs to be compatible with that structure. */ +/* Load SVG image IMG for use on frame F. Value is true if + successful. */ -static int +static bool svg_load (struct frame *f, struct image *img) { - int success_p = 0; + bool success_p = 0; Lisp_Object file_name; /* If IMG->spec specifies a file name, create a non-file spec from it. */ @@ -8328,8 +8276,8 @@ Uses librsvg to do most of the image processing. - Returns non-zero when successful. */ -static int + Returns true when successful. */ +static bool svg_load_image (struct frame *f, /* Pointer to emacs frame structure. */ struct image *img, /* Pointer to emacs image structure. */ unsigned char *contents, /* String containing the SVG XML data to be parsed. */ @@ -8496,8 +8444,8 @@ #ifdef HAVE_GHOSTSCRIPT -static int gs_image_p (Lisp_Object object); -static int gs_load (struct frame *f, struct image *img); +static bool gs_image_p (Lisp_Object object); +static bool gs_load (struct frame *f, struct image *img); static void gs_clear_image (struct frame *f, struct image *img); /* Keyword symbols. */ @@ -8566,10 +8514,10 @@ } -/* Return non-zero if OBJECT is a valid Ghostscript image +/* Return true if OBJECT is a valid Ghostscript image specification. */ -static int +static bool gs_image_p (Lisp_Object object) { struct image_keyword fmt[GS_LAST]; @@ -8606,10 +8554,10 @@ } -/* Load Ghostscript image IMG for use on frame F. Value is non-zero +/* Load Ghostscript image IMG for use on frame F. Value is true if successful. */ -static int +static bool gs_load (struct frame *f, struct image *img) { uprintmax_t printnum1, printnum2; === modified file 'src/indent.c' --- src/indent.c 2012-09-15 07:06:56 +0000 +++ src/indent.c 2012-09-24 21:38:23 +0000 @@ -115,7 +115,7 @@ for characters as WIDTHTAB. We use this to decide when to invalidate the buffer's width_run_cache. */ -int +bool disptab_matches_widthtab (struct Lisp_Char_Table *disptab, struct Lisp_Vector *widthtab) { int i; @@ -320,14 +320,14 @@ ptrdiff_t current_column (void) { - register ptrdiff_t col; - register unsigned char *ptr, *stop; - register int tab_seen; + ptrdiff_t col; + unsigned char *ptr, *stop; + bool tab_seen; ptrdiff_t post_tab; - register int c; + int c; int tab_width = SANE_TAB_WIDTH (current_buffer); - int ctl_arrow = !NILP (BVAR (current_buffer, ctl_arrow)); - register struct Lisp_Char_Table *dp = buffer_display_table (); + bool ctl_arrow = !NILP (BVAR (current_buffer, ctl_arrow)); + struct Lisp_Char_Table *dp = buffer_display_table (); if (PT == last_known_column_point && MODIFF == last_known_column_modified) @@ -512,9 +512,9 @@ scan_for_column (ptrdiff_t *endpos, EMACS_INT *goalcol, ptrdiff_t *prevcol) { int tab_width = SANE_TAB_WIDTH (current_buffer); - register int ctl_arrow = !NILP (BVAR (current_buffer, ctl_arrow)); - register struct Lisp_Char_Table *dp = buffer_display_table (); - int multibyte = !NILP (BVAR (current_buffer, enable_multibyte_characters)); + bool ctl_arrow = !NILP (BVAR (current_buffer, ctl_arrow)); + struct Lisp_Char_Table *dp = buffer_display_table (); + bool multibyte = !NILP (BVAR (current_buffer, enable_multibyte_characters)); struct composition_it cmp_it; Lisp_Object window; struct window *w; @@ -722,14 +722,14 @@ static double string_display_width (Lisp_Object string, Lisp_Object beg, Lisp_Object end) { - register int col; - register unsigned char *ptr, *stop; - register int tab_seen; + int col; + unsigned char *ptr, *stop; + bool tab_seen; int post_tab; - register int c; + int c; int tab_width = SANE_TAB_WIDTH (current_buffer); - int ctl_arrow = !NILP (current_buffer->ctl_arrow); - register struct Lisp_Char_Table *dp = buffer_display_table (); + bool ctl_arrow = !NILP (current_buffer->ctl_arrow); + struct Lisp_Char_Table *dp = buffer_display_table (); int b, e; if (NILP (end)) @@ -945,7 +945,7 @@ Blank lines are treated as if they had the same indentation as the preceding line. */ -int +bool indented_beyond_p (ptrdiff_t pos, ptrdiff_t pos_byte, EMACS_INT column) { ptrdiff_t val; @@ -1047,11 +1047,11 @@ can't hit the requested column exactly (because of a tab or other multi-column character), overshoot. - DID_MOTION is 1 if FROMHPOS has already accounted for overlay strings + DID_MOTION is true if FROMHPOS has already accounted for overlay strings at FROM. This is the case if FROMVPOS and FROMVPOS came from an earlier call to compute_motion. The other common case is that FROMHPOS is zero and FROM is a position that "belongs" at column zero, but might - be shifted by overlay strings; in this case DID_MOTION should be 0. + be shifted by overlay strings; in this case DID_MOTION should be false. WIDTH is the number of columns available to display text; compute_motion uses this to handle continuation lines and such. @@ -1104,17 +1104,20 @@ the scroll bars if they are turned on. */ struct position * -compute_motion (ptrdiff_t from, EMACS_INT fromvpos, EMACS_INT fromhpos, int did_motion, ptrdiff_t to, EMACS_INT tovpos, EMACS_INT tohpos, EMACS_INT width, ptrdiff_t hscroll, int tab_offset, struct window *win) +compute_motion (ptrdiff_t from, EMACS_INT fromvpos, EMACS_INT fromhpos, + bool did_motion, ptrdiff_t to, + EMACS_INT tovpos, EMACS_INT tohpos, EMACS_INT width, + ptrdiff_t hscroll, int tab_offset, struct window *win) { - register EMACS_INT hpos = fromhpos; - register EMACS_INT vpos = fromvpos; + EMACS_INT hpos = fromhpos; + EMACS_INT vpos = fromvpos; - register ptrdiff_t pos; + ptrdiff_t pos; ptrdiff_t pos_byte; - register int c = 0; + int c = 0; int tab_width = SANE_TAB_WIDTH (current_buffer); - register int ctl_arrow = !NILP (BVAR (current_buffer, ctl_arrow)); - register struct Lisp_Char_Table *dp = window_display_table (win); + bool ctl_arrow = !NILP (BVAR (current_buffer, ctl_arrow)); + struct Lisp_Char_Table *dp = window_display_table (win); EMACS_INT selective = (INTEGERP (BVAR (current_buffer, selective_display)) ? XINT (BVAR (current_buffer, selective_display)) @@ -1139,7 +1142,7 @@ ptrdiff_t next_width_run = from; Lisp_Object window; - int multibyte = !NILP (BVAR (current_buffer, enable_multibyte_characters)); + bool multibyte = !NILP (BVAR (current_buffer, enable_multibyte_characters)); /* If previous char scanned was a wide character, this is the column where it ended. Otherwise, this is 0. */ EMACS_INT wide_column_end_hpos = 0; @@ -1308,7 +1311,7 @@ if (hpos > width) { EMACS_INT total_width = width + continuation_glyph_width; - int truncate = 0; + bool truncate = 0; if (!NILP (Vtruncate_partial_width_windows) && (total_width < FRAME_COLS (XFRAME (WINDOW_FRAME (win))))) @@ -1827,7 +1830,7 @@ PTRDIFF_MAX) : !NILP (BVAR (current_buffer, selective_display)) ? -1 : 0); Lisp_Object window; - int did_motion; + bool did_motion; /* This is the object we use for fetching character properties. */ Lisp_Object text_prop_object; @@ -2017,8 +2020,8 @@ { ptrdiff_t it_start, it_overshoot_count = 0; int first_x; - int overshoot_handled = 0; - int disp_string_at_start_p = 0; + bool overshoot_handled = 0; + bool disp_string_at_start_p = 0; itdata = bidi_shelve_cache (); SET_TEXT_POS (pt, PT, PT_BYTE); === modified file 'src/indent.h' --- src/indent.h 2012-02-10 18:58:48 +0000 +++ src/indent.h 2012-09-24 21:38:23 +0000 @@ -27,7 +27,7 @@ }; struct position *compute_motion (ptrdiff_t from, EMACS_INT fromvpos, - EMACS_INT fromhpos, int did_motion, + EMACS_INT fromhpos, bool did_motion, ptrdiff_t to, EMACS_INT tovpos, EMACS_INT tohpos, EMACS_INT width, ptrdiff_t hscroll, @@ -45,8 +45,8 @@ /* Return true if the display table DISPTAB specifies the same widths for characters as WIDTHTAB. We use this to decide when to invalidate the buffer's column_cache. */ -int disptab_matches_widthtab (struct Lisp_Char_Table *disptab, - struct Lisp_Vector *widthtab); +bool disptab_matches_widthtab (struct Lisp_Char_Table *disptab, + struct Lisp_Vector *widthtab); /* Recompute BUF's width table, using the display table DISPTAB. */ void recompute_width_table (struct buffer *buf, === modified file 'src/lisp.h' --- src/lisp.h 2012-09-23 22:25:22 +0000 +++ src/lisp.h 2012-09-24 21:38:23 +0000 @@ -3257,7 +3257,7 @@ /* Defined in indent.c. */ extern ptrdiff_t current_column (void); extern void invalidate_current_column (void); -extern int indented_beyond_p (ptrdiff_t, ptrdiff_t, EMACS_INT); +extern bool indented_beyond_p (ptrdiff_t, ptrdiff_t, EMACS_INT); extern void syms_of_indent (void); /* Defined in frame.c. */ === modified file 'src/nsimage.m' --- src/nsimage.m 2012-09-15 07:06:56 +0000 +++ src/nsimage.m 2012-09-24 21:38:23 +0000 @@ -78,7 +78,7 @@ return [EmacsImage allocInitFromFile: file]; } -int +bool ns_load_image (struct frame *f, struct image *img, Lisp_Object spec_file, Lisp_Object spec_data) { === modified file 'src/nsterm.h' --- src/nsterm.h 2012-09-11 17:08:02 +0000 +++ src/nsterm.h 2012-09-24 21:38:23 +0000 @@ -749,11 +749,11 @@ extern void ns_set_name_as_filename (struct frame *f); extern void ns_set_doc_edited (struct frame *f, Lisp_Object arg); -extern int +extern bool ns_defined_color (struct frame *f, const char *name, - XColor *color_def, int alloc, - char makeIndex); + XColor *color_def, bool alloc, + bool makeIndex); extern void ns_query_color (void *col, XColor *color_def, int setPixel); @@ -799,8 +799,8 @@ extern void *ns_image_from_XBM (unsigned char *bits, int width, int height); extern void *ns_image_for_XPM (int width, int height, int depth); extern void *ns_image_from_file (Lisp_Object file); -extern int ns_load_image (struct frame *f, struct image *img, - Lisp_Object spec_file, Lisp_Object spec_data); +extern bool ns_load_image (struct frame *f, struct image *img, + Lisp_Object spec_file, Lisp_Object spec_data); extern int ns_image_width (void *img); extern int ns_image_height (void *img); extern unsigned long ns_get_pixel (void *img, int x, int y); === modified file 'src/nsterm.m' --- src/nsterm.m 2012-09-23 08:44:20 +0000 +++ src/nsterm.m 2012-09-24 21:38:23 +0000 @@ -1575,18 +1575,18 @@ } -int +bool ns_defined_color (struct frame *f, const char *name, XColor *color_def, - int alloc, - char makeIndex) + bool alloc, + bool makeIndex) /* -------------------------------------------------------------------------- - Return 1 if named color found, and set color_def rgb accordingly. + Return true if named color found, and set color_def rgb accordingly. If makeIndex and alloc are nonzero put the color in the color_table, and set color_def pixel to the resulting index. If makeIndex is zero, set color_def pixel to ARGB. - Return 0 if not found + Return false if not found -------------------------------------------------------------------------- */ { NSColor *col; === modified file 'src/xfaces.c' --- src/xfaces.c 2012-09-23 08:44:20 +0000 +++ src/xfaces.c 2012-09-24 21:38:23 +0000 @@ -991,7 +991,7 @@ non-zero, then the `standard' definition of the same color is returned in it. */ -static int +static bool tty_lookup_color (struct frame *f, Lisp_Object color, XColor *tty_color, XColor *std_color) { @@ -1052,11 +1052,11 @@ /* A version of defined_color for non-X frames. */ -static int +static bool tty_defined_color (struct frame *f, const char *color_name, - XColor *color_def, int alloc) + XColor *color_def, bool alloc) { - int status = 1; + bool status = 1; /* Defaults. */ color_def->pixel = FACE_TTY_DEFAULT_COLOR; @@ -1084,13 +1084,13 @@ /* Decide if color named COLOR_NAME is valid for the display associated with the frame F; if so, return the rgb values in - COLOR_DEF. If ALLOC is nonzero, allocate a new colormap cell. + COLOR_DEF. If ALLOC, allocate a new colormap cell. This does the right thing for any type of frame. */ -static int +static bool defined_color (struct frame *f, const char *color_name, XColor *color_def, - int alloc) + bool alloc) { if (!FRAME_WINDOW_P (f)) return tty_defined_color (f, color_name, color_def, alloc); === modified file 'src/xfns.c' --- src/xfns.c 2012-09-23 19:36:31 +0000 +++ src/xfns.c 2012-09-24 21:38:23 +0000 @@ -575,15 +575,15 @@ /* Decide if color named COLOR_NAME is valid for use on frame F. If - so, return the RGB values in COLOR. If ALLOC_P is non-zero, - allocate the color. Value is zero if COLOR_NAME is invalid, or + so, return the RGB values in COLOR. If ALLOC_P, + allocate the color. Value is false if COLOR_NAME is invalid, or no color could be allocated. */ -int +bool x_defined_color (struct frame *f, const char *color_name, - XColor *color, int alloc_p) + XColor *color, bool alloc_p) { - int success_p = 0; + bool success_p = 0; Display *dpy = FRAME_X_DISPLAY (f); Colormap cmap = FRAME_X_COLORMAP (f); @@ -592,7 +592,7 @@ success_p = xg_check_special_colors (f, color_name, color); #endif if (!success_p) - success_p = XParseColor (dpy, cmap, color_name, color); + success_p = XParseColor (dpy, cmap, color_name, color) != 0; if (success_p && alloc_p) success_p = x_alloc_nearest_color (f, cmap, color); unblock_input (); === modified file 'src/xterm.c' --- src/xterm.c 2012-09-23 19:36:31 +0000 +++ src/xterm.c 2012-09-24 21:38:23 +0000 @@ -287,7 +287,7 @@ /* Used in x_flush. */ -static int x_alloc_nearest_color_1 (Display *, Colormap, XColor *); +static bool x_alloc_nearest_color_1 (Display *, Colormap, XColor *); static void x_set_window_size_1 (struct frame *, int, int, int); static void x_raise_frame (struct frame *); static void x_lower_frame (struct frame *); @@ -899,8 +899,8 @@ static void x_set_cursor_gc (struct glyph_string *); static void x_set_mode_line_face_gc (struct glyph_string *); static void x_set_mouse_face_gc (struct glyph_string *); -static int x_alloc_lighter_color (struct frame *, Display *, Colormap, - unsigned long *, double, int); +static bool x_alloc_lighter_color (struct frame *, Display *, Colormap, + unsigned long *, double, int); static void x_setup_relief_color (struct frame *, struct relief *, double, int, unsigned long); static void x_setup_relief_colors (struct glyph_string *); @@ -1469,9 +1469,9 @@ If this produces the same color as PIXEL, try a color where all RGB values have DELTA added. Return the allocated color in *PIXEL. DISPLAY is the X display, CMAP is the colormap to operate on. - Value is non-zero if successful. */ + Value is true if successful. */ -int +bool x_alloc_lighter_color_for_widget (Widget widget, Display *display, Colormap cmap, unsigned long *pixel, double factor, int delta) { @@ -1696,15 +1696,15 @@ /* Allocate the color COLOR->pixel on DISPLAY, colormap CMAP. If an exact match can't be allocated, try the nearest color available. - Value is non-zero if successful. Set *COLOR to the color + Value is true if successful. Set *COLOR to the color allocated. */ -static int +static bool x_alloc_nearest_color_1 (Display *dpy, Colormap cmap, XColor *color) { - int rc; + bool rc; - rc = XAllocColor (dpy, cmap, color); + rc = XAllocColor (dpy, cmap, color) != 0; if (rc == 0) { /* If we got to this point, the colormap is full, so we're going @@ -1735,7 +1735,7 @@ color->red = cells[nearest].red; color->green = cells[nearest].green; color->blue = cells[nearest].blue; - rc = XAllocColor (dpy, cmap, color); + rc = XAllocColor (dpy, cmap, color) != 0; } else { @@ -1768,10 +1768,10 @@ /* Allocate the color COLOR->pixel on frame F, colormap CMAP. If an exact match can't be allocated, try the nearest color available. - Value is non-zero if successful. Set *COLOR to the color + Value is true if successful. Set *COLOR to the color allocated. */ -int +bool x_alloc_nearest_color (struct frame *f, Colormap cmap, XColor *color) { gamma_correct (f, color); @@ -1821,12 +1821,12 @@ DISPLAY is the X display, CMAP is the colormap to operate on. Value is non-zero if successful. */ -static int +static bool x_alloc_lighter_color (struct frame *f, Display *display, Colormap cmap, long unsigned int *pixel, double factor, int delta) { XColor color, new; long bright; - int success_p; + bool success_p; /* Get RGB color values. */ color.pixel = *pixel; === modified file 'src/xterm.h' --- src/xterm.h 2012-09-01 06:38:52 +0000 +++ src/xterm.h 2012-09-24 21:38:23 +0000 @@ -962,11 +962,11 @@ extern void x_activate_timeout_atimer (void); #endif #ifdef USE_LUCID -extern int x_alloc_lighter_color_for_widget (Widget, Display *, Colormap, - unsigned long *, - double, int); +extern bool x_alloc_lighter_color_for_widget (Widget, Display *, Colormap, + unsigned long *, + double, int); #endif -extern int x_alloc_nearest_color (struct frame *, Colormap, XColor *); +extern bool x_alloc_nearest_color (struct frame *, Colormap, XColor *); extern void x_query_color (struct frame *f, XColor *); extern void x_clear_area (Display *, Window, int, int, int, int, int); #if defined HAVE_MENUS && !defined USE_X_TOOLKIT && !defined USE_GTK @@ -1034,7 +1034,7 @@ extern void xic_set_xfontset (struct frame *, const char *); extern int x_pixel_width (struct frame *); extern int x_pixel_height (struct frame *); -extern int x_defined_color (struct frame *, const char *, XColor *, int); +extern bool x_defined_color (struct frame *, const char *, XColor *, bool); #ifdef HAVE_X_I18N extern void free_frame_xic (struct frame *); # if defined HAVE_X_WINDOWS && defined USE_X_TOOLKIT ------------------------------------------------------------ revno: 110184 committer: Glenn Morris branch nick: trunk timestamp: Mon 2012-09-24 14:38:14 -0400 message: Improve previous eshell change diff: === modified file 'lisp/eshell/esh-cmd.el' --- lisp/eshell/esh-cmd.el 2012-09-24 18:22:10 +0000 +++ lisp/eshell/esh-cmd.el 2012-09-24 18:38:14 +0000 @@ -1216,12 +1216,12 @@ (let* ((sym (intern-soft (concat "eshell/" name))) (file (symbol-file sym 'defun))) ;; If the function exists, but is defined in an eshell module - ;; that's not currently enabled, don't report it as found + ;; that's not currently enabled, don't report it as found. (if (and file - (string-match "\\(em\\|esh\\)-\\([[:alnum:]]+\\)\\(\\.elc?\\)?\\'" - file)) + (setq file (file-name-base file)) + (string-match "\\`\\(em\\|esh\\)-\\([[:alnum:]]+\\)\\'" file)) (let ((module-sym - (intern (file-name-base (concat "eshell-" (match-string 2 file)))))) + (intern (concat "eshell-" (match-string 2 file))))) (if (and (functionp sym) (or (null module-sym) (eshell-using-module module-sym) ------------------------------------------------------------ revno: 110183 committer: Glenn Morris branch nick: trunk timestamp: Mon 2012-09-24 14:22:10 -0400 message: * eshell/esh-cmd.el (eshell-find-alias-function): Tighten up file-name regexp. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-09-24 17:54:46 +0000 +++ lisp/ChangeLog 2012-09-24 18:22:10 +0000 @@ -1,3 +1,8 @@ +2012-09-24 Glenn Morris + + * eshell/esh-cmd.el (eshell-find-alias-function): + Tighten up file-name regexp. (Bug#12499) + 2012-09-24 Fabián Ezequiel Gallina Enhancements for triple-quote string syntax. === modified file 'lisp/eshell/esh-cmd.el' --- lisp/eshell/esh-cmd.el 2012-07-11 23:13:41 +0000 +++ lisp/eshell/esh-cmd.el 2012-09-24 18:22:10 +0000 @@ -1218,7 +1218,8 @@ ;; If the function exists, but is defined in an eshell module ;; that's not currently enabled, don't report it as found (if (and file - (string-match "\\(em\\|esh\\)-\\(.*\\)\\(\\.el\\)?\\'" file)) + (string-match "\\(em\\|esh\\)-\\([[:alnum:]]+\\)\\(\\.elc?\\)?\\'" + file)) (let ((module-sym (intern (file-name-base (concat "eshell-" (match-string 2 file)))))) (if (and (functionp sym) ------------------------------------------------------------ revno: 110182 committer: Fabián Ezequiel Gallina branch nick: trunk timestamp: Mon 2012-09-24 14:54:46 -0300 message: Enhancements for triple-quote string syntax. * progmodes/python.el (python-quote-syntax): Remove. (python-syntax-propertize-function): New value. (python-syntax-count-quotes, python-syntax-stringify): New functions. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-09-24 12:31:24 +0000 +++ lisp/ChangeLog 2012-09-24 17:54:46 +0000 @@ -1,3 +1,11 @@ +2012-09-24 Fabián Ezequiel Gallina + + Enhancements for triple-quote string syntax. + * progmodes/python.el (python-quote-syntax): Remove. + (python-syntax-propertize-function): New value. + (python-syntax-count-quotes, python-syntax-stringify): New + functions. + 2012-09-24 Chong Yidong * iswitchb.el (iswitchb-read-buffer): Move === modified file 'lisp/progmodes/python.el' --- lisp/progmodes/python.el 2012-09-23 18:21:33 +0000 +++ lisp/progmodes/python.el 2012-09-24 17:54:46 +0000 @@ -497,52 +497,68 @@ (1 font-lock-variable-name-face nil nil)))) (defconst python-syntax-propertize-function - ;; Make outer chars of matching triple-quote sequences into generic - ;; string delimiters. Fixme: Is there a better way? - ;; First avoid a sequence preceded by an odd number of backslashes. (syntax-propertize-rules - (;; ¡Backrefs don't work in syntax-propertize-rules! - (concat "\\(?:\\([RUru]\\)[Rr]?\\|^\\|[^\\]\\(?:\\\\.\\)*\\)" ;Prefix. - "\\(?:\\('\\)'\\('\\)\\|\\(?2:\"\\)\"\\(?3:\"\\)\\)") - (3 (ignore (python-quote-syntax)))))) - -(defun python-quote-syntax () - "Put `syntax-table' property correctly on triple quote. -Used for syntactic keywords. N is the match number (1, 2 or 3)." - ;; Given a triple quote, we have to check the context to know - ;; whether this is an opening or closing triple or whether it's - ;; quoted anyhow, and should be ignored. (For that we need to do - ;; the same job as `syntax-ppss' to be correct and it seems to be OK - ;; to use it here despite initial worries.) We also have to sort - ;; out a possible prefix -- well, we don't _have_ to, but I think it - ;; should be treated as part of the string. - - ;; Test cases: - ;; ur"""ar""" x='"' # """ - ;; x = ''' """ ' a - ;; ''' - ;; x '"""' x """ \"""" x - (save-excursion - (goto-char (match-beginning 0)) - (let ((syntax (save-match-data (syntax-ppss)))) - (cond - ((eq t (nth 3 syntax)) ; after unclosed fence - ;; Consider property for the last char if in a fenced string. - (goto-char (nth 8 syntax)) ; fence position - (skip-chars-forward "uUrR") ; skip any prefix - ;; Is it a matching sequence? - (if (eq (char-after) (char-after (match-beginning 2))) - (put-text-property (match-beginning 3) (match-end 3) - 'syntax-table (string-to-syntax "|")))) - ((match-end 1) - ;; Consider property for initial char, accounting for prefixes. - (put-text-property (match-beginning 1) (match-end 1) - 'syntax-table (string-to-syntax "|"))) - (t - ;; Consider property for initial char, accounting for prefixes. - (put-text-property (match-beginning 2) (match-end 2) - 'syntax-table (string-to-syntax "|")))) - ))) + ((rx + ;; Match even number of backslashes. + (or (not (any ?\\ ?\' ?\")) point) (* ?\\ ?\\) + ;; Match single or triple quotes of any kind. + (group (or "\"" "\"\"\"" "'" "'''"))) + (1 (ignore (python-syntax-stringify)))) + ((rx + ;; Match odd number of backslashes. + (or (not (any ?\\)) point) ?\\ (* ?\\ ?\\) + ;; Followed by even number of equal quotes. + (group (or "\"\"" "\"\"\"\"" "''" "''''"))) + (1 (ignore (python-syntax-stringify)))))) + +(defsubst python-syntax-count-quotes (quote-char &optional point limit) + "Count number of quotes around point (max is 3). +QUOTE-CHAR is the quote char to count. Optional argument POINT is +the point where scan starts (defaults to current point) and LIMIT +is used to limit the scan." + (let ((i 0)) + (while (and (< i 3) + (or (not limit) (< (+ point i) limit)) + (eq (char-after (+ point i)) quote-char)) + (incf i)) + i)) + +(defun python-syntax-stringify () + "Put `syntax-table' property correctly on single/triple quotes." + (let* ((num-quotes + (let ((n (length (match-string-no-properties 1)))) + ;; This corrects the quote count when matching odd number + ;; of backslashes followed by even number of quotes. + (or (and (= 1 (logand n 1)) n) (1- n)))) + (ppss (prog2 + (backward-char num-quotes) + (syntax-ppss) + (forward-char num-quotes))) + (string-start (and (not (nth 4 ppss)) (nth 8 ppss))) + (quote-starting-pos (- (point) num-quotes)) + (quote-ending-pos (point)) + (num-closing-quotes + (and string-start + (python-syntax-count-quotes + (char-before) string-start quote-starting-pos)))) + (cond ((and string-start (= num-closing-quotes 0)) + ;; This set of quotes doesn't match the string starting + ;; kind. Do nothing. + nil) + ((not string-start) + ;; This set of quotes delimit the start of a string. + (put-text-property quote-starting-pos (1+ quote-starting-pos) + 'syntax-table (string-to-syntax "|"))) + ((= num-quotes num-closing-quotes) + ;; This set of quotes delimit the end of a string. + (put-text-property (1- quote-ending-pos) quote-ending-pos + 'syntax-table (string-to-syntax "|"))) + ((> num-quotes num-closing-quotes) + ;; This may only happen whenever a triple quote is closing + ;; a single quoted string. Add string delimiter syntax to + ;; all three quotes. + (put-text-property quote-starting-pos quote-ending-pos + 'syntax-table (string-to-syntax "|")))))) (defvar python-mode-syntax-table (let ((table (make-syntax-table))) ------------------------------------------------------------ revno: 110181 committer: Glenn Morris branch nick: trunk timestamp: Mon 2012-09-24 09:36:42 -0700 message: Standardize some more license notices diff: === modified file 'lisp/emacs-lisp/package-x.el' --- lisp/emacs-lisp/package-x.el 2012-01-05 09:46:05 +0000 +++ lisp/emacs-lisp/package-x.el 2012-09-24 16:36:42 +0000 @@ -10,10 +10,10 @@ ;; This file is part of GNU Emacs. -;; GNU Emacs is free software; you can redistribute it and/or modify +;; GNU Emacs is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 3, or (at your option) -;; any later version. +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. ;; GNU Emacs is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -21,9 +21,7 @@ ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs; see the file COPYING. If not, write to the -;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;; Boston, MA 02110-1301, USA. +;; along with GNU Emacs. If not, see . ;;; Commentary: === modified file 'lisp/emacs-lisp/package.el' --- lisp/emacs-lisp/package.el 2012-06-13 07:33:38 +0000 +++ lisp/emacs-lisp/package.el 2012-09-24 16:36:42 +0000 @@ -9,10 +9,10 @@ ;; This file is part of GNU Emacs. -;; GNU Emacs is free software; you can redistribute it and/or modify +;; GNU Emacs is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 3, or (at your option) -;; any later version. +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. ;; GNU Emacs is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -20,9 +20,7 @@ ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs; see the file COPYING. If not, write to the -;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;; Boston, MA 02110-1301, USA. +;; along with GNU Emacs. If not, see . ;;; Change Log: === modified file 'lisp/emacs-lisp/tabulated-list.el' --- lisp/emacs-lisp/tabulated-list.el 2012-05-13 14:23:45 +0000 +++ lisp/emacs-lisp/tabulated-list.el 2012-09-24 16:36:42 +0000 @@ -7,10 +7,10 @@ ;; This file is part of GNU Emacs. -;; GNU Emacs is free software; you can redistribute it and/or modify +;; GNU Emacs is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 3, or (at your option) -;; any later version. +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. ;; GNU Emacs is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ------------------------------------------------------------ revno: 110180 committer: Glenn Morris branch nick: trunk timestamp: Mon 2012-09-24 08:58:20 -0700 message: Standardize some license notices diff: === modified file 'lisp/emacs-lisp/ert-x.el' --- lisp/emacs-lisp/ert-x.el 2012-04-16 19:21:32 +0000 +++ lisp/emacs-lisp/ert-x.el 2012-09-24 15:58:20 +0000 @@ -7,18 +7,18 @@ ;; This file is part of GNU Emacs. -;; This program is free software: you can redistribute it and/or -;; modify it under the terms of the GNU General Public License as -;; published by the Free Software Foundation, either version 3 of the -;; License, or (at your option) any later version. -;; -;; This program is distributed in the hope that it will be useful, but -;; WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -;; General Public License for more details. -;; +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + ;; You should have received a copy of the GNU General Public License -;; along with this program. If not, see `http://www.gnu.org/licenses/'. +;; along with GNU Emacs. If not, see . ;;; Commentary: === modified file 'lisp/emacs-lisp/ert.el' --- lisp/emacs-lisp/ert.el 2012-04-09 13:05:48 +0000 +++ lisp/emacs-lisp/ert.el 2012-09-24 15:58:20 +0000 @@ -7,18 +7,18 @@ ;; This file is part of GNU Emacs. -;; This program is free software: you can redistribute it and/or -;; modify it under the terms of the GNU General Public License as -;; published by the Free Software Foundation, either version 3 of the -;; License, or (at your option) any later version. -;; -;; This program is distributed in the hope that it will be useful, but -;; WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -;; General Public License for more details. -;; +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + ;; You should have received a copy of the GNU General Public License -;; along with this program. If not, see `http://www.gnu.org/licenses/'. +;; along with GNU Emacs. If not, see . ;;; Commentary: === modified file 'lisp/org/ob-fortran.el' --- lisp/org/ob-fortran.el 2012-04-01 20:27:06 +0000 +++ lisp/org/ob-fortran.el 2012-09-24 15:58:20 +0000 @@ -7,20 +7,20 @@ ;; Keywords: literate programming, reproducible research, fortran ;; Homepage: http://orgmode.org -;; This program is free software; you can redistribute it and/or modify +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 3, or (at your option) -;; any later version. -;; -;; This program is distributed in the hope that it will be useful, +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. -;; + ;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs; see the file COPYING. If not, write to the -;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;; Boston, MA 02110-1301, USA. +;; along with GNU Emacs. If not, see . ;;; Commentary: ------------------------------------------------------------ revno: 110179 committer: Chong Yidong branch nick: trunk timestamp: Mon 2012-09-24 20:31:24 +0800 message: Fix two references to deleted obsolete variables. Also, fix the copyright header for lisp/emacs-lisp/gv.el. * lisp/vc/log-edit.el (log-edit-require-final-newline) (log-edit-changelog-full-paragraphs): Default to t. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-09-24 12:23:25 +0000 +++ lisp/ChangeLog 2012-09-24 12:31:24 +0000 @@ -10,6 +10,8 @@ * vc/log-edit.el (cvs-changelog-full-paragraphs) (cvs-commit-buffer-require-final-newline): Remove. + (log-edit-require-final-newline) + (log-edit-changelog-full-paragraphs): Default to t. * vc/pcvs-defs.el (cvs-diff-buffer-name, cvs-diff-ignore-marks) * vc/vc-hooks.el (vc-ignore-vc-files, vc-master-templates) === modified file 'lisp/emacs-lisp/gv.el' --- lisp/emacs-lisp/gv.el 2012-08-29 15:11:51 +0000 +++ lisp/emacs-lisp/gv.el 2012-09-24 12:31:24 +0000 @@ -1,22 +1,25 @@ -;;; gv.el --- Generalized variables -*- lexical-binding: t -*- +;;; gv.el --- generalized variables -*- lexical-binding: t -*- ;; Copyright (C) 2012 Free Software Foundation, Inc. ;; Author: Stefan Monnier ;; Keywords: extensions - -;; This program is free software; you can redistribute it and/or modify +;; Package: emacs + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation, either version 3 of the License, or ;; (at your option) any later version. -;; This program is distributed in the hope that it will be useful, +;; GNU Emacs is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with this program. If not, see . +;; along with GNU Emacs. If not, see . ;;; Commentary: === modified file 'lisp/vc/log-edit.el' --- lisp/vc/log-edit.el 2012-09-24 12:23:25 +0000 +++ lisp/vc/log-edit.el 2012-09-24 12:31:24 +0000 @@ -104,8 +104,7 @@ :group 'log-edit :type 'boolean) -(defcustom log-edit-require-final-newline - cvs-commit-buffer-require-final-newline +(defcustom log-edit-require-final-newline t "Enforce a newline at the end of commit log messages. Enforce it silently if t, query if non-nil and don't do anything if nil." :group 'log-edit @@ -149,7 +148,7 @@ :group 'log-edit :version "24.1") -(defvar log-edit-changelog-full-paragraphs cvs-changelog-full-paragraphs +(defvar log-edit-changelog-full-paragraphs t "If non-nil, include full ChangeLog paragraphs in the log. This may be set in the ``local variables'' section of a ChangeLog, to indicate the policy for that ChangeLog. ------------------------------------------------------------ revno: 110178 committer: Chong Yidong branch nick: trunk timestamp: Mon 2012-09-24 20:23:25 +0800 message: Remove several obsolete vars and functions unlikely to be still in use. * lisp/vc/log-edit.el (cvs-changelog-full-paragraphs) (cvs-commit-buffer-require-final-newline): Obsolete variables removed. * lisp/font-lock.el (font-lock-reference-face): Use define-obsolete-variable-alias. * lisp/international/mule.el (set-char-table-default): Remove. (set-coding-priority, make-coding-system, generic-char-p) (charset-list, charset-bytes, charset-id): Use declare to mark obsolete. * lisp/mail/supercite.el (sc-version): Remove obsolete function. (sc-describe): Don't mark as obsolete, since it is bound. (sc-submit-bug-report): Remove. * lisp/progmodes/compile.el (compile-internal): Remove obsolete function. (compilation-parse-errors-function): Fix typo. * lisp/vc/emerge.el (emerge-mode): Make it an obsolete alias. (emerge-version): Remove. * lisp/vc/pcvs-defs.el (cvs-buffer-name-alist) (cvs-invert-ignore-marks): Remove references to obsolete vars. * lisp/vc/vc-hooks.el (vc-default-registered): Don't use vc-master-templates. * lisp/vc/pcvs-defs.el (cvs-diff-buffer-name, cvs-diff-ignore-marks) * lisp/vc/vc-hooks.el (vc-ignore-vc-files, vc-master-templates) * lisp/vc/vc.el (vc-checkout-carefully): Likewise. * src/chartab.c (Fset_char_table_default): Obsolete function removed. diff: === modified file 'etc/NEWS' --- etc/NEWS 2012-09-23 14:42:55 +0000 +++ etc/NEWS 2012-09-24 12:23:25 +0000 @@ -660,6 +660,18 @@ *** `facemenu-unlisted-faces' *** `rmail-decode-mime-charset' *** `last-input-char', `last-command-char', `unread-command-char'. +*** `iswitchb-read-buffer' +*** `sc-version', `sc-submit-bug-report' +*** `set-char-table-default' +*** `compile-internal' +*** `cvs-commit-buffer-require-final-newline' +(use `'log-edit-require-final-newline'instead) +*** `cvs-changelog-full-paragraphs' +(use `log-edit-changelog-full-paragraphs' instead) +*** `cvs-diff-ignore-marks', `cvs-diff-buffer-name' +*** `vc-ignore-vc-files' (use `vc-handled-backends' instead) +*** `vc-master-templates' (use `vc-handled-backends' instead) +*** `vc-checkout-carefully' * Lisp changes in Emacs 24.3 === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-09-24 11:39:33 +0000 +++ lisp/ChangeLog 2012-09-24 12:23:25 +0000 @@ -1,5 +1,36 @@ 2012-09-24 Chong Yidong + * 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. + + * vc/log-edit.el (cvs-changelog-full-paragraphs) + (cvs-commit-buffer-require-final-newline): Remove. + + * vc/pcvs-defs.el (cvs-diff-buffer-name, cvs-diff-ignore-marks) + * vc/vc-hooks.el (vc-ignore-vc-files, vc-master-templates) + * vc/vc.el (vc-checkout-carefully): Likewise. + + * vc/emerge.el (emerge-mode): Make it an obsolete alias. + (emerge-version): Remove. + + * progmodes/compile.el (compile-internal): Remove. + (compilation-parse-errors-function): Fix typo. + + * international/mule.el (set-char-table-default): Remove. + (set-coding-priority, make-coding-system, generic-char-p) + (charset-list, charset-bytes, charset-id): Use declare to mark + functions as obsolete. + + * vc/pcvs-defs.el (cvs-buffer-name-alist) + (cvs-invert-ignore-marks): Remove references to obsolete vars. + * vc/vc-hooks.el (vc-default-registered): Don't use + vc-master-templates. + * font-lock.el (font-lock-reference-face): Use define-obsolete-variable-alias. === modified file 'lisp/font-lock.el' --- lisp/font-lock.el 2012-09-17 05:41:04 +0000 +++ lisp/font-lock.el 2012-09-24 12:23:25 +0000 @@ -340,8 +340,8 @@ (defvar font-lock-preprocessor-face 'font-lock-preprocessor-face "Face name to use for preprocessor directives.") -(defvar font-lock-reference-face 'font-lock-constant-face) -(make-obsolete-variable 'font-lock-reference-face 'font-lock-constant-face "20.3") +(define-obsolete-variable-alias + 'font-lock-reference-face 'font-lock-constant-face "20.3") ;; Fontification variables: === modified file 'lisp/international/mule.el' --- lisp/international/mule.el 2012-05-07 21:45:34 +0000 +++ lisp/international/mule.el 2012-09-24 12:23:25 +0000 @@ -409,13 +409,13 @@ (defun charset-id (charset) "Always return 0. This is provided for backward compatibility." + (declare (obsolete nil "23.1")) 0) -(make-obsolete 'charset-id "do not use it." "23.1") (defmacro charset-bytes (charset) "Always return 0. This is provided for backward compatibility." + (declare (obsolete nil "23.1")) 0) -(make-obsolete 'charset-bytes "do not use it." "23.1") (defun get-charset-property (charset propname) "Return the value of CHARSET's PROPNAME property. @@ -464,8 +464,8 @@ (defun charset-list () "Return list of all charsets ever defined." + (declare (obsolete charset-list "23.1")) charset-list) -(make-obsolete 'charset-list "use variable `charset-list'." "23.1") ;;; CHARACTER @@ -473,8 +473,8 @@ (defun generic-char-p (char) "Always return nil. This is provided for backward compatibility." + (declare (obsolete nil "23.1")) nil) -(make-obsolete 'generic-char-p "generic characters no longer exist." "23.1") (defun make-char-internal (charset-id &optional code1 code2) (let ((charset (aref emacs-mule-charset-table charset-id))) @@ -1012,6 +1012,7 @@ eol-type) "Define a new coding system CODING-SYSTEM (symbol). This function is provided for backward compatibility." + (declare (obsolete define-coding-system "23.1")) ;; For compatibility with XEmacs, we check the type of TYPE. If it ;; is a symbol, perhaps, this function is called with XEmacs-style ;; arguments. Here, try to transform that kind of arguments to @@ -1104,8 +1105,6 @@ (apply 'define-coding-system coding-system doc-string properties)) -(make-obsolete 'make-coding-system 'define-coding-system "23.1") - (defun merge-coding-systems (first second) "Fill in any unspecified aspects of coding system FIRST from SECOND. Return the resulting coding system." @@ -1449,9 +1448,9 @@ ARG is a list of coding categories ordered by priority. This function is provided for backward compatibility." + (declare (obsolete set-coding-system-priority "23.1")) (apply 'set-coding-system-priority (mapcar #'(lambda (x) (symbol-value x)) arg))) -(make-obsolete 'set-coding-priority 'set-coding-system-priority "23.1") ;;; X selections @@ -2356,9 +2355,6 @@ (setq ignore-relative-composition (make-char-table 'ignore-relative-composition)) -(make-obsolete 'set-char-table-default - "generic characters no longer exist." "23.1") - ;;; Built-in auto-coding-functions: (defun sgml-xml-auto-coding-function (size) === modified file 'lisp/mail/supercite.el' --- lisp/mail/supercite.el 2012-02-08 02:12:24 +0000 +++ lisp/mail/supercite.el 2012-09-24 12:23:25 +0000 @@ -506,8 +506,6 @@ ;; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ;; end user configuration variables -(define-obsolete-variable-alias 'sc-version 'emacs-version "23.1") - (defvar sc-mail-info nil "Alist of mail header information gleaned from reply buffer.") (defvar sc-attributions nil @@ -559,10 +557,8 @@ (define-key map "r" 'sc-recite-region) (define-key map "\C-p" 'sc-raw-mode-toggle) (define-key map "u" 'sc-uncite-region) - (define-key map "v" 'sc-version) (define-key map "w" 'sc-insert-reference) (define-key map "\C-t" sc-T-keymap) - (define-key map "\C-b" 'sc-submit-bug-report) (define-key map "?" 'sc-describe) map) "Keymap for Supercite quasi-mode.") @@ -1969,29 +1965,11 @@ (insert (sc-mail-field "sc-citation")) (error "Line is already cited")))) -;; The argument logic here is crazy. -(defun sc-version (message) - "Return the current Supercite version. -If MESSAGE is non-nil (interactively, with no prefix argument), -echoes the version in the minibuffer. Otherwise, inserts the -version at point." - (interactive (list (not current-prefix-arg))) - (let ((verstr (format "Using Supercite.el %s" emacs-version))) - (if message - (message verstr) - (insert "`sc-version' says: " verstr)))) - -(make-obsolete 'sc-version 'emacs-version "23.1") - (defun sc-describe () "Read the Supercite info node." (interactive) (info "(SC)top")) -(make-obsolete 'sc-describe "read the SC manual using `info'." "23.1") - -(define-obsolete-function-alias 'sc-submit-bug-report 'report-emacs-bug "23.1") - ;; useful stuff (provide 'supercite) === modified file 'lisp/progmodes/compile.el' --- lisp/progmodes/compile.el 2012-09-18 04:18:36 +0000 +++ lisp/progmodes/compile.el 2012-09-24 12:23:25 +0000 @@ -748,12 +748,10 @@ (defvar compilation-leave-directory-face 'font-lock-builtin-face "Face name to use for leaving directory messages.") - - ;; Used for compatibility with the old compile.el. (defvar compilation-parse-errors-function nil) -(make-obsolete 'compilation-parse-errors-function - 'compilation-error-regexp-alist "24.1") +(make-obsolete-variable 'compilation-parse-errors-function + 'compilation-error-regexp-alist "24.1") (defcustom compilation-auto-jump-to-first-error nil "If non-nil, automatically jump to the first error during compilation." @@ -1499,24 +1497,6 @@ (t (concat "*" (downcase name-of-mode) "*")))) -;; This is a rough emulation of the old hack, until the transition to new -;; compile is complete. -(defun compile-internal (command error-message - &optional _name-of-mode parser - error-regexp-alist name-function - _enter-regexp-alist _leave-regexp-alist - file-regexp-alist _nomessage-regexp-alist - _no-async highlight-regexp _local-map) - (if parser - (error "Compile now works very differently, see `compilation-error-regexp-alist'")) - (let ((compilation-error-regexp-alist - (append file-regexp-alist (or error-regexp-alist - compilation-error-regexp-alist))) - (compilation-error (replace-regexp-in-string "^No more \\(.+\\)s\\.?" - "\\1" error-message))) - (compilation-start command nil name-function highlight-regexp))) -(make-obsolete 'compile-internal 'compilation-start "22.1") - (defcustom compilation-always-kill nil "If t, always kill a running compilation process before starting a new one. If nil, ask to kill it." === modified file 'lisp/vc/emerge.el' --- lisp/vc/emerge.el 2012-04-09 13:05:48 +0000 +++ lisp/vc/emerge.el 2012-09-24 12:23:25 +0000 @@ -76,18 +76,6 @@ Commands must be prefixed by \\\\[emerge-basic-keymap] in `edit' mode, but can be invoked directly in `fast' mode.") -(define-obsolete-variable-alias 'emerge-version 'emacs-version "23.2") - -(defun emerge-version () - "Return string describing the version of Emerge. -When called interactively, displays the version." - (interactive) - (if (called-interactively-p 'interactive) - (message "Emerge version %s" emacs-version) - emacs-version)) - -(make-obsolete 'emerge-version 'emacs-version "23.2") - ;;; Emerge configuration variables (defgroup emerge nil === modified file 'lisp/vc/log-edit.el' --- lisp/vc/log-edit.el 2012-08-28 16:01:59 +0000 +++ lisp/vc/log-edit.el 2012-09-24 12:23:25 +0000 @@ -104,11 +104,6 @@ :group 'log-edit :type 'boolean) -(defvar cvs-commit-buffer-require-final-newline t) -(make-obsolete-variable 'cvs-commit-buffer-require-final-newline - 'log-edit-require-final-newline - "21.1") - (defcustom log-edit-require-final-newline cvs-commit-buffer-require-final-newline "Enforce a newline at the end of commit log messages. @@ -154,11 +149,6 @@ :group 'log-edit :version "24.1") -(defvar cvs-changelog-full-paragraphs t) -(make-obsolete-variable 'cvs-changelog-full-paragraphs - 'log-edit-changelog-full-paragraphs - "21.1") - (defvar log-edit-changelog-full-paragraphs cvs-changelog-full-paragraphs "If non-nil, include full ChangeLog paragraphs in the log. This may be set in the ``local variables'' section of a ChangeLog, to === modified file 'lisp/vc/pcvs-defs.el' --- lisp/vc/pcvs-defs.el 2012-09-17 05:41:04 +0000 +++ lisp/vc/pcvs-defs.el 2012-09-24 12:23:25 +0000 @@ -133,14 +133,9 @@ :group 'pcl-cvs :type '(boolean)) -(defvar cvs-diff-ignore-marks t) -(make-obsolete-variable 'cvs-diff-ignore-marks - 'cvs-invert-ignore-marks - "21.1") - (defcustom cvs-invert-ignore-marks (let ((l ())) - (unless (equal cvs-diff-ignore-marks cvs-default-ignore-marks) + (unless (equal cvs-default-ignore-marks t) (push "diff" l)) (when (and cvs-force-dir-tag (not cvs-default-ignore-marks)) (push "tag" l)) @@ -171,11 +166,6 @@ :type '(choice (const :tag "Prompt" nil) (string))) -(defvar cvs-diff-buffer-name "*cvs-diff*") -(make-obsolete-variable 'cvs-diff-buffer-name - 'cvs-buffer-name-alist - "21.1") - (defcustom cvs-find-file-and-jump nil "Jump to the modified area when finding a file. If non-nil, `cvs-mode-find-file' will place the cursor at the beginning of @@ -185,7 +175,7 @@ :type '(boolean)) (defcustom cvs-buffer-name-alist - '(("diff" cvs-diff-buffer-name diff-mode) + '(("diff" "*cvs-diff*" diff-mode) ("status" "*cvs-info*" cvs-status-mode) ("tree" "*cvs-info*" cvs-status-mode) ("message" "*cvs-commit*" nil log-edit) === modified file 'lisp/vc/vc-hooks.el' --- lisp/vc/vc-hooks.el 2012-07-11 23:13:41 +0000 +++ lisp/vc/vc-hooks.el 2012-09-24 12:23:25 +0000 @@ -34,18 +34,6 @@ ;; Customization Variables (the rest is in vc.el) -(defvar vc-ignore-vc-files nil) -(make-obsolete-variable 'vc-ignore-vc-files - "set `vc-handled-backends' to nil to disable VC." - "21.1") - -(defvar vc-master-templates ()) -(make-obsolete-variable 'vc-master-templates - "to define master templates for a given BACKEND, use -vc-BACKEND-master-templates. To enable or disable VC for a given -BACKEND, use `vc-handled-backends'." - "21.1") - (defcustom vc-ignore-dir-regexp ;; Stop SMB, automounter, AFS, and DFS host lookups. locate-dominating-stop-dir-regexp @@ -586,16 +574,7 @@ "Check if FILE is registered in BACKEND using vc-BACKEND-master-templates." (let ((sym (vc-make-backend-sym backend 'master-templates))) (unless (get backend 'vc-templates-grabbed) - (put backend 'vc-templates-grabbed t) - (set sym (append (delq nil - (mapcar - (lambda (template) - (and (consp template) - (eq (cdr template) backend) - (car template))) - (with-no-warnings - vc-master-templates))) - (symbol-value sym)))) + (put backend 'vc-templates-grabbed t)) (let ((result (vc-check-master-templates file (symbol-value sym)))) (if (stringp result) (vc-file-setprop file 'vc-name result) === modified file 'lisp/vc/vc.el' --- lisp/vc/vc.el 2012-09-13 18:23:33 +0000 +++ lisp/vc/vc.el 2012-09-24 12:23:25 +0000 @@ -808,16 +808,6 @@ (string :tag "Comment End"))) :group 'vc) -(defcustom vc-checkout-carefully (= (user-uid) 0) - "Non-nil means be extra-careful in checkout. -Verify that the file really is not locked -and that its contents match what the repository version says." - :type 'boolean - :group 'vc) -(make-obsolete-variable 'vc-checkout-carefully - "the corresponding checks are always done now." - "21.1") - ;; Variables users don't need to see === modified file 'src/ChangeLog' --- src/ChangeLog 2012-09-23 22:25:22 +0000 +++ src/ChangeLog 2012-09-24 12:23:25 +0000 @@ -1,3 +1,7 @@ +2012-09-24 Chong Yidong + + * chartab.c (Fset_char_table_default): Obsolete function removed. + 2012-09-23 Paul Eggert Move pid_t related decls out of lisp.h. === modified file 'src/chartab.c' --- src/chartab.c 2012-09-15 07:06:56 +0000 +++ src/chartab.c 2012-09-24 12:23:25 +0000 @@ -655,15 +655,6 @@ return value; } -DEFUN ("set-char-table-default", Fset_char_table_default, - Sset_char_table_default, 3, 3, 0, - doc: /* -This function is obsolete and has no effect. */) - (Lisp_Object char_table, Lisp_Object ch, Lisp_Object value) -{ - return Qnil; -} - /* Look up the element in TABLE at index CH, and return it as an integer. If the element is not a character, return CH itself. */ @@ -1415,7 +1406,6 @@ defsubr (&Sset_char_table_extra_slot); defsubr (&Schar_table_range); defsubr (&Sset_char_table_range); - defsubr (&Sset_char_table_default); defsubr (&Soptimize_char_table); defsubr (&Smap_char_table); defsubr (&Sunicode_property_table_internal); ------------------------------------------------------------ revno: 110177 committer: Chong Yidong branch nick: trunk timestamp: Mon 2012-09-24 19:39:33 +0800 message: Fix uses of long-obsolete font-lock-reference face. * generic-x.el (rul-generic-mode): Use font-lock-constant-face. * calendar/calendar.el (calendar-font-lock-keywords): * calendar/diary-lib.el (diary-font-lock-keywords) (diary-fancy-font-lock-keywords): * textmodes/reftex-sel.el (reftex-insert-docstruct): * textmodes/reftex-index.el (reftex-insert-index): * textmodes/reftex-cite.el (reftex-format-bib-entry): * progmodes/ruby-mode.el (ruby-font-lock-keywords): * progmodes/ps-mode.el (ps-mode-font-lock-keywords-1): * progmodes/prolog.el (prolog-font-lock-keywords): * progmodes/idlwave.el (idlwave-idl-keywords): * progmodes/ada-mode.el (ada-font-lock-keywords): * net/snmp-mode.el (snmp-font-lock-keywords-3): Likewise. * font-lock.el (font-lock-reference-face): Use define-obsolete-variable-alias. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-09-24 00:46:47 +0000 +++ lisp/ChangeLog 2012-09-24 11:39:33 +0000 @@ -1,3 +1,22 @@ +2012-09-24 Chong Yidong + + * font-lock.el (font-lock-reference-face): Use + define-obsolete-variable-alias. + + * generic-x.el (rul-generic-mode): Use font-lock-constant-face. + * calendar/calendar.el (calendar-font-lock-keywords): + * calendar/diary-lib.el (diary-font-lock-keywords) + (diary-fancy-font-lock-keywords): + * textmodes/reftex-sel.el (reftex-insert-docstruct): + * textmodes/reftex-index.el (reftex-insert-index): + * textmodes/reftex-cite.el (reftex-format-bib-entry): + * progmodes/ruby-mode.el (ruby-font-lock-keywords): + * progmodes/ps-mode.el (ps-mode-font-lock-keywords-1): + * progmodes/prolog.el (prolog-font-lock-keywords): + * progmodes/idlwave.el (idlwave-idl-keywords): + * progmodes/ada-mode.el (ada-font-lock-keywords): + * net/snmp-mode.el (snmp-font-lock-keywords-3): Likewise. + 2012-09-24 Glenn Morris * mail/emacsbug.el (report-emacs-bug): Include `lsb_release -d'. === modified file 'lisp/calendar/calendar.el' --- lisp/calendar/calendar.el 2012-09-19 07:27:29 +0000 +++ lisp/calendar/calendar.el 2012-09-24 11:39:33 +0000 @@ -2298,7 +2298,7 @@ ;; First two chars of each day are used in the calendar. (,(regexp-opt (mapcar (lambda (x) (substring x 0 calendar-day-header-width)) calendar-day-name-array)) - . font-lock-reference-face)) + . font-lock-constant-face)) "Default keywords to highlight in Calendar mode.") (defun calendar-day-name (date &optional abbrev absolute) === modified file 'lisp/calendar/diary-lib.el' --- lisp/calendar/diary-lib.el 2012-09-17 05:41:04 +0000 +++ lisp/calendar/diary-lib.el 2012-09-24 11:39:33 +0000 @@ -2400,10 +2400,10 @@ (cons (format "^%s?\\(%s\\)" (regexp-quote diary-nonmarking-symbol) (regexp-quote diary-sexp-entry-symbol)) - '(1 font-lock-reference-face)) + '(1 font-lock-constant-face)) (cons (format "^%s" (regexp-quote diary-nonmarking-symbol)) - 'font-lock-reference-face) + 'font-lock-constant-face) (cons (format "^%s?%s" (regexp-quote diary-nonmarking-symbol) (regexp-opt (mapcar 'regexp-quote @@ -2411,7 +2411,7 @@ diary-islamic-entry-symbol diary-bahai-entry-symbol)) t)) - '(1 font-lock-reference-face)) + '(1 font-lock-constant-face)) '(diary-font-lock-sexps . font-lock-keyword-face) ;; Don't need to worry about space around "-" because the first ;; match takes care of that. It does mean the "-" itself may or @@ -2482,7 +2482,7 @@ (defvar diary-fancy-font-lock-keywords `((diary-fancy-date-matcher . diary-face) ("^.*\\([aA]nniversary\\|[bB]irthday\\).*$" . 'diary-anniversary) - ("^.*Yahrzeit.*$" . font-lock-reference-face) + ("^.*Yahrzeit.*$" . font-lock-constant-face) ("^\\(Erev \\)?Rosh Hodesh.*" . font-lock-function-name-face) ("^Day.*omer.*$" . font-lock-builtin-face) ("^Parashat.*$" . font-lock-comment-face) === modified file 'lisp/generic-x.el' --- lisp/generic-x.el 2012-09-17 05:41:04 +0000 +++ lisp/generic-x.el 2012-09-24 11:39:33 +0000 @@ -1531,15 +1531,15 @@ '("#[ \t]*include[ \t]+\\(<[^>\"\n]+>\\)" 1 font-lock-string-face) '("#[ \t]*\\(\\sw+\\)\\>[ \t]*\\(\\sw+\\)?" - (1 font-lock-reference-face) + (1 font-lock-constant-face) (2 font-lock-variable-name-face nil t)) ;; indirect string constants '("\\(@[A-Za-z][A-Za-z0-9_]+\\)" 1 font-lock-builtin-face) ;; gotos - '("[ \t]*\\(\\sw+:\\)" 1 font-lock-reference-face) + '("[ \t]*\\(\\sw+:\\)" 1 font-lock-constant-face) '("\\<\\(goto\\)\\>[ \t]*\\(\\sw+\\)?" (1 font-lock-keyword-face) - (2 font-lock-reference-face nil t)) + (2 font-lock-constant-face nil t)) ;; system variables (generic-make-keywords-list installshield-system-variables-list === modified file 'lisp/progmodes/ada-mode.el' --- lisp/progmodes/ada-mode.el 2012-06-02 10:56:09 +0000 +++ lisp/progmodes/ada-mode.el 2012-09-24 11:39:33 +0000 @@ -5218,11 +5218,11 @@ ;; correctly highlight a with_clause that spans multiple lines. (list (concat "\\<\\(goto\\|raise\\|use\\|with\\)" "[ \t]+\\([a-zA-Z0-9_., \t]+\\)\\W") - '(1 font-lock-keyword-face) '(2 font-lock-reference-face nil t)) + '(1 font-lock-keyword-face) '(2 font-lock-constant-face nil t)) ;; ;; Goto tags. - '("<<\\(\\sw+\\)>>" 1 font-lock-reference-face) + '("<<\\(\\sw+\\)>>" 1 font-lock-constant-face) ;; Highlight based-numbers (R. Reagan ) (list "\\([0-9]+#[0-9a-fA-F_]+#\\)" '(1 font-lock-constant-face t)) === modified file 'lisp/progmodes/idlwave.el' --- lisp/progmodes/idlwave.el 2012-09-17 05:41:04 +0000 +++ lisp/progmodes/idlwave.el 2012-09-24 11:39:33 +0000 @@ -1151,7 +1151,7 @@ (common-blocks '("\\<\\(common\\)\\>[ \t]*\\(\\sw+\\)?[ \t]*,?" (1 font-lock-keyword-face) ; "common" - (2 font-lock-reference-face nil t) ; block name + (2 font-lock-constant-face nil t) ; block name ("[ \t]*\\(\\sw+\\)[ ,]*" ;; Start with point after block name and comma (goto-char (match-end 0)) ; needed for XEmacs, could be nil @@ -1169,20 +1169,20 @@ ;; Labels (label - '("^[ \t]*\\([a-zA-Z]\\sw*:\\)" (1 font-lock-reference-face))) + '("^[ \t]*\\([a-zA-Z]\\sw*:\\)" (1 font-lock-constant-face))) ;; The goto statement and its label (goto '("\\(goto\\)[ \t]*,[ \t]*\\([a-zA-Z]\\sw*\\)" (1 font-lock-keyword-face) - (2 font-lock-reference-face))) + (2 font-lock-constant-face))) ;; Tags in structure definitions. Note that this definition ;; actually collides with labels, so we have to use the same ;; face. It also matches named subscript ranges, ;; e.g. vec{bottom:top]. No good way around this. (structtag - '("\\<\\([a-zA-Z][a-zA-Z0-9_]*:\\)[^:]" (1 font-lock-reference-face))) + '("\\<\\([a-zA-Z][a-zA-Z0-9_]*:\\)[^:]" (1 font-lock-constant-face))) ;; Structure names (structname @@ -1195,7 +1195,7 @@ ;; fontification. Slow, use it only in fancy fontification. (keyword-parameters '("\\(,\\|[a-zA-Z0-9_](\\)[ \t]*\\(\\$[ \t]*\\(;.*\\)?\n\\([ \t]*\\(;.*\\)?\n\\)*[ \t]*\\)?\\(/[a-zA-Z_]\\sw*\\|[a-zA-Z_]\\sw*[ \t]*=\\)" - (6 font-lock-reference-face))) + (6 font-lock-constant-face))) ;; System variables start with a bang. (system-variables === modified file 'lisp/progmodes/prolog.el' --- lisp/progmodes/prolog.el 2012-09-17 05:41:04 +0000 +++ lisp/progmodes/prolog.el 2012-09-24 11:39:33 +0000 @@ -2110,7 +2110,7 @@ (if (eq prolog-system 'mercury) (list (prolog-make-keywords-regexp prolog-mode-specificators-i t) - 0 'font-lock-reference-face))) + 0 'font-lock-constant-face))) (directives (if (eq prolog-system 'mercury) (list === modified file 'lisp/progmodes/ps-mode.el' --- lisp/progmodes/ps-mode.el 2012-04-09 13:05:48 +0000 +++ lisp/progmodes/ps-mode.el 2012-09-24 11:39:33 +0000 @@ -213,9 +213,9 @@ ;; - 8bit characters (warning face) ;; Multiline strings are not supported. Strings with nested brackets are. (defconst ps-mode-font-lock-keywords-1 - '(("\\`%!PS.*" . font-lock-reference-face) + '(("\\`%!PS.*" . font-lock-constant-face) ("^%%BoundingBox:[ \t]+-?[0-9]+[ \t]+-?[0-9]+[ \t]+-?[0-9]+[ \t]+-?[0-9]+[ \t]*$" - . font-lock-reference-face) + . font-lock-constant-face) (ps-mode-match-string-or-comment (1 font-lock-comment-face nil t) (2 font-lock-string-face nil t)) === modified file 'lisp/progmodes/ruby-mode.el' --- lisp/progmodes/ruby-mode.el 2012-09-18 22:10:19 +0000 +++ lisp/progmodes/ruby-mode.el 2012-09-24 11:39:33 +0000 @@ -1567,7 +1567,7 @@ 2 font-lock-variable-name-face) ;; symbols '("\\(^\\|[^:]\\)\\(:\\([-+~]@?\\|[/%&|^`]\\|\\*\\*?\\|<\\(<\\|=>?\\)?\\|>[>=]?\\|===?\\|=~\\|![~=]?\\|\\[\\]=?\\|@?\\(\\w\\|_\\)+\\([!?=]\\|\\b_*\\)\\|#{[^}\n\\\\]*\\(\\\\.[^}\n\\\\]*\\)*}\\)\\)" - 2 font-lock-reference-face) + 2 font-lock-constant-face) ;; variables '("\\(\\$\\([^a-zA-Z0-9 \n]\\|[0-9]\\)\\)\\W" 1 font-lock-variable-name-face) @@ -1576,7 +1576,7 @@ ;; constants '("\\(^\\|[^_]\\)\\b\\([A-Z]+\\(\\w\\|_\\)*\\)" 2 font-lock-type-face) - '("\\(^\\s *\\|[\[\{\(,]\\s *\\|\\sw\\s +\\)\\(\\(\\sw\\|_\\)+\\):[^:]" 2 font-lock-reference-face) + '("\\(^\\s *\\|[\[\{\(,]\\s *\\|\\sw\\s +\\)\\(\\(\\sw\\|_\\)+\\):[^:]" 2 font-lock-constant-face) ;; expression expansion '(ruby-match-expression-expansion 0 font-lock-variable-name-face t) === modified file 'lisp/textmodes/reftex-cite.el' --- lisp/textmodes/reftex-cite.el 2012-01-19 07:21:25 +0000 +++ lisp/textmodes/reftex-cite.el 2012-09-24 11:39:33 +0000 @@ -542,10 +542,7 @@ (t "")))) (setq authors (reftex-truncate authors 30 t t)) (when (reftex-use-fonts) - (put-text-property 0 (length key) 'face - (reftex-verified-face reftex-label-face - 'font-lock-constant-face - 'font-lock-reference-face) + (put-text-property 0 (length key) 'face reftex-label-face key) (put-text-property 0 (length authors) 'face reftex-bib-author-face authors) === modified file 'lisp/textmodes/reftex-index.el' --- lisp/textmodes/reftex-index.el 2012-05-13 03:05:06 +0000 +++ lisp/textmodes/reftex-index.el 2012-09-24 11:39:33 +0000 @@ -585,9 +585,7 @@ (if (memq reftex-highlight-selection '(mouse both)) reftex-mouse-selected-face nil)) - (index-face (reftex-verified-face reftex-label-face - 'font-lock-constant-face - 'font-lock-reference-face)) + (index-face reftex-label-face) sublist cell from to first-char) ;; Make the sublist and sort it === modified file 'lisp/textmodes/reftex-sel.el' --- lisp/textmodes/reftex-sel.el 2012-05-13 03:05:06 +0000 +++ lisp/textmodes/reftex-sel.el 2012-09-24 11:39:33 +0000 @@ -245,12 +245,8 @@ (if (memq reftex-highlight-selection '(mouse both)) reftex-mouse-selected-face nil)) - (label-face (reftex-verified-face reftex-label-face - 'font-lock-constant-face - 'font-lock-reference-face)) - (index-face (reftex-verified-face reftex-index-face - 'font-lock-constant-face - 'font-lock-reference-face)) + (label-face reftex-label-face) + (index-face reftex-index-face) all cell text label typekey note comment master-dir-re prev-inserted offset from to index-tag docstruct-symbol) === modified file 'lisp/textmodes/reftex.el' --- lisp/textmodes/reftex.el 2012-09-17 05:41:04 +0000 +++ lisp/textmodes/reftex.el 2012-09-24 11:39:33 +0000 @@ -2311,9 +2311,7 @@ ;; Return the first valid face in FACES, or nil if none is valid. ;; Also, when finding a nil element in FACES, return nil. This ;; function is just a safety net to catch name changes of builtin - ;; fonts. Currently it is only used for reftex-label-face, which has - ;; as default font-lock-reference-face, which was recently renamed - ;; to font-lock-constant-face. + ;; fonts. Currently it is only used for reftex-label-face. (let (face) (catch 'exit (while (setq face (pop faces)) ------------------------------------------------------------ revno: 110176 committer: Glenn Morris branch nick: trunk timestamp: Mon 2012-09-24 06:20:50 -0400 message: Auto-commit of loaddefs files. diff: === modified file 'lisp/ibuffer.el' --- lisp/ibuffer.el 2012-09-23 10:21:34 +0000 +++ lisp/ibuffer.el 2012-09-24 10:20:50 +0000 @@ -2641,7 +2641,7 @@ ;;;;;; ibuffer-backward-filter-group ibuffer-forward-filter-group ;;;;;; ibuffer-toggle-filter-group ibuffer-mouse-toggle-filter-group ;;;;;; ibuffer-interactive-filter-by-mode ibuffer-mouse-filter-by-mode -;;;;;; ibuffer-auto-mode) "ibuf-ext" "ibuf-ext.el" "c255d1ebe80ccabd8385f40bdd0b5451") +;;;;;; ibuffer-auto-mode) "ibuf-ext" "ibuf-ext.el" "f03bae226325c7320d41ddb78896665a") ;;; Generated autoloads from ibuf-ext.el (autoload 'ibuffer-auto-mode "ibuf-ext" "\ ------------------------------------------------------------ revno: 110175 committer: Glenn Morris branch nick: trunk timestamp: Sun 2012-09-23 23:31:02 -0700 message: Tweak previous change diff: === modified file 'lisp/mail/emacsbug.el' --- lisp/mail/emacsbug.el 2012-09-24 00:46:47 +0000 +++ lisp/mail/emacsbug.el 2012-09-24 06:31:02 +0000 @@ -254,7 +254,7 @@ nil "-d"))) (buffer-string))))) (if (stringp lsb) - (insert "LSB Release " lsb "\n"))) + (insert "System " lsb "\n"))) (when (and system-configuration-options (not (equal system-configuration-options ""))) (insert "Configured using:\n `configure "