diff options
author | Chong Yidong <cyd@stupidchicken.com> | 2010-10-31 10:40:01 -0400 |
---|---|---|
committer | Chong Yidong <cyd@stupidchicken.com> | 2010-10-31 10:40:01 -0400 |
commit | 2699a55464f7b43171c7b0e64d095640904e9e21 (patch) | |
tree | d99ebc74b0a108dac964f0fbcd9f9d3592ac5c6f /lisp | |
parent | e6ef5dd9ce13d346c7bbdcd6794b29045b4e0e63 (diff) | |
parent | 46eadc7aeedf0fe3944291e2631d8604b38fe25f (diff) | |
download | emacs-2699a55464f7b43171c7b0e64d095640904e9e21.tar.gz |
Merge changes from emacs-23 branch
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/ChangeLog | 66 | ||||
-rw-r--r-- | lisp/cedet/ChangeLog | 14 | ||||
-rw-r--r-- | lisp/cedet/mode-local.el | 27 | ||||
-rw-r--r-- | lisp/cedet/semantic/analyze/debug.el | 44 | ||||
-rw-r--r-- | lisp/cedet/semantic/symref/list.el | 148 | ||||
-rw-r--r-- | lisp/menu-bar.el | 4 | ||||
-rw-r--r-- | lisp/net/tramp.el | 6 | ||||
-rw-r--r-- | lisp/play/fortune.el | 43 | ||||
-rw-r--r-- | lisp/play/gomoku.el | 9 | ||||
-rw-r--r-- | lisp/play/landmark.el | 5 | ||||
-rw-r--r-- | lisp/progmodes/sql.el | 4 | ||||
-rw-r--r-- | lisp/select.el | 5 | ||||
-rw-r--r-- | lisp/speedbar.el | 10 | ||||
-rw-r--r-- | lisp/textmodes/bibtex.el | 35 | ||||
-rw-r--r-- | lisp/vc/add-log.el | 4 |
15 files changed, 218 insertions, 206 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4a49b8d4880..61a23268f41 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,36 @@ +2010-10-31 Michael Albinus <michael.albinus@gmx.de> + + * net/tramp.el (tramp-handle-insert-file-contents): For root, + preserve owner and group when editing files. (Bug#7289) + +2010-10-31 Stefan Monnier <monnier@iro.umontreal.ca> + + * speedbar.el (speedbar-mode): + * play/fortune.el (fortune-in-buffer, fortune): + * play/gomoku.el (gomoku-mode): + * play/landmark.el (lm-mode): + * textmodes/bibtex.el (bibtex-validate, bibtex-validate-globally): + Replace inappropriate uses of toggle-read-only. (Bug#7292) + +2010-10-31 Glenn Morris <rgm@gnu.org> + + * select.el (x-selection): Mark it as an obsolete alias. + +2010-10-31 Aaron S. Hawley <aaron.s.hawley@gmail.com> + + * add-log.el (find-change-log): Use derived-mode-p rather than + major-mode (bug#7284). + +2010-10-31 Glenn Morris <rgm@gnu.org> + + * menu-bar.el (menu-bar-files-menu): Make it into an actual alias, + rather than just an unused variable that inherits from the real one. + +2010-10-31 Glenn Morris <rgm@gnu.org> + + * comint.el (comint-password-prompt-regexp): + Match "enter the password". (Bug#7224) + 2010-10-31 Alan Mackenzie <acm@muc.de> * progmodes/cc-cmds.el (c-mask-paragraph): Fix an off-by-1 error. @@ -246,13 +279,13 @@ auto-built for efficiency of execution and updating. (verilog-extended-complete-re): Support 'pure' fucntion & task declarations (these have no bodies). - (verilog-beg-of-statement): general cleanup to enable support of - 'pure' fucntion & task declarations (these have no bodies). These - efforts together fix Verilog bug210 from veripool; which was also + (verilog-beg-of-statement): General cleanup to enable support of + 'pure' fucntion & task declarations (these have no bodies). + These efforts together fix Verilog bug210 from veripool; which was also noticed by Steve Pearlmutter. (verilog-directive-re, verilog-directive-begin, verilog-indent-re) - (verilog-directive-nest-re, verilog-set-auto-endcomments): Support - `elsif. Reported by Shankar Giri. + (verilog-directive-nest-re, verilog-set-auto-endcomments): + Support `elsif. Reported by Shankar Giri. (verilog-forward-ws&directives, verilog-in-attribute-p): Fixes for attribute handling for lining up declarations and assignments. (verilog-beg-of-statement-1): Fix issue where continued declaration @@ -260,8 +293,7 @@ (verilog-in-attribute-p, verilog-skip-backward-comments) (verilog-skip-forward-comment-p): Support proper treatment of attributes by indent code. Reported by Jeff Steele. - (verilog-in-directive-p): Fix comment to correctly describe - function. + (verilog-in-directive-p): Fix comment to correctly describe function. (verilog-backward-up-list, verilog-in-struct-region-p) (verilog-backward-token, verilog-in-struct-p) (verilog-in-coverage-p, verilog-do-indent) @@ -288,7 +320,7 @@ parameter in AUTOINSTPARAM. (verilog-read-always-signals-recurse, verilog-read-decls): Fix not treating `elsif similar to `endif inside AUTOSENSE. - (verilog-do-indent): Implement correct automatic or static task or + (verilog-do-indent): Implement correct automatic or static task or function end comment highlight. Reported by Steve Pearlmutter. (verilog-font-lock-keywords-2): Fix highlighting of single character pins, bug264. Reported by Michael Laajanen. @@ -296,15 +328,15 @@ (verilog-read-sub-decls-in-interfaced, verilog-read-sub-decls-sig) (verilog-subdecls-get-interfaced, verilog-subdecls-new): Support interfaces with AUTOINST, bug270. Reported by Luis Gutierrez. - (verilog-pretty-expr): Fix interactive arguments, bug272. Reported - by Mark Johnson. - (verilog-auto-tieoff, verilog-auto-tieoff-ignore-regexp): Add - 'verilog-auto-tieoff-ignore-regexp' for AUTOTIEOFF, + (verilog-pretty-expr): Fix interactive arguments, bug272. + Reported by Mark Johnson. + (verilog-auto-tieoff, verilog-auto-tieoff-ignore-regexp): + Add 'verilog-auto-tieoff-ignore-regexp' for AUTOTIEOFF, bug269. Suggested by Gary Delp. (verilog-mode-map, verilog-preprocess, verilog-preprocess-history) - (verilog-preprocessor, verilog-set-compile-command): Create - verilog-preprocess and verilog-preprocessor to show preprocessed - output. + (verilog-preprocessor, verilog-set-compile-command): + Create verilog-preprocess and verilog-preprocessor to show + preprocessed output. (verilog-get-beg-of-line, verilog-get-end-of-line) (verilog-modi-file-or-buffer, verilog-modi-name) (verilog-modi-point, verilog-within-string): Move defmacro's @@ -352,8 +384,8 @@ (verilog-modi-lookup-last-current, verilog-modi-lookup-last-mod) (verilog-modi-lookup-last-modi, verilog-modi-lookup-last-tick): Fix slow verilog-auto expansion on very large files. - (verilog-read-sub-decls-expr, verilog-read-sub-decls-line): Fix - AUTOOUTPUT treating "1*2" as a signal name in submodule connection + (verilog-read-sub-decls-expr, verilog-read-sub-decls-line): + Fix AUTOOUTPUT treating "1*2" as a signal name in submodule connection "{1*2{...". Broke in last revision. (verilog-read-sub-decls-expr): Fix AUTOOUTPUT not detecting submodule connections with replications "{#{a},#{b}}". diff --git a/lisp/cedet/ChangeLog b/lisp/cedet/ChangeLog index bc024355b96..3ab14039828 100644 --- a/lisp/cedet/ChangeLog +++ b/lisp/cedet/ChangeLog @@ -1,3 +1,17 @@ +2010-10-31 Glenn Morris <rgm@gnu.org> + + * mode-local.el (mode-local-augment-function-help): + * semantic/analyze/debug.el (semantic-analyzer-debug-add-buttons): + * semantic/symref/list.el (semantic-symref-results-dump) + (semantic-symref-rb-toggle-expand-tag): Replace inappropriate uses + of toggle-read-only. + +2010-10-31 Juanma Barranquero <lekktu@gmail.com> + + * semantic/symref/list.el (semantic-symref-list-rename-open-hits): + Fix typo in message. + (semantic-symref-list-map-open-hits): Fix typo in docstring. + 2010-09-30 Chong Yidong <cyd@stupidchicken.com> * semantic/bovine/el.el: diff --git a/lisp/cedet/mode-local.el b/lisp/cedet/mode-local.el index 8d5772f0840..7943f61fee3 100644 --- a/lisp/cedet/mode-local.el +++ b/lisp/cedet/mode-local.el @@ -1,6 +1,7 @@ ;;; mode-local.el --- Support for mode local facilities ;; -;; Copyright (C) 2004, 2005, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2004, 2005, 2007, 2008, 2009, 2010 +;; Free Software Foundation, Inc. ;; ;; Author: David Ponce <david@dponce.com> ;; Maintainer: David Ponce <david@dponce.com> @@ -610,19 +611,16 @@ PROMPT, INITIAL, HIST, and DEFAULT are the same as for `completing-read'." SYMBOL is a function that can be overridden." (with-current-buffer "*Help*" (pop-to-buffer (current-buffer)) - (unwind-protect - (progn - (toggle-read-only -1) - (goto-char (point-min)) - (unless (re-search-forward "^$" nil t) - (goto-char (point-max)) - (beginning-of-line) - (forward-line -1)) - (insert (overload-docstring-extension symbol) "\n") - ;; NOTE TO SELF: - ;; LIST ALL LOADED OVERRIDES FOR SYMBOL HERE - ) - (toggle-read-only 1)))) + (goto-char (point-min)) + (unless (re-search-forward "^$" nil t) + (goto-char (point-max)) + (beginning-of-line) + (forward-line -1)) + (let ((inhibit-read-only t)) + (insert (overload-docstring-extension symbol) "\n") + ;; NOTE TO SELF: + ;; LIST ALL LOADED OVERRIDES FOR SYMBOL HERE + ))) ;; Help for mode-local bindings. (defun mode-local-print-binding (symbol) @@ -782,5 +780,4 @@ invoked interactively." (provide 'mode-local) -;; arch-tag: 14b77823-f93c-4b3d-9116-495f69a6ec07 ;;; mode-local.el ends here diff --git a/lisp/cedet/semantic/analyze/debug.el b/lisp/cedet/semantic/analyze/debug.el index 490b57bf83a..cfc41e6faf1 100644 --- a/lisp/cedet/semantic/analyze/debug.el +++ b/lisp/cedet/semantic/analyze/debug.el @@ -586,34 +586,28 @@ Look for key expressions, and add push-buttons near them." (set-marker orig-buffer (point) (current-buffer)) ;; Get a buffer ready. (with-current-buffer "*Help*" - (toggle-read-only -1) - (goto-char (point-min)) - (set (make-local-variable 'semantic-analyzer-debug-orig) orig-buffer) - ;; First, add do-in buttons to recommendations. - (while (re-search-forward "^\\s-*M-x \\(\\(\\w\\|\\s_\\)+\\) " nil t) - (let ((fcn (match-string 1))) - (when (not (fboundp (intern-soft fcn))) - (error "Help Err: Can't find %s" fcn)) - (end-of-line) - (insert " ") - (insert-button "[ Do It ]" - 'mouse-face 'custom-button-pressed-face - 'do-fcn fcn - 'action `(lambda (arg) - (let ((M semantic-analyzer-debug-orig)) - (set-buffer (marker-buffer M)) - (goto-char M)) - (call-interactively (quote ,(intern-soft fcn)))) - ) - )) + (let ((inhibit-read-only t)) + (goto-char (point-min)) + (set (make-local-variable 'semantic-analyzer-debug-orig) orig-buffer) + ;; First, add do-in buttons to recommendations. + (while (re-search-forward "^\\s-*M-x \\(\\(\\w\\|\\s_\\)+\\) " nil t) + (let ((fcn (match-string 1))) + (when (not (fboundp (intern-soft fcn))) + (error "Help Err: Can't find %s" fcn)) + (end-of-line) + (insert " ") + (insert-button "[ Do It ]" + 'mouse-face 'custom-button-pressed-face + 'do-fcn fcn + 'action `(lambda (arg) + (let ((M semantic-analyzer-debug-orig)) + (set-buffer (marker-buffer M)) + (goto-char M)) + (call-interactively (quote ,(intern-soft fcn)))))))) ;; Do something else? - ;; Clean up the mess - (toggle-read-only 1) - (set-buffer-modified-p nil) - ))) + (set-buffer-modified-p nil)))) (provide 'semantic/analyze/debug) -;; arch-tag: 943db1e5-47e6-4bec-9989-78ebfadf0358 ;;; semantic/analyze/debug.el ends here diff --git a/lisp/cedet/semantic/symref/list.el b/lisp/cedet/semantic/symref/list.el index 53044e278ac..9be53d90b08 100644 --- a/lisp/cedet/semantic/symref/list.el +++ b/lisp/cedet/semantic/symref/list.el @@ -221,49 +221,38 @@ Some useful functions are found in `semantic-format-tag-functions'." (defun semantic-symref-results-dump (results) "Dump the RESULTS into the current buffer." ;; Get ready for the insert. - (toggle-read-only -1) - (erase-buffer) - - ;; Insert the contents. - (let ((lastfile nil) - ) - (dolist (T (oref results :hit-tags)) - - (when (not (equal lastfile (semantic-tag-file-name T))) - (setq lastfile (semantic-tag-file-name T)) - (insert-button lastfile - 'mouse-face 'custom-button-pressed-face - 'action 'semantic-symref-rb-goto-file + (let ((inhibit-read-only t)) + (erase-buffer) + ;; Insert the contents. + (let ((lastfile nil)) + (dolist (T (oref results :hit-tags)) + (unless (equal lastfile (semantic-tag-file-name T)) + (setq lastfile (semantic-tag-file-name T)) + (insert-button lastfile + 'mouse-face 'custom-button-pressed-face + 'action 'semantic-symref-rb-goto-file + 'tag T) + (insert "\n")) + (insert " ") + (insert-button "[+]" + 'mouse-face 'highlight + 'face nil + 'action 'semantic-symref-rb-toggle-expand-tag 'tag T - ) - (insert "\n")) - - (insert " ") - (insert-button "[+]" - 'mouse-face 'highlight - 'face nil - 'action 'semantic-symref-rb-toggle-expand-tag - 'tag T - 'state 'closed) - (insert " ") - (insert-button (funcall semantic-symref-results-summary-function - T nil t) - 'mouse-face 'custom-button-pressed-face - 'face nil - 'action 'semantic-symref-rb-goto-tag - 'tag T) - (insert "\n") - - )) - - ;; Auto expand - (when semantic-symref-auto-expand-results - (semantic-symref-list-expand-all)) - - ;; Clean up the mess - (toggle-read-only 1) - (set-buffer-modified-p nil) - ) + 'state 'closed) + (insert " ") + (insert-button (funcall semantic-symref-results-summary-function + T nil t) + 'mouse-face 'custom-button-pressed-face + 'face nil + 'action 'semantic-symref-rb-goto-tag + 'tag T) + (insert "\n"))) + ;; Auto expand + (when semantic-symref-auto-expand-results + (semantic-symref-list-expand-all))) + ;; Clean up the mess + (set-buffer-modified-p nil)) ;;; Commands for semantic-symref-results ;; @@ -283,11 +272,9 @@ BUTTON is the button that was clicked." (buff (semantic-tag-buffer tag)) (hits (semantic--tag-get-property tag :hit)) (state (button-get button 'state)) - (text nil) - ) + (text nil)) (cond ((eq state 'closed) - (toggle-read-only -1) (with-current-buffer buff (dolist (H hits) (goto-char (point-min)) @@ -295,48 +282,42 @@ BUTTON is the button that was clicked." (beginning-of-line) (back-to-indentation) (setq text (cons (buffer-substring (point) (point-at-eol)) text))) - (setq text (nreverse text)) - ) + (setq text (nreverse text))) (goto-char (button-start button)) (forward-char 1) - (delete-char 1) - (insert "-") - (button-put button 'state 'open) - (save-excursion - (end-of-line) - (while text - (insert "\n") - (insert " ") - (insert-button (car text) - 'mouse-face 'highlight - 'face nil - 'action 'semantic-symref-rb-goto-match - 'tag tag - 'line (car hits)) - (setq text (cdr text) - hits (cdr hits)))) - (toggle-read-only 1) - ) + (let ((inhibit-read-only t)) + (delete-char 1) + (insert "-") + (button-put button 'state 'open) + (save-excursion + (end-of-line) + (while text + (insert "\n") + (insert " ") + (insert-button (car text) + 'mouse-face 'highlight + 'face nil + 'action 'semantic-symref-rb-goto-match + 'tag tag + 'line (car hits)) + (setq text (cdr text) + hits (cdr hits)))))) ((eq state 'open) - (toggle-read-only -1) - (button-put button 'state 'closed) - ;; Delete the various bits. - (goto-char (button-start button)) - (forward-char 1) - (delete-char 1) - (insert "+") - (save-excursion - (end-of-line) + (let ((inhibit-read-only t)) + (button-put button 'state 'closed) + ;; Delete the various bits. + (goto-char (button-start button)) (forward-char 1) - (delete-region (point) - (save-excursion - (forward-char 1) - (forward-line (length hits)) - (point)))) - (toggle-read-only 1) - ) - )) - ) + (delete-char 1) + (insert "+") + (save-excursion + (end-of-line) + (forward-char 1) + (delete-region (point) + (save-excursion + (forward-char 1) + (forward-line (length hits)) + (point))))))))) (defun semantic-symref-rb-goto-file (&optional button) "Go to the file specified in the symref results buffer. @@ -554,5 +535,4 @@ Return the number of occurrences FUNCTION was operated upon." ;; generated-autoload-load-name: "semantic/symref/list" ;; End: -;; arch-tag: e355d9c6-26e0-42d1-9bf1-f4801a54fffa ;;; semantic/symref/list.el ends here diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el index ac33940011a..a3a28c3dcfc 100644 --- a/lisp/menu-bar.el +++ b/lisp/menu-bar.el @@ -83,8 +83,8 @@ (define-key global-map [menu-bar help-menu] (cons (purecopy "Info") menu-bar-help-menu))) -;; This alias is for compatibility with 19.28 and before. -(defvar menu-bar-files-menu menu-bar-file-menu) +;; Only declared obsolete (and only made a proper alias) in 23.3. +(define-obsolete-variable-alias 'menu-bar-files-menu 'menu-bar-file-menu "22.1") ;; This is referenced by some code below; it is defined in uniquify.el (defvar uniquify-buffer-name-style) diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 7b2d8a0a6e6..1ca46d213d3 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -2861,7 +2861,11 @@ User is always nil." (setq buffer-file-name filename) (setq buffer-read-only (not (file-writable-p filename))) (set-visited-file-modtime) - (set-buffer-modified-p nil)) + (set-buffer-modified-p nil) + ;; For root, preserve owner and group when editing files. + (when (string-equal (file-remote-p filename 'user) "root") + (set (make-local-variable 'backup-by-copying-when-mismatch) t) + (put 'backup-by-copying-when-mismatch 'permanent-local t))) (when (and (stringp local-copy) (or remote-copy (null tramp-temp-buffer-file-name))) (delete-file local-copy)) diff --git a/lisp/play/fortune.el b/lisp/play/fortune.el index 10bf05b2201..e7bd013b2ab 100644 --- a/lisp/play/fortune.el +++ b/lisp/play/fortune.el @@ -1,7 +1,7 @@ ;;; fortune.el --- use fortune to create signatures -;; Copyright (C) 1999, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -;; 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1999, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, +;; 2009, 2010 Free Software Foundation, Inc. ;; Author: Holger Schauer <Holger.Schauer@gmx.de> ;; Keywords: games utils mail @@ -285,48 +285,41 @@ and choose the directory as the fortune-file." ;;; Display fortune (defun fortune-in-buffer (interactive &optional file) "Put a fortune cookie in the *fortune* buffer. - -INTERACTIVE is ignored. Optional argument FILE, -when supplied, specifies the file to choose the fortune from." +INTERACTIVE is ignored. Optional argument FILE, when supplied, +specifies the file to choose the fortune from." (let ((fortune-buffer (or (get-buffer fortune-buffer-name) (generate-new-buffer fortune-buffer-name))) (fort-file (expand-file-name (substitute-in-file-name (or file fortune-file))))) (with-current-buffer fortune-buffer - (toggle-read-only 0) - (erase-buffer) - - (if fortune-always-compile - (fortune-compile fort-file)) - - (apply 'call-process - fortune-program ; program to call - nil fortune-buffer nil ; INFILE BUFFER DISPLAY - (append (if (stringp fortune-program-options) - (split-string fortune-program-options) - fortune-program-options) (list fort-file)))))) + (let ((inhibit-read-only t)) + (erase-buffer) + (if fortune-always-compile + (fortune-compile fort-file)) + (apply 'call-process + fortune-program ; program to call + nil fortune-buffer nil ; INFILE BUFFER DISPLAY + (append (if (stringp fortune-program-options) + (split-string fortune-program-options) + fortune-program-options) (list fort-file))))))) ;;;###autoload (defun fortune (&optional file) "Display a fortune cookie. - If called with a prefix asks for the FILE to choose the fortune from, otherwise uses the value of `fortune-file'. If you want to have fortune choose from a set of files in a directory, call interactively with prefix and choose the directory as the fortune-file." - (interactive - (list - (if current-prefix-arg - (fortune-ask-file) - fortune-file))) + (interactive (list (if current-prefix-arg + (fortune-ask-file) + fortune-file))) (fortune-in-buffer t file) (switch-to-buffer (get-buffer fortune-buffer-name)) - (toggle-read-only 1)) + (setq buffer-read-only t)) ;;; Provide ourselves. (provide 'fortune) -;; arch-tag: a1e4cb8a-3792-40e7-86a7-fc75ce094bcc ;;; fortune.el ends here diff --git a/lisp/play/gomoku.el b/lisp/play/gomoku.el index dbe3317a020..bb77c5a33ea 100644 --- a/lisp/play/gomoku.el +++ b/lisp/play/gomoku.el @@ -1,7 +1,7 @@ ;;; gomoku.el --- Gomoku game between you and Emacs -;; Copyright (C) 1988, 1994, 1996, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1988, 1994, 1996, 2001, 2002, 2003, 2004, 2005, 2006, +;; 2007, 2008, 2009, 2010 Free Software Foundation, Inc. ;; Author: Philippe Schnoebelen <phs@lsv.ens-cachan.fr> ;; Maintainer: FSF @@ -195,8 +195,8 @@ Other useful commands:\n \\{gomoku-mode-map}" (gomoku-display-statistics) (make-local-variable 'font-lock-defaults) - (setq font-lock-defaults '(gomoku-font-lock-keywords t)) - (toggle-read-only t)) + (setq font-lock-defaults '(gomoku-font-lock-keywords t) + buffer-read-only t)) ;;; ;;; THE BOARD. @@ -1206,5 +1206,4 @@ If the game is finished, this command requests for another game." (provide 'gomoku) -;; arch-tag: b1b8205e-77fc-4597-b373-3ea2c04311eb ;;; gomoku.el ends here diff --git a/lisp/play/landmark.el b/lisp/play/landmark.el index dd8c554f6f5..9cc73960f6b 100644 --- a/lisp/play/landmark.el +++ b/lisp/play/landmark.el @@ -255,8 +255,8 @@ is non-nil. One interesting value is `turn-on-font-lock'." (lm-display-statistics) (use-local-map lm-mode-map) (make-local-variable 'font-lock-defaults) - (setq font-lock-defaults '(lm-font-lock-keywords t)) - (toggle-read-only t) + (setq font-lock-defaults '(lm-font-lock-keywords t) + buffer-read-only t) (run-mode-hooks 'lm-mode-hook)) @@ -1702,5 +1702,4 @@ Use \\[describe-mode] for more info." (provide 'landmark) -;; arch-tag: ae5031be-96e6-459e-a3df-1df53117d3f2 ;;; landmark.el ends here diff --git a/lisp/progmodes/sql.el b/lisp/progmodes/sql.el index 7148027f487..acb34eacc2b 100644 --- a/lisp/progmodes/sql.el +++ b/lisp/progmodes/sql.el @@ -7,7 +7,8 @@ ;; Maintainer: Michael Mauger <mmaug@yahoo.com> ;; Version: 2.8 ;; Keywords: comm languages processes -;; URL: http://savannah.gnu.org/cgi-bin/viewcvs/emacs/emacs/lisp/progmodes/sql.el +;; URL: http://savannah.gnu.org/projects/emacs/ +;; URL: http://www.emacswiki.org/cgi-bin/wiki.pl?SqlMode ;; This file is part of GNU Emacs. @@ -4270,6 +4271,5 @@ buffer. (provide 'sql) -;; arch-tag: 7e1fa1c4-9ca2-402e-87d2-83a5eccb7ac3 ;;; sql.el ends here diff --git a/lisp/select.el b/lisp/select.el index 23541963438..0f43ce05822 100644 --- a/lisp/select.el +++ b/lisp/select.el @@ -75,8 +75,9 @@ After the communication, this variable is set to nil.") (declare-function x-get-selection-internal "xselect.c" (selection-symbol target-type &optional time-stamp)) -;; This is for temporary compatibility with pre-release Emacs 19. -(defalias 'x-selection 'x-get-selection) +;; Only declared obsolete in 23.3. +(define-obsolete-function-alias 'x-selection 'x-get-selection "at least 19.34") + (defun x-get-selection (&optional type data-type) "Return the value of an X Windows selection. The argument TYPE (default `PRIMARY') says which selection, diff --git a/lisp/speedbar.el b/lisp/speedbar.el index 5e732b398f3..0719f895fad 100644 --- a/lisp/speedbar.el +++ b/lisp/speedbar.el @@ -1,7 +1,8 @@ ;;; speedbar --- quick access to files and tags in a frame ;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; 2005, 2006, 2007, 2008, 2009, 2010 +;; Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <zappo@gnu.org> ;; Keywords: file, tags, tools @@ -1128,9 +1129,9 @@ in the selected file. (setq font-lock-keywords nil) ;; no font-locking please (setq truncate-lines t) (make-local-variable 'frame-title-format) - (setq frame-title-format (concat "Speedbar " speedbar-version)) - (setq case-fold-search nil) - (toggle-read-only 1) + (setq frame-title-format (concat "Speedbar " speedbar-version) + case-fold-search nil + buffer-read-only t) (speedbar-set-mode-line-format) ;; Add in our dframe hooks. (if speedbar-track-mouse-flag @@ -4142,5 +4143,4 @@ TEXT is the buffer's name, TOKEN and INDENT are unused." ;; run load-time hooks (run-hooks 'speedbar-load-hook) -;; arch-tag: 4477e6d1-f78c-48b9-a503-387d3c9767d5 ;;; speedbar ends here diff --git a/lisp/textmodes/bibtex.el b/lisp/textmodes/bibtex.el index 0662acf2c50..75dd4f80153 100644 --- a/lisp/textmodes/bibtex.el +++ b/lisp/textmodes/bibtex.el @@ -1,7 +1,8 @@ ;;; bibtex.el --- BibTeX mode for GNU Emacs ;; Copyright (C) 1992, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002, -;; 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 +;; Free Software Foundation, Inc. ;; Author: Stefan Schoef <schoef@offis.uni-oldenburg.de> ;; Bengt Martensson <bengt@mathematik.uni-Bremen.de> @@ -3835,16 +3836,16 @@ Return t if test was successful, nil otherwise." (with-current-buffer (get-buffer-create err-buf) (setq default-directory dir) (unless (eq major-mode 'compilation-mode) (compilation-mode)) - (toggle-read-only -1) - (delete-region (point-min) (point-max)) - (insert "BibTeX mode command `bibtex-validate'\n" - (if syntax-error - "Maybe undetected errors due to syntax errors. Correct and validate again.\n" - "\n")) - (dolist (err error-list) - (insert (format "%s:%d: %s\n" file (car err) (cdr err)))) - (set-buffer-modified-p nil) - (toggle-read-only 1) + (let ((inhibit-read-only t)) + (delete-region (point-min) (point-max)) + (insert "BibTeX mode command `bibtex-validate'\n" + (if syntax-error + "Maybe undetected errors due to syntax errors. \ +Correct and validate again.\n" + "\n")) + (dolist (err error-list) + (insert (format "%s:%d: %s\n" file (car err) (cdr err)))) + (set-buffer-modified-p nil)) (goto-char (point-min)) (forward-line 2)) ; first error message (display-buffer err-buf) @@ -3896,12 +3897,11 @@ Return t if test was successful, nil otherwise." (let ((err-buf "*BibTeX validation errors*")) (with-current-buffer (get-buffer-create err-buf) (unless (eq major-mode 'compilation-mode) (compilation-mode)) - (toggle-read-only -1) - (delete-region (point-min) (point-max)) - (insert "BibTeX mode command `bibtex-validate-globally'\n\n") - (dolist (err (sort error-list 'string-lessp)) (insert err)) - (set-buffer-modified-p nil) - (toggle-read-only 1) + (let ((inhibit-read-only t)) + (delete-region (point-min) (point-max)) + (insert "BibTeX mode command `bibtex-validate-globally'\n\n") + (dolist (err (sort error-list 'string-lessp)) (insert err)) + (set-buffer-modified-p nil)) (goto-char (point-min)) (forward-line 2)) ; first error message (display-buffer err-buf) @@ -4778,5 +4778,4 @@ Return the URL or nil if none can be generated." (provide 'bibtex) -;; arch-tag: ee2be3af-caad-427f-b42a-d20fad630d04 ;;; bibtex.el ends here diff --git a/lisp/vc/add-log.el b/lisp/vc/add-log.el index b63e482ff05..c356dde8226 100644 --- a/lisp/vc/add-log.el +++ b/lisp/vc/add-log.el @@ -698,7 +698,7 @@ current buffer to the complete file name. Optional arg BUFFER-FILE overrides `buffer-file-name'." ;; If we are called from a diff, first switch to the source buffer; ;; in order to respect buffer-local settings of change-log-default-name, etc. - (with-current-buffer (let ((buff (if (eq major-mode 'diff-mode) + (with-current-buffer (let ((buff (if (derived-mode-p 'diff-mode) (car (ignore-errors (diff-find-source-location)))))) (if (buffer-live-p buff) buff @@ -1180,7 +1180,7 @@ Has a preference of looking backwards." ((apply 'derived-mode-p add-log-c-like-modes) (or (c-cpp-define-name) (c-defun-name))) - ((memq major-mode add-log-tex-like-modes) + ((apply #'derived-mode-p add-log-tex-like-modes) (if (re-search-backward "\\\\\\(sub\\)*\\(section\\|paragraph\\|chapter\\)" nil t) |