;; Bugged: read-abbrev-file function in abbrev.el ;; The `(interactive "f' - kontroll-letter takes just ;; the current buffer-file if you quit the demand ;; with RET. That's not what you want: If the file is ;; already open, there is no need to call ;; `read-abbrev-file', the `default-abbrev-file' should ;; be called in the case of no specified user input.
;; Proposed fix: ;; Loads the default-abbrev-file unless no file is specified. (defalias 'read-abbrev-file 'read-abbrev-file-ar) (defun read-abbrev-file-ar (&optional file quietly) "Read abbrev definitions from file written with `write-abbrev-file'. Optional argument FILE is the name of the file to read; it defaults to the value of `abbrev-file-name'. Optional second argument QUIETLY non-nil means don't print anything." (interactive) (let* ((abbrevs-to-load file) (abbrevs-to-load (if abbrevs-to-load abbrevs-to-load ;; clear unavertedly inserted whitespaces (string-strip (read-from-minibuffer (concat "(default: "abbrev-file-name") ")) t t))) (abbrevs-to-load (if (string= abbrevs-to-load "") abbrev-file-name abbrevs-to-load))) (load abbrevs-to-load nil quietly)) (setq abbrevs-changed nil)) ;; Function needed to clear unavertedly ;; inserted whitespaces ;; Source: comment-string-strip, newcomment.el, GNU Emacs 22.0.50.1;; (defun string-strip (str beforep afterp) "Strip STR of any leading (if BEFOREP) and/or trailing (if AFTERP) space. " (string-match (concat "\\`" (if beforep "\\s-*") "\\(.*?\\)" (if afterp "\\s-*\n?") "\\'") str) (match-string 1 str)) ;; end _______________________________________________ emacs-pretest-bug mailing list emacs-pretest-bug@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug