comparison lisp/menubar-items.el @ 502:7039e6323819

[xemacs-hg @ 2001-05-04 22:41:46 by ben] ----------------------- byte-comp warning fixes ----------------- New functions for cleanly eliminating byte-compiler warnings. Their definitions require no changes at all in bytecomp.el, meaning that any package that wants to use them and be compatible with older versions of XEmacs need only copy the code and rename the functions (i.e. prefix them with the package name). Eliminate byte-compiler warnings using the new functions in bytecomp-runtime.el. Move coding-system-put,get,category, since they're not Mule-specific and are used in prefer-coding-system. font.el was incredibly ugly. Clean it up. Avoid using defsubst for any exported functions, to avoid possible compatibility problems if we later change the internal interface. (It happened before, with face accessors, between 19.8 and 19.9). Fix tons of warnings. Clean up (new function gpm-is-supported-p eliminates duplicate code in gpm-create/delete-device-hook) and eliminate warnings. ---------- make byte-recompile-directory work in the --------- core `lisp' dir, even in the absence of a Mule XEmacs (i.e. make it skip the Mule files rather than trying to compile them). now you should be able to do `touch *.el' in the `lisp' dir, then M-x byte-recompile-directory, and get no warnings. Avoid trying to compile Mule files in byte-recompile-directory when we're not in a Mule XEmacs, since we're highly likely to get syntax errors. Add a coding-system cookie to all Mule files so that byte-recompile-directory ignores them. Magic cookie function moved to files.el from code-files.el (for use by bytecomp even in a non-coding-system XEmacs), and changed names and semantics for use by bytecomp. NOTE: IMO this is an internal function that we can change as we like (and there is absolutely no code anywhere else using the function). ---------------- GUI improvements: menus, help ------------------- Rearrange order of keymap declarations to be alphabetical. Improve help on help to include all bindings, and group by category. Add bindings for new Info commands. Remove warnings. Use command-hyper-apropos in place of command-apropos. Add a function to do the equivalent of command-apropos. Evals its help-text argument so you can put expressions there. Used now by help-for-help. Add binding to continue text searches. Expand index searches to work over multiple info documents. Add commands to search text/index in User and Lispref. Add new entry, "Uncomment Region" (parallels "Comment Out Region"). Redo Help menu; add bindings for new Info commands to search the index or text of the User and Lispref manuals. Add command for mark-paragraph, activate-region. Make Edit->R accelerator be rectangle, not register (more commonly used), and put rectangle first. Fix the Edit Init File entry to never load the .elc file. Simplify the default-popup-menu. Add Cmds->Tabs menu. Use kp-left not kp_left, etc. ---------------- Miscellaneous bug fixes/cleanup ------------------- byte-compiler-options: Correct doc string. easy-menu-do-define: fix extra quote. fill-paragraph-or-region:Rewrite to be more correct -- use call-interactively so that we always get exactly the same behavior as if the functions were called directly. No need to fiddle with zmacs-region-stays, now that bogus clearing of it (2001-04-28 src/ChangeLog) is removed. Put dialog titles back in -- this time correctly. Fix various other problems with leaks and such. key-sequence-list-description: Clean up fun to always correctly canonicalize. Clean up Kinsoku comments, synch comment-region with FSF 20.7. * simple.el (region-exists-p): * simple.el (region-active-p): Add comment about which one is correct to use in menu specs. * sound.el (load-sound-file): Minor code clean up. * startup.el: * startup.el (command-line-early): * startup.el (initial-scratch-message): Comment changes. Add info about sample.init.el to splash screen. Improve initial-scratch-message and clarify purpose of Scratch buffer. Fix byte-compile warning. ------------------------ Added features ------------------------- Add new variable to control whether etags checks all parent directories for tag files. (On by default.) * hash-table.el: New file, useful utility functions. * dumped-lisp.el (preloaded-file-list): Dump hash-table.el. ------------ notable bug fix: Windows event code -------------- Get critical quit working. ------------ notable bug fix and new feature: regex code -------------- Shy groups were implemented in a horrible, half-assed way that would cause them to screw up regex searching in most cases. Fixed to work correctly. Also extended back-reference syntax past 9. Only is recognized as such if there are at least that many non-shy groups; and optionally will warn about such uses, to catch old code that might be using them differently. (Added variable to control this in search.c -- `warn-about-possibly-incompatible-back- references', on by default for the moment. Declared in lisp.h. ---------------- process/SIGIO improvements ------------------- define USE_GETADDRINFO to replace more complex conditional, and use it. the code conditionalized on this in unix_open_network_stream had *serious* problems handling errors. it's now fixed, and major amounts of duplicate code between the two versions were combined. don't disable SIGIO and other interrupts unless CONNECT_NEEDS_SLOWED_INTERRUPTS is defined -- don't penalize OS's without bugs. similarly for a freebsd bug that was affecting all OS's. * s\ultrix.h: define CONNECT_NEEDS_SLOWED_INTERRUPTS, since that's the OS mentioned as having a kernel bug. * sysdep.c (request_sigio_on_device): * sysdep.c (unrequest_sigio_on_device): fix SIGIO problems on Linux. add check for O_ASYNC in case it's defined and FASYNC isn't. add comment about other ways to do SIGIO on Linux. * callproc.c (Fold_call_process_internal): * process.c (Fstart_process_internal): Deal with the possibility that `default-directory' doesn't have terminating slash. Correct comments about vfork. ---------------- Miscellaneous bug fixes/cleanup ------------------- * callint.c (Finteractive): Add lots of documentation -- exactly what the Lisp equivalents of all the interactive specs are. * console.h (struct console): change type of quit_char to Emchar. * event-msw.c (lstream_type_create_mswindows_selectable): spacing change. Eliminate events-mod.h and combine into events.h. * emacs.c: * emacs.c (make_arg_list_1): * emacs.c (main_1): A couple of char->Extbyte changes, add a comment. * glyphs-msw.c: Correct indentation of function defns to not exceed 80 cols. Try (sort of) to fix some code that sets the colors of the progress gauge. (Commented out) * keymap.c (syms_of_keymap): use DEFSYMBOL. * process.c (read_process_output): No need to fiddle with zmacs_region_stays, now that bogus clearing of it (see below) is removed. * search.c (Freplace_match): warning fix.
author ben
date Fri, 04 May 2001 22:42:35 +0000
parents 52626a2f02ef
children 39ccc7dd8077
comparison
equal deleted inserted replaced
501:0a255b32b157 502:7039e6323819
188 ["%_Delete" delete-primary-selection 188 ["%_Delete" delete-primary-selection
189 :active (selection-owner-p)] 189 :active (selection-owner-p)]
190 "----" 190 "----"
191 ["Select %_All" mark-whole-buffer] 191 ["Select %_All" mark-whole-buffer]
192 ["Select Pa%_ge" mark-page] 192 ["Select Pa%_ge" mark-page]
193 ["Select Paragrap%_h" mark-paragraph]
194 ["Re%_select Region" activate-region :active (mark t)]
193 "----" 195 "----"
194 ["%_Find..." make-search-dialog] 196 ["%_Find..." make-search-dialog]
195 ["R%_eplace..." query-replace] 197 ["R%_eplace..." query-replace]
196 ["Replace (Rege%_xp)..." query-replace-regexp] 198 ["Replace (Rege%_xp)..." query-replace-regexp]
197 ["%_List Matching Lines..." list-matching-lines] 199 ["%_List Matching Lines..." list-matching-lines]
333 :active (eq major-mode 'edit-abbrevs-mode)] 335 :active (eq major-mode 'edit-abbrevs-mode)]
334 "---" 336 "---"
335 ["%_Save Abbrevs As..." write-abbrev-file] 337 ["%_Save Abbrevs As..." write-abbrev-file]
336 ["L%_oad Abbrevs..." read-abbrev-file] 338 ["L%_oad Abbrevs..." read-abbrev-file]
337 ) 339 )
338 ("%_Register" 340 ("%_Rectangles"
339 ["%_Copy to Register..." copy-to-register :active (region-exists-p)]
340 ["%_Paste Register..." insert-register]
341 "---"
342 ["%_Save Point to Register" point-to-register]
343 ["%_Jump to Register" register-to-point]
344 )
345 ("R%_ectangles"
346 ["%_Kill Rectangle" kill-rectangle] 341 ["%_Kill Rectangle" kill-rectangle]
347 ["%_Yank Rectangle" yank-rectangle] 342 ["%_Yank Rectangle" yank-rectangle]
348 ["Rectangle %_to Register" copy-rectangle-to-register] 343 ["Rectangle %_to Register" copy-rectangle-to-register]
349 ["Rectangle %_from Register" insert-register] 344 ["Rectangle %_from Register" insert-register]
350 ["%_Clear Rectangle" clear-rectangle] 345 ["%_Clear Rectangle" clear-rectangle]
353 ["Rectangle %_Mousing" 348 ["Rectangle %_Mousing"
354 (customize-set-variable 'mouse-track-rectangle-p 349 (customize-set-variable 'mouse-track-rectangle-p
355 (not mouse-track-rectangle-p)) 350 (not mouse-track-rectangle-p))
356 :style toggle :selected mouse-track-rectangle-p] 351 :style toggle :selected mouse-track-rectangle-p]
357 ) 352 )
353 ("Re%_gister"
354 ["%_Copy to Register..." copy-to-register :active (region-exists-p)]
355 ["%_Paste Register..." insert-register]
356 "---"
357 ["%_Save Point to Register" point-to-register]
358 ["%_Jump to Register" register-to-point]
359 )
358 ("%_Sort" 360 ("%_Sort"
359 ["%_Lines in Region" sort-lines :active (region-exists-p)] 361 ["%_Lines in Region" sort-lines :active (region-exists-p)]
360 ["%_Paragraphs in Region" sort-paragraphs :active (region-exists-p)] 362 ["%_Paragraphs in Region" sort-paragraphs :active (region-exists-p)]
361 ["P%_ages in Region" sort-pages :active (region-exists-p)] 363 ["P%_ages in Region" sort-pages :active (region-exists-p)]
362 ["%_Columns in Region" sort-columns :active (region-exists-p)] 364 ["%_Columns in Region" sort-columns :active (region-exists-p)]
379 ["%_To Column..." indent-to-column] 381 ["%_To Column..." indent-to-column]
380 "---" 382 "---"
381 ["%_Region" indent-region :active (region-exists-p)] 383 ["%_Region" indent-region :active (region-exists-p)]
382 ["%_Balanced Expression" indent-sexp] 384 ["%_Balanced Expression" indent-sexp]
383 ["%_C Expression" indent-c-exp] 385 ["%_C Expression" indent-c-exp]
386 )
387 ("%_Tabs"
388 ["%_Convert Tabs to Spaces" untabify :active (and (region-exists-p)
389 (fboundp 'untabify))]
390 ["Convert %_Spaces to Tabs" tabify :active (and (region-exists-p)
391 (fboundp 'tabify))]
392 "---"
393 ["%_Tab to Tab Stop" tab-to-tab-stop]
394 ["%_Move to Tab Stop" move-to-tab-stop]
395 ["%_Edit Tab Stops" edit-tab-stops]
384 ) 396 )
385 ("S%_pell-Check" 397 ("S%_pell-Check"
386 ["%_Buffer" ispell-buffer 398 ["%_Buffer" ispell-buffer
387 :active (fboundp 'ispell-buffer)] 399 :active (fboundp 'ispell-buffer)]
388 "---" 400 "---"
1401 ["Edit Fa%_ces..." (customize-face nil)] 1413 ["Edit Fa%_ces..." (customize-face nil)]
1402 "-----" 1414 "-----"
1403 ["Edit I%_nit File" 1415 ["Edit I%_nit File"
1404 ;; #### there should be something that holds the name that the init 1416 ;; #### there should be something that holds the name that the init
1405 ;; file should be created as, when it's not present. 1417 ;; file should be created as, when it's not present.
1406 (progn (find-file (or user-init-file "~/.xemacs/init.el")) 1418 (let ((el-file (or user-init-file "~/.xemacs/init.el")))
1407 (or (eq major-mode 'emacs-lisp-mode) 1419 (if (string-match "\\.elc$" el-file)
1408 (emacs-lisp-mode)))] 1420 (setq el-file
1421 (substring user-init-file 0 (1- (length el-file)))))
1422 (find-file el-file)
1423 (or (eq major-mode 'emacs-lisp-mode)
1424 (emacs-lisp-mode)))]
1409 ["%_Save Options to Init File" customize-save-customized] 1425 ["%_Save Options to Init File" customize-save-customized]
1410 ) 1426 )
1411 1427
1412 ("%_Buffers" 1428 ("%_Buffers"
1413 :filter buffers-menu-filter 1429 :filter buffers-menu-filter
1422 1438
1423 nil ; the partition: menus after this are flushright 1439 nil ; the partition: menus after this are flushright
1424 1440
1425 ("%_Help" 1441 ("%_Help"
1426 ["%_About XEmacs..." about-xemacs] 1442 ["%_About XEmacs..." about-xemacs]
1443 ["%_Home Page (www.xemacs.org)" xemacs-www-page
1444 :active (fboundp 'browse-url)]
1427 "-----" 1445 "-----"
1428 ["What's %_New in XEmacs" view-emacs-news] 1446 ["What's %_New in XEmacs" view-emacs-news]
1429 ["%_Obtaining XEmacs" describe-distribution] 1447 ["%_Obtaining XEmacs" describe-distribution]
1430 "-----" 1448 "-----"
1431 ("%_Info (Online Docs)" 1449 ("%_Info (Online Docs)"
1432 ["%_Info Contents" info] 1450 ["Info Con%_tents" (Info-goto-node "(dir)")]
1433 ["Lookup %_Key Binding..." Info-goto-emacs-key-command-node] 1451 "-----"
1434 ["Lookup %_Command..." Info-goto-emacs-command-node] 1452 ["XEmacs %_User's Manual" (Info-goto-node "(XEmacs)")]
1435 ["Lookup %_Function..." Info-elisp-ref] 1453 ["XEmacs %_Lisp Reference Manual" (Info-goto-node "(Lispref)")]
1436 ["Lookup %_Topic..." Info-query]) 1454 ["All About %_Packages" (Info-goto-node "(xemacs)Packages")]
1455 ["%_Getting Started with XEmacs" (Info-goto-node "(New-Users-Guide)")]
1456 ["XEmacs In%_ternals Manual" (Info-goto-node "(Internals)")]
1457 ["%_How to Use Info" (Info-goto-node "(Info)")]
1458 "-----"
1459 ["Lookup %_Key Sequence in User's Manual..."
1460 Info-goto-emacs-key-command-node]
1461 ["Lookup %_Command in User's Manual..." Info-goto-emacs-command-node]
1462 ["Lookup %_Function in Lisp Reference..." Info-elisp-ref]
1463 "-----"
1464 ["Search %_Index in User's Manual/Lispref..."
1465 Info-search-index-in-xemacs-and-lispref]
1466 ["%_Search Text in User's Manual..." Info-search-text-in-xemacs]
1467 ["S%_earch Text in Lisp Reference..."
1468 Info-search-text-in-lispref]
1469 )
1437 ("XEmacs %_FAQ" 1470 ("XEmacs %_FAQ"
1438 ["%_FAQ (local)" xemacs-local-faq] 1471 ["%_FAQ (local)" xemacs-local-faq]
1439 ["FAQ via %_WWW" xemacs-www-faq 1472 ["FAQ via %_WWW" xemacs-www-faq
1440 :active (fboundp 'browse-url)]
1441 ["%_Home Page" xemacs-www-page
1442 :active (fboundp 'browse-url)]) 1473 :active (fboundp 'browse-url)])
1443 ("%_Tutorials" 1474 ("%_Tutorials"
1444 :filter tutorials-menu-filter) 1475 :filter tutorials-menu-filter)
1445 ("%_Samples" 1476 ("%_Samples"
1446 ["Sample %_init.el" 1477 ["View Sample %_init.el" view-sample-init-el
1447 (find-file (locate-data-file "sample.init.el"))
1448 :active (locate-data-file "sample.init.el")] 1478 :active (locate-data-file "sample.init.el")]
1449 ["Sample .%_gtkrc" 1479 ["View Sample .%_gtkrc"
1450 (find-file (locate-data-file "sample.gtkrc")) 1480 (Help-find-file (locate-data-file "sample.gtkrc"))
1451 :included (featurep 'gtk) 1481 :included (featurep 'gtk)
1452 :active (locate-data-file "sample.gtkrc")] 1482 :active (locate-data-file "sample.gtkrc")]
1453 ["Sample .%_Xdefaults" 1483 ["View Sample .%_Xdefaults"
1454 (find-file (locate-data-file "sample.Xdefaults")) 1484 (Help-find-file (locate-data-file "sample.Xdefaults"))
1455 :included (featurep 'x) 1485 :included (featurep 'x)
1456 :active (locate-data-file "sample.Xdefaults")] 1486 :active (locate-data-file "sample.Xdefaults")]
1457 ["Sample %_enriched" 1487 ["View Sample %_enriched.doc"
1458 (find-file (locate-data-file "enriched.doc")) 1488 (Help-find-file (locate-data-file "enriched.doc"))
1459 :active (locate-data-file "enriched.doc")]) 1489 :active (locate-data-file "enriched.doc")])
1460 ("%_Commands & Keys" 1490 ("%_Commands, Variables, Keys"
1461 ["%_Mode" describe-mode] 1491 ["Describe %_Mode" describe-mode]
1462 ["%_Apropos..." hyper-apropos] 1492 ["%_Apropos..." hyper-apropos]
1493 ["%_Command-Only Apropos..." command-hyper-apropos]
1463 ["Apropos %_Docs..." apropos-documentation] 1494 ["Apropos %_Docs..." apropos-documentation]
1464 "-----" 1495 "-----"
1465 ["%_Key..." describe-key] 1496 ["Describe %_Key..." describe-key]
1466 ["%_Bindings" describe-bindings] 1497 ["Show %_Bindings" describe-bindings]
1467 ["%_Mouse Bindings" describe-pointer] 1498 ["Show M%_ouse Bindings" describe-pointer]
1468 ["%_Recent Keys" view-lossage] 1499 ["%_Recent Keys" view-lossage]
1469 "-----" 1500 "-----"
1470 ["%_Function..." describe-function] 1501 ["Describe %_Function..." describe-function]
1471 ["%_Variable..." describe-variable] 1502 ["Describe %_Variable..." describe-variable]
1472 ["%_Locate Command..." where-is]) 1503 ["%_Locate Command in Keymap..." where-is])
1473 "-----"
1474 ["%_Recent Messages" view-lossage]
1475 ("%_Misc" 1504 ("%_Misc"
1476 ["%_Current Installation Info" describe-installation 1505 ["%_Current Installation Info" describe-installation
1477 :active (boundp 'Installation-string)] 1506 :active (boundp 'Installation-string)]
1478 ["%_No Warranty" describe-no-warranty] 1507 ["%_No Warranty" describe-no-warranty]
1479 ["XEmacs %_License" describe-copying] 1508 ["XEmacs %_License" describe-copying]
1480 ["Find %_Packages" finder-by-keyword] 1509 ["Find %_Packages" finder-by-keyword]
1481 ["View %_Splash Screen" xemacs-splash-buffer] 1510 ["View %_Splash Screen" xemacs-splash-buffer]
1482 ["%_Unix Manual..." manual-entry]) 1511 ["%_Unix Manual..." manual-entry])
1512 "-----"
1513 ["%_Recent Messages" view-lossage]
1483 ["Send %_Bug Report..." report-emacs-bug 1514 ["Send %_Bug Report..." report-emacs-bug
1484 :active (fboundp 'report-emacs-bug)]))) 1515 :active (fboundp 'report-emacs-bug)])))
1485 1516
1486 1517
1487 (defun maybe-add-init-button () 1518 (defun maybe-add-init-button ()
1922 1953
1923 ;;; Popup menus. 1954 ;;; Popup menus.
1924 1955
1925 (defconst default-popup-menu 1956 (defconst default-popup-menu
1926 '("XEmacs Commands" 1957 '("XEmacs Commands"
1927 ["%_Undo" advertised-undo 1958 ["%_Split Window" split-window-vertically]
1928 :active (and (not (eq buffer-undo-list t)) 1959 ["S%_plit Window (Side by Side)" split-window-horizontally]
1929 (or buffer-undo-list pending-undo-list)) 1960 ["%_Un-Split (Keep This)" delete-other-windows
1930 :suffix (if (or (eq last-command 'undo) 1961 :active (not (one-window-p t))]
1931 (eq last-command 'advertised-undo)) 1962 ["Un-Split (Keep %_Others)" delete-window
1932 "More" "")] 1963 :active (not (one-window-p t))]
1933 ["Cu%_t" kill-primary-selection
1934 :active (selection-owner-p)]
1935 ["%_Copy" copy-primary-selection
1936 :active (selection-owner-p)]
1937 ["%_Paste" yank-clipboard-selection
1938 :active (selection-exists-p 'CLIPBOARD)]
1939 ["%_Delete" delete-primary-selection
1940 :active (selection-owner-p)]
1941 "-----"
1942 ["Select %_Block" mark-paragraph]
1943 ["Sp%_lit Window" split-window-vertically]
1944 ["U%_nsplit Window" delete-other-windows]
1945 )) 1964 ))
1946 1965
1947 ;; In an effort to avoid massive menu clutter, this mostly worthless menu is 1966 ;; In an effort to avoid massive menu clutter, this mostly worthless menu is
1948 ;; superseded by any local popup menu... 1967 ;; superseded by any local popup menu...
1949 (setq-default mode-popup-menu default-popup-menu) 1968 (setq-default mode-popup-menu default-popup-menu)