1. Install emacs for MacOS by searching Google. This should be pretty straightforward. Now you need to be able to start emacs from the command line. To be able to do that, create the following script. Let's assume you save it in the file named memacs.
#!/bin/sh
/Applications/Emacs.app/Contents/MacOS/Emacs "$@"
Make it executable and put it somewhere in your home directory, where makes sense:
chmod u+x ./memacs
mkdir $home/bin
mv memacs $home/bin
Now add $home/bin to your path by editing your .shrc or .cshrc file, and you'll be able to launch emacs from command line by typing memacs.
2. Find and download the tarball with the latest version of cscope. Unpack the archive, and in the shell, simply execute:
./configure
make
make install
3. Add the following lines to your $home/.emacs file:
(require 'package)
(add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/"))
(package-initialize)
(require 'xcscope)
(cscope-setup)
(define-key global-map [(control f3)] 'cscope-set-initial-directory)
(define-key global-map [(control f4)] 'cscope-unset-initial-directory)
(define-key global-map [(control f5)] 'cscope-find-this-symbol)
(define-key global-map [(control f6)] 'cscope-find-global-definition)
(define-key global-map [(control f7)]
'cscope-find-global-definition-no-prompting)
(define-key global-map [(control f8)] 'cscope-pop-mark)
(define-key global-map [(control f9)] 'cscope-history-forward-line)
(define-key global-map [(control f10)] 'cscope-history-forward-file)
(define-key global-map [(control f11)] 'cscope-history-backward-line)
(define-key global-map [(control f12)] 'cscope-history-backward-file)
(define-key global-map [(meta f9)] 'cscope-display-buffer)
(define-key global-map [(meta f10)] 'cscope-display-buffer-toggle)
The first time you run emacs after adding these lines, it will probably complain that it can't find the package xcscope. To fix that, in emacs run M-x list-packages. From the displayed list of packages, select xcscope. Click on it. An installation button will appear in another buffer. Go to the buffer, click on the Install button, and the package will be installed.
Now you are ready to follow the instructions one the previous page.