view lisp/abbrevlist.el @ 73575:c39e3aff703e

(mac_create_bitmap_from_bitmap_data): Make variable `swap_nibbles' static const. (atsu_get_text_layout_with_text_ptr): Make variables `lengths', `tags', `sizes', `values' static const. (mac_draw_string_common): Make variables `context' static. Make variables `tags', `sizes', and `values' static const. (pcm_get_status, x_detect_focus_change, x_scroll_bar_handle_click) (xlfdpat_create, xlfdpat_block_match_1, xlfdpat_match) (mac_to_x_fontname, parse_x_font_name, add_mac_font_name) (mac_do_list_fonts, is_fully_specified_xlfd, do_grow_window) (mac_store_event_ref_as_apple_event, mac_make_rdb): Add const qualifier to arguments. (xlfd_scalable_fields, keycode_to_xkeysym_table) (fn_keycode_to_keycode_table): Make static const. (mac_load_query_font): Make variables `tags', `sizes', `values', `types', and `selectors' static const. (mac_handle_command_event, mac_handle_window_event): Make variables `names' and `types' static const. (init_command_handler, install_window_handler): Make variables `specs*' static const. (mac_handle_font_event, mac_handle_text_input_event) (mac_store_service_event): Make variables `names' and `types' const. Make variables `names_*' and `types_*' static const.
author YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
date Tue, 31 Oct 2006 08:32:56 +0000
parents 4ef3c75869eb
children ddcbd2c1b70d d1c5430c5bff
line wrap: on
line source

;;; abbrevlist.el --- list one abbrev table alphabetically ordered

;; Copyright (C) 1986, 1992, 2002, 2003, 2004,
;;   2005, 2006 Free Software Foundation, Inc.
;; Suggested by a previous version by Gildea.

;; Maintainer: FSF
;; Keywords: abbrev

;; 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 2, 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.

;;; Commentary:

;;; Code:

;;;###autoload
(defun list-one-abbrev-table (abbrev-table output-buffer)
  "Display alphabetical listing of ABBREV-TABLE in buffer OUTPUT-BUFFER."
  (with-output-to-temp-buffer output-buffer
    (save-excursion
      (let ((abbrev-list nil) (first-column 0))
	(set-buffer standard-output)
	(mapatoms
	  (function (lambda (abbrev)
		      (setq abbrev-list (cons abbrev abbrev-list))))
	  abbrev-table)
	(setq abbrev-list (sort abbrev-list 'string-lessp))
	(while abbrev-list
	  (if (> (+ first-column 40) (window-width))
	      (progn
		(insert "\n")
		(setq first-column 0)))
	  (indent-to first-column)
	  (insert (symbol-name (car abbrev-list)))
	  (indent-to (+ first-column 8))
	  (insert (symbol-value (car abbrev-list)))
	  (setq first-column (+ first-column 40))
	  (setq abbrev-list (cdr abbrev-list)))))))

(provide 'abbrevlist)

;;; arch-tag: 178f0638-6597-4c16-bcee-576c3d8e9217
;;; abbrevlist.el ends here